Hi,
i want to embed an applet into a page served by OF. The applet needs access to some jar files. I don't know how to make the jar files available for the applet. The class that contains the applet is in the same directory as the HTML page. In the view (at this time, a pure html page), i have: <object classid="java:SgApplet.class" codetype="application/java-vm" width="600" height="530"> <param name="archive" value="antlr-2.7.6.jar, commons-cli-1.0.jar, commons-pool-1.2.jar, excalibur-cli-1.0.jar, exist.jar, javax.servlet.jar, jaxen-1.1-beta-6.jar, jEdit-syntax.jar, jgroups-all.jar, jline-0_9_5.jar, log4j-1.2.13.jar, resolver.jar, sunxacml.jar, xmldb.jar, xmlrpc-1.2-patched.jar" /> </object> In the page flow, i added a files entry for the jar files and the class file. I tried to put the jar files into WEB-INF/lib as well as in the same dir as the html file, but both didn't work. The java console shows that the applet gets loaded, but then a NullPointerException occurs, i suppose at the point where the jars should get loaded: basic: Registrierter Modality-Listener basic: ClassLoader wird referenziert: sun.plugin.ClassLoaderInfo@153c375, refcount=1 basic: Fortschritts-Listener hinzugefügt: sun.plugin.util.GrayBoxPainter@273686 basic: Applet wird geladen... basic: Applet wird initialisiert... basic: Applet wird gestartet... java.lang.NullPointerException at sun.plugin.cache.Cache.updateTable(Unknown Source) at sun.plugin.cache.JarCache.getMatchingFile(Unknown Source) at sun.plugin.cache.CachedJarLoader$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin.cache.CachedJarLoader.getCacheFile(Unknown Source) at sun.plugin.cache.CachedJarLoader.<init>(Unknown Source) at sun.plugin.cache.JarCache.get(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source) at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source) at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source) at sun.misc.URLClassPath$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getResource(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) basic: Ausnahme: java.lang.NullPointerException The jars are signed and everything works fine if i put the html and the jars on an apache server. But because i want to access the applet from OF, i need it to run inside OF. Any hints? Thanks in advance florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Florian,
To solve this kind of problems, try the following two steps: 1. Look at the Tomcat or Orbeon Forms logs and check what path is actually required by the client. 2. Make sure something on your server is able to serve the path requested by the client ;-) Have you tried adding somthing like this to your page flow: <files path-info="*.jar"/> -Erik Florian Schmitt wrote: > Hi, > > i want to embed an applet into a page served by OF. The applet needs > access to some jar files. I don't know how to make the jar files > available for the applet. The class that contains the applet is in the > same directory as the HTML page. > > In the view (at this time, a pure html page), i have: > > <object classid="java:SgApplet.class" > codetype="application/java-vm" > width="600" height="530"> > <param name="archive" value="antlr-2.7.6.jar, > commons-cli-1.0.jar, > commons-pool-1.2.jar, > excalibur-cli-1.0.jar, > exist.jar, > javax.servlet.jar, > jaxen-1.1-beta-6.jar, > jEdit-syntax.jar, > jgroups-all.jar, > jline-0_9_5.jar, > log4j-1.2.13.jar, > resolver.jar, > sunxacml.jar, > xmldb.jar, > xmlrpc-1.2-patched.jar" /> > </object> > > In the page flow, i added a files entry for the jar files and the class > file. I tried to put the jar files into WEB-INF/lib as well as in the > same dir as the html file, but both didn't work. The java console shows > that the applet gets loaded, but then a NullPointerException occurs, i > suppose at the point where the jars should get loaded: > > basic: Registrierter Modality-Listener > basic: ClassLoader wird referenziert: > sun.plugin.ClassLoaderInfo@153c375, refcount=1 > basic: Fortschritts-Listener hinzugefügt: > sun.plugin.util.GrayBoxPainter@273686 > basic: Applet wird geladen... > basic: Applet wird initialisiert... > basic: Applet wird gestartet... > java.lang.NullPointerException > at sun.plugin.cache.Cache.updateTable(Unknown Source) > at sun.plugin.cache.JarCache.getMatchingFile(Unknown Source) > at sun.plugin.cache.CachedJarLoader$4.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at sun.plugin.cache.CachedJarLoader.getCacheFile(Unknown Source) > at sun.plugin.cache.CachedJarLoader.<init>(Unknown Source) > at sun.plugin.cache.JarCache.get(Unknown Source) > at > sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source) > at > sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown > Source) > at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source) > at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source) > at sun.misc.URLClassPath$3.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at sun.misc.URLClassPath.getLoader(Unknown Source) > at sun.misc.URLClassPath.getLoader(Unknown Source) > at sun.misc.URLClassPath.getResource(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at sun.applet.AppletClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.applet.AppletClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.applet.AppletClassLoader.loadCode(Unknown Source) > at sun.applet.AppletPanel.createApplet(Unknown Source) > at sun.plugin.AppletViewer.createApplet(Unknown Source) > at sun.applet.AppletPanel.runLoader(Unknown Source) > at sun.applet.AppletPanel.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > basic: Ausnahme: java.lang.NullPointerException > > The jars are signed and everything works fine if i put the html and the > jars on an apache server. But because i want to access the applet from > OF, i need it to run inside OF. Any hints? > > Thanks in advance > florian > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |