|
Replies:
2
-
Last Post:
Sep 5, 2009 3:30 PM
by: sanjograina
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
Problem Loading a Jnlp-href'd Applet
Posted:
Aug 6, 2008 9:43 AM
|
|
|
Hi,
I am stuck again trying to load, and run a JavaFX applet using the applet tag's jnlp-href attribute. I have been struggling with this for a whole day, and still I haven't been to able figure it out, and I could really use a little help. I have also enabled all the debugging and tracing flags, but the error messages don't seem to giving me any helpful clues. One thing I could tell from the logs is that the plugin is not being able to load the jar files specified in the jnlp file. Why? I don't know. It does not to tell me enough to figure out why. I tried diiferent values for the applet's codebase attribute, moving the jars around. Nothing helped. The one thing that's unique with this test case is that the applet tag is placed in a jsp file, and the web server does some kind of url mapping between the physical, and the logical location of these jsp files. So here's what the applet tag looks like in the jsp:
<APPLET width=850 height=300 codebase="http://localhost:7001/maximo/"> <param name="jnlp_href" value="LinearCtrl.jnlp"> </APPLET>
And here's what the plugin error log looks like:
Java Plug-in 1.6.0_10-rc Using JRE version 1.6.0_10-rc Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Administrator ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to <n> ----------------------------------------------------
security: property package.access value sun. security: property package.access new value sun.,com.sun.javaws security: property package.access value sun.,com.sun.javaws security: property package.access new value sun.,com.sun.javaws,com.sun.deploy security: property package.definition value null security: property package.definition new value com.sun.javaws security: property package.definition value com.sun.javaws security: property package.definition new value com.sun.javaws,com.sun.deploy security: property package.definition value com.sun.javaws,com.sun.deploy security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.access value sun.,com.sun.javaws,com.sun.deploy security: property package.access new value sun.,com.sun.javaws,com.sun.deploy,org.mozilla.jss security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss network: Created version ID: 1.4.2.13 network: Created version ID: 1.4 network: Created version ID: 1.6.0.10.rc network: Created version ID: 1.6 network: Created version ID: 1.6.0.10.rc network: Created version ID: 1.6 network: Created version ID: 1.6.0.10.rc network: Created version ID: 1.6 network: Cache entry found [url: http://localhost:7001/maximo/LinearCtrl.jnlp, version: null] network: Connecting http://localhost:7001/maximo/LinearCtrl.jnlp with proxy=DIRECT network: Connecting http://localhost:7001/ with proxy=DIRECT network: Connecting http://localhost:7001/maximo/LinearCtrl.jnlp with cookie "JSESSIONID=82hkLZ3GDvFh67KjkJJ0k81WhhWzWCVJ01LlJrl814SnlX2TY81L!-368072417" network: ResponseCode for http://localhost:7001/maximo/LinearCtrl.jnlp : 200 network: Encoding for http://localhost:7001/maximo/LinearCtrl.jnlp : null network: Disconnect connection to http://localhost:7001/maximo/LinearCtrl.jnlp network: Connecting http://localhost:7001/maximo/LinearCtrl.jnlp with proxy=DIRECT network: Connecting http://localhost:7001/ with proxy=DIRECT network: Connecting http://localhost:7001/maximo/LinearCtrl.jnlp with cookie "JSESSIONID=82hkLZ3GDvFh67KjkJJ0k81WhhWzWCVJ01LlJrl814SnlX2TY81L!-368072417" network: ResponseCode for http://localhost:7001/maximo/LinearCtrl.jnlp : 200 network: Encoding for http://localhost:7001/maximo/LinearCtrl.jnlp : null network: Sever response: (length: 1263, lastModified: Wed Aug 06 10:34:41 EDT 2008, downloadVersion: null, mimeType: application/x-java-jnlp-file) basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@a8c488 basic: APPLET tag missing CODE parameter. APPLET tag missing CODE parameter. network: Downloading resource: http://localhost:7001/maximo/LinearCtrl.jnlp Content-Length: 1,263 Content-Encoding: null network: Wrote URL http://localhost:7001/maximo/LinearCtrl.jnlp to File C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\cache\6.0\27\7dfa1c1b-4c6601e0-temp network: Disconnect connection to http://localhost:7001/maximo/LinearCtrl.jnlp network: Cache: Enable a new CacheEntry: http://localhost:7001/maximo/LinearCtrl.jnlp network: Remove cache entry: http://localhost:7001/maximo/LinearCtrl.jnlp network: CleanupThread used 43332 us temp: new XMLParser with source: temp: <?xml version="1.0" encoding="UTF-8"?> <jnlp href="ui.LinearCtrl" codebase="http://localhost:7001/maximo/"> <information> <title>Applet HTML Page</title> <vendor>My Company, Inc</vendor> <offline-allowed/> </information> <resources> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> <jar href="LinearControl.jar"/> <jar href="lib/Decora-D3D.jar"/> <jar href="lib/Decora-HW.jar"/> <jar href="lib/Decora-OGL.jar"/> <jar href="lib/gluegen-rt.jar"/> <jar href="lib/javafx-swing.jar"/> <jar href="lib/javafxc.jar"/> <jar href="lib/javafxdoc.jar"/> <jar href="lib/javafxgui.jar" main="true"/> <jar href="lib/javafxrt.jar"/> <jar href="lib/jmc.jar"/> <jar href="lib/jogl.jar"/> <jar href="lib/Scenario.jar"/> </resources> <applet-desc name="ui.LinearCtrl" main-class="javafx.application.Applet" width="300" height="800"> <param name="ApplicationClass" value="ui.LinearCtrl"> </applet-desc> </jnlp>
temp:
returning ROOT as follows:
<jnlp href="ui.LinearCtrl" codebase="http://localhost:7001/maximo/"> <information> <title>Applet HTML Page</title> <vendor>My Company, Inc</vendor> <offline-allowed/> </information> <resources> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> <jar href="LinearControl.jar"/> <jar href="lib/Decora-D3D.jar"/> <jar href="lib/Decora-HW.jar"/> <jar href="lib/Decora-OGL.jar"/> <jar href="lib/gluegen-rt.jar"/> <jar href="lib/javafx-swing.jar"/> <jar href="lib/javafxc.jar"/> <jar href="lib/javafxdoc.jar"/> <jar href="lib/javafxgui.jar" main="true"/> <jar href="lib/javafxrt.jar"/> <jar href="lib/jmc.jar"/> <jar href="lib/jogl.jar"/> <jar href="lib/Scenario.jar"/> </resources> <applet-desc name="ui.LinearCtrl" main-class="javafx.application.Applet" width="300" height="800"> <param name="ApplicationClass" value="ui.LinearCtrl"/> </applet-desc>jnlp </jnlp> network: Created version ID: 1.6.0.10.rc network: Created version ID: 1.6 network: Created version ID: 1.6+ network: Created version ID: 1.6.0.10.rc temp: returning LaunchDesc from XMLFormat.parse():
<jnlp spec="1.0+" codebase="http://localhost:7001/maximo/" href="http://localhost:7001/maximo/ui.LinearCtrl"> <information> <title>Applet HTML Page</title> <vendor>My Company, Inc</vendor> <homepage href="null"/> <offline-allowed/> </information> <update check="timeout" policy="always"/> <resources> <java href="http://java.sun.com/products/autodl/j2se" version="1.6+"/> <jar href="http://localhost:7001/maximo/LinearControl.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/Decora-D3D.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/Decora-HW.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/Decora-OGL.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/gluegen-rt.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/javafx-swing.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/javafxc.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/javafxdoc.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/javafxgui.jar" download="eager" main="true"/> <jar href="http://localhost:7001/maximo/lib/javafxrt.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/jmc.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/jogl.jar" download="eager" main="false"/> <jar href="http://localhost:7001/maximo/lib/Scenario.jar" download="eager" main="false"/> </resources> <applet-desc name="ui.LinearCtrl" main-class="javafx.application.Applet" documentbase="http://localhost:7001/maximo/ui/maximo.jsp" width="300" height="800"> <param name="ApplicationClass" value="ui.LinearCtrl"/> </applet-desc> </jnlp> Exception in thread "AWT-EventQueue-3" java.lang.InternalError: couldn't create component peer at sun.awt.windows.WComponentPeer.checkCreation(Unknown Source) at sun.awt.windows.WComponentPeer.<init>(Unknown Source) at sun.awt.windows.WCanvasPeer.<init>(Unknown Source) at sun.awt.windows.WPanelPeer.<init>(Unknown Source) at sun.awt.windows.WWindowPeer.<init>(Unknown Source) at sun.awt.windows.WFramePeer.<init>(Unknown Source) at sun.awt.windows.WEmbeddedFramePeer.<init>(Unknown Source) at sun.awt.windows.WToolkit.createEmbeddedFrame(Unknown Source) at sun.awt.windows.WEmbeddedFrame.addNotify(Unknown Source) at sun.plugin2.main.client.PluginEmbeddedFrame.addNotify(Unknown Source) at sun.awt.windows.WEmbeddedFrame.<init>(Unknown Source) at sun.plugin2.main.client.PluginEmbeddedFrame.<init>(Unknown Source) at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
I would really appreciate it if some one can tell me what's going on. I am using b28 on Win XP.
Thanks, Mike
Message was edited by: mikeazzi
|
|
|
|
|
|
|
Re: Problem Loading a Jnlp-href'd Applet
Posted:
Aug 7, 2008 9:29 AM
in response to: mikeazzi
|
|
|
OK, here's an update, I was able to get it to partially work: If I do ctrl-F5 in the page the applet loads, and run fine. So let me ask this question then. Please take a look at this part of the console output from above:
<applet-desc name="ui.LinearCtrl" main-class="javafx.application.Applet" documentbase="http://localhost:7001/maximo/ui/maximo.jsp" width="300" height="800">
Particularly take a look at the documentbase attribute. My question is how does the plugin compute, or get the value of this attribute, and what's its role? I have a sneaky suspicion that this attribute might have something to do with my problem. The reason I am saying this is when I do the Ctrl-F5 trick in the page, and when the applet loads fine, the value of this attribute changes to :
<applet-desc name="ui.LinearCtrl" main-class="javafx.application.Applet" documentbase="http://localhost:7001/maximo/ui/login?event=loadapp&value=asset&uisessionid=1217957817973" width="300" height="800"> <param name="ApplicationClass" value="ui.LinearCtrl"/> </applet-desc>
So now there is a uisessionid parameter as part of the documentbase. I wonder what's the significance of this, but it seems that its presence may have something to do with it being working. If that's the case how do I always force this value in the documentbase attribute. Please also note that the site I am testing with is a login protected site. Could that be also part of the problem?
Thanks, Mike
Message was edited by: mikeazzi
|
|
|
|
|
|
|
|
Re: Problem Loading a Jnlp-href'd Applet
Posted:
Sep 5, 2009 3:30 PM
in response to: mikeazzi
|
|
|
Hi Mikeazzi,
I am trying to do something similar in maximo 6. I need to create an applet and want the applet to use the mbo classes so the db connection is managed by maximo. I later need to be able to open this applet from select action. Could you point me towards a solution?
Regards,
-Sanjog
|
|
|
|
|