Forum Stats

  • 3,769,989 Users
  • 2,253,043 Discussions
  • 7,875,261 Comments

Discussions

Getting sometimes NPE when starting a jnlp

2749078
2749078 Member Posts: 27
edited Mar 12, 2015 4:23PM in Java Web Start & JNLP

Unfortunately I can not reproduce the issue 100%

We have a signed rcp-webapp and we are using a jnlp template according to javas security restrictions.

But sometimes I get a NullPointerException when starting the jnlp

java.lang.NullPointerException

at com.sun.javaws.JnlpxArgs.execProgram(Unknown Source)

at com.sun.javaws.Launcher.relaunch(Unknown Source)

at com.sun.javaws.Launcher.prepareResources(Unknown Source)

at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)

at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)

at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)

at com.sun.javaws.Launcher.launch(Unknown Source)

at com.sun.javaws.Main.launchApp(Unknown Source)

at com.sun.javaws.Main.continueInSecureThread(Unknown Source)

at com.sun.javaws.Main.access$000(Unknown Source)

at com.sun.javaws.Main$1.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

The error says something like cannot start main-class xyz

where xyz is a random substring from the jnlp content (tags, attributes, values etc.).

Everytime I start the jnlp the "main-class" is xyz

Renaming the already downloaded jnlp results in a starting application or a new NPE with another wrong main class.

In some cases clearing the javaws cache helps so I think this is a cache issue...


Problem occurs in latest java 7 and 8.


Does anybody know the problem?

Or does anybody know how to avoid the NPE?


This is an already closed bug with my problem (closed because not reproducable)

https://bugs.openjdk.java.net/browse/JDK-8074174

Changig the security level does not help this seems to an issue how the main class is determined from a cached application.


Here is a same/similar bug

Bug ID: JDK-8064358 JnlpxArgs NullPointerException

According to this entry the bug is fixed in java 8 and 9 but not in 7.

Unfortunately I did not found a checkin to see what was changed.

Answers

  • 2749078
    2749078 Member Posts: 27
    edited Mar 10, 2015 6:22PM

    It seems that the secure launcher has a problem with some properties.

    In the mentioned bug entry it was http.agent in my case it seems that setting org.eclipse.swt.browser.IEVersion causes the NPE (sometimes)

    I'll make some tests and remove the property if necessary but I think oracle should fix the bug...

  • 2749078
    2749078 Member Posts: 27
    edited Mar 12, 2015 4:23PM

    Unfortunately removing the property did not solve the problem so I reported the bug to oracle.

This discussion has been closed.