Impossible to run Java Web Start application - java.lang.IllegalStateException occures

Bug #375194 reported by Michał Gołębiowski-Owczarek
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sun-java6 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I use Ubuntu 8.04 Hardy with Firefox 3. When I try to run any Java Web Start (*.jnlp) application, like:
http://java.sun.com/docs/books/tutorialJWS/uiswing/components/ex6/Converter.jnlp
(it's an example from: http://java.sun.com/docs/books/tutorial/uiswing/components/model.html)
I get an error:
java.lang.IllegalStateException: Dynamic Proxy Manager: Invalid Proxy File

Details:
java.lang.IllegalStateException: DynamicProxyManager: Invalid Proxy Type
 at com.sun.deploy.net.proxy.DynamicProxyManager.reset(DynamicProxyManager.java:318)
 at com.sun.deploy.net.proxy.DeployProxySelector.reset(DeployProxySelector.java:62)
 at com.sun.javaws.Main.initializeExecutionEnvironment(Main.java:984)
 at com.sun.javaws.Main.continueInSecureThread(Main.java:170)
 at com.sun.javaws.Main$1.run(Main.java:107)
 at java.lang.Thread.run(Thread.java:619)

In this way the application won't start. Can sth be done about this issue? Thanks in advance.

Revision history for this message
John Vivirito (gnomefreak) wrote :

I'm not sure what java package this should be against.
In no way is this a firefox bug since all firefox does is download the file.
I tested it in Jaunty and it works properly

affects: firefox (Ubuntu) → ubuntu
Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

OK, right, I shouldn't bind it to Firefox. Isn't it a feature of a standard Java installation? Then it would be sun-java6-bin, wouldn't it?

Revision history for this message
technicalguy (technicalguy) wrote :

I use Intreped Ibex 8.10 and I have the same problem, I think it will be related to the ia32-sun-java6 package or the sun-java-jre package that it depends on.

Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

It would be nice to have a workaround for this. I am supposed to do a project for my studies which strongly relies on working JWS...

Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

I can also add that not further than a month ago it was working correctly. So sth had to happened in between.

Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

Now it just started to work, with no reason... (or maybe there was a crucial update in between)

Revision history for this message
Ted (ted276) wrote :

So, this actually /does/ have something to do with Firefox, at least in a roundabout way.

Quick fix (method 1)
1. Edit > Preferences in Firefox
2. Advanced > Network > Settings...
3. If "Use system proxy settings" is selected, either:
    a) Select "No proxy" if you don't use a proxy
        -or-
    b) Enter your appropriate proxy settings. Any correct proxy settings should work, as long as they are entered in Firefox and "Use system proxy settings" is not selected.

Quick fix (method 2)
1. Type "about:config" into the address bar in Firefox
2. Type "network.proxy.type" into the configuration Filter box
3. Right click on the entry and select Modify
4. Enter "0" (number zero) (means "No proxy")
5. Click OK

Details:
I ran an strace on "javaws <url>" (with Firefox not running), and noticed that javaws reads the Firefox preferences file (/home/user/.mozilla/firefox/<profile string>.default/prefs.js). Removing the line in the preferences file for "network.proxy.type" fixed the problem. The value of "network.proxy.type" was 5 which corresponds to "Use system proxy settings". Changing "network.proxy.type" to 1, 2, or 4 appears to cause javaws to try to interpret the rest of the proxy settings in the preferences file. Changing "network.proxy.type" to 0 ("Direct connection, no proxy") causes javaws to make a direct connection.

So it seems that Java is looking around for various proxy settings to try to determine them, and doesn't understand Firefox's "5" type. According to the Mozilla documentation, the value of 5 was added in Firefox 3.0, and maybe only works for non-OS X UNIXes, so Java probably needs to be updated to understand/ignore it.

$ ls -l /usr/bin/javaws
lrwxrwxrwx 1 root root 24 2009-01-11 12:32 /usr/bin/javaws -> /etc/alternatives/javaws
$ ls -l /etc/alternatives/javaws
lrwxrwxrwx 1 root root 38 2009-06-08 16:14 /etc/alternatives/javaws -> /usr/lib/jvm/java-6-sun/jre/bin/javaws

References:
http://kb.mozillazine.org/Network.proxy.type

Revision history for this message
Keith Hughitt (keith-hughitt) wrote :

Same issue here (Ubuntu 9.04). Above work-around fixed the problem. Thanks!

Revision history for this message
Sig (sig-akasig) wrote :

I confirm the bug and the workaround.

Ubuntu 9.04
Firefox 3.0.13
Sun java version 1.6.0_14
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)

Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → sun-java6 (Ubuntu)
Revision history for this message
Mauro (mauromol) wrote :

This problem also happens under Windows if Firefox is the system default browser... So it must be a Sun JWS client bug. I can't find anything in bugs.sun.com, I'll file a report.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.