← Back to team overview

openjdk team mailing list archive

[Bug 544888] Re: Openjdk + icedtea6 plugin fails to load parameters from jnlp files

 

Launchpad has imported 9 comments from the remote bug at
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=464.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-03-23T15:27:41+00:00 Matthias Klose wrote:

NP Plugin 20100320

http://java.sun.com/docs/books/tutorial/deployment/applet/param.html

This is caused by the parameter "paramInt" being unavailable. This parameter is defined in a jnlp file, reference in the HTML as such:
<applet code="AppletTakesParams.class" archive="examples/dist/applet_AppletWithParameters/applet_AppletWithParameters.jar" height="50" width="800"><param name="jnlp_href" value="examples/dist/applet_AppletWithParameters/applettakesparams.jnlp">....</applet>

The page works with sun's jre in linux and windows under firefox.

$ firefox 2>&1 | tee error.log
Looking for 0xa8eb310c 0xa8dd3c40 0xb74fdbcc (document)
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8pre) (6b18~pre3-0ubuntu1)
OpenJDK Server VM (build 16.0-b13, mixed mode)
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:735)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)
	at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)
	at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:629)
	at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)
	at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:674)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)
	at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)
	at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)
java.lang.ArrayIndexOutOfBoundsException: 5
	at sun.applet.PluginProxyInfoRequest.parseReturn(PluginProxyInfoRequest.java:65)
	at sun.applet.PluginStreamHandler.finishCallRequest(PluginStreamHandler.java:338)
	at sun.applet.PluginStreamHandler.handlePluginMessage(PluginStreamHandler.java:287)
	at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:208)
	at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:443)
	at java.lang.Integer.parseInt(Integer.java:514)
	at AppletTakesParams.init(AppletTakesParams.java:39)
	at sun.applet.AppletPanel.run(AppletPanel.java:436)
	at java.lang.Thread.run(Thread.java:636)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/1

------------------------------------------------------------------------
On 2010-03-23T15:28:37+00:00 Matthias Klose wrote:

Created attachment 319
plugin debug log

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/2

------------------------------------------------------------------------
On 2010-06-11T14:59:09+00:00 Omajid wrote:

Created attachment 366
first cut at a patch to add support for reading JNLP files for applets

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/4

------------------------------------------------------------------------
On 2010-10-18T22:13:46+00:00 Asu-3 wrote:

Created attachment 430
Allow applets to read JNLP files for parameters given jnlp_href

(In reply to comment #2)
> Created an attachment (id=366) [details]
> first cut at a patch to add support for reading JNLP files for applets
> 

Hello,

I have made some modification in regards to this issue, I had originally
thought of placing the parsing inside the PluginAppletViewer part of the
code, however it would be better if I kept the jnlp stuff within netx. I
took a sneak peek at your patch and decided that placing it in the
PluginBridge(...) section was a good idea, however I did not think the
other changes were necessary. I have changed it to do this much less
complicated. Here is the attached patch I would like to propose.

--Andrew

ps. Thanks to Omair's patch for idea.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/5

------------------------------------------------------------------------
On 2010-10-20T14:37:02+00:00 Omajid wrote:

(In reply to comment #3)
> Created an attachment (id=430) [details]
> Allow applets to read JNLP files for parameters given jnlp_href
> 
> (In reply to comment #2)
> > Created an attachment (id=366) [details] [details]
> > first cut at a patch to add support for reading JNLP files for applets
> > 
> 
> Hello,
> 
> I have made some modification in regards to this issue, I had originally
> thought of placing the parsing inside the PluginAppletViewer part of the code,
> however it would be better if I kept the jnlp stuff within netx. I took a sneak
> peek at your patch and decided that placing it in the PluginBridge(...) section
> was a good idea, however I did not think the other changes were necessary. I
> have changed it to do this much less complicated. Here is the attached patch I
> would like to propose.
> 

Heh. I am not going to deny that the patch was complex :). It probably
has a number of issues. It's why I didnt post it for review.

However, it implemented much more of the applet-jnlp support. Take a
look at
http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/runAppletFunction.html
to find out all the different cases where values supplied by the applet
are supposed to be ignore/overwritten by values from the jnlp file.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/6

------------------------------------------------------------------------
On 2010-10-20T14:53:32+00:00 Asu-3 wrote:

Aha! I'll take it for another spin, thanks for pointing it out :)

Cheers,
  Andrew

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/7

------------------------------------------------------------------------
On 2011-05-31T20:27:48+00:00 Dbhole wrote:

*** Bug 672 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/8

------------------------------------------------------------------------
On 2011-06-08T00:11:07+00:00 Asu-3 wrote:

Created attachment 543
Updated patch

This is an updated patch which will allow the user to specify parameters
in JNLP files and use it for their applets.

Please let me know if I had missed anything, I've posted it for review
at http://mail.openjdk.java.net/pipermail/distro-pkg-
dev/2011-June/014608.html

Cheers,
  Andrew

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/9

------------------------------------------------------------------------
On 2011-06-08T20:31:40+00:00 Asu-3 wrote:

Hi, I have pushed an fix to HEAD after splitting up the patch.


http://icedtea.classpath.org/hg/icedtea-web/rev/a25cdbe75706
http://icedtea.classpath.org/hg/icedtea-web/rev/011a29a0d8a2

Closing as fixed.

Cheers,
 Andrew


Reply at: https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/544888/comments/10

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/544888

Title:
  Openjdk + icedtea6 plugin fails to load parameters from jnlp files

Status in OpenJDK:
  Fix Released
Status in “openjdk-6” package in Ubuntu:
  Triaged

Bug description:
  I was testing applets in the tutorials, this one doesn't work:
  http://java.sun.com/docs/books/tutorial/deployment/applet/param.html (scroll down for applet)

  When launching firefox from console, an error is reported:
  java.lang.NumberFormatException: null
  	at java.lang.Integer.parseInt(Integer.java:443)
  	at java.lang.Integer.parseInt(Integer.java:514)
  	at AppletTakesParams.init(AppletTakesParams.java:39)
  	at sun.applet.AppletPanel.run(AppletPanel.java:436)
  	at java.lang.Thread.run(Thread.java:636)

  This is caused by the parameter "paramInt" being unavailable. This parameter is defined in a jnlp file, reference in the HTML as such:
  <applet code="AppletTakesParams.class" archive="examples/dist/applet_AppletWithParameters/applet_AppletWithParameters.jar" height="50" width="800"><param name="jnlp_href" value="examples/dist/applet_AppletWithParameters/applettakesparams.jnlp">....</applet>

  The page works with sun's jre in ubuntu and windows under firefox.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openjdk/+bug/544888/+subscriptions


References