karakun / OpenWebStart

Run Web Start based applications after the release of Java 11
https://openwebstart.com
Other
416 stars 48 forks source link

Version 1.10: Launch Error: Could not launch JNLP file. The application has not been initialized #584

Open patrice0 opened 3 months ago

patrice0 commented 3 months ago

Hi,

We've used OpenWebStart for our application for several years (since version 1.2 or so). It no longer starts correctly with OpenWebStart version 1.10. The error is

net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:414)
    at net.sourceforge.jnlp.Launcher.access$300(Launcher.java:72)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:661)
@Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:407)
    ... 2 more
Caused by: java.lang.NullPointerException
    at sun.misc.MetaIndex.mayContain(MetaIndex.java:242)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1058)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:250)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:303)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1257)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1086)
    at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:233)
    at SomeLocalClass.getResource(SomeLocalClass.java:350)
    ... 7 more

where the relevant part of our code is

ClassLoader cl = SomeLocalClass.class.getClassLoader();
return cl.getResourceAsStream(System.getProperty(resourceName));

The file "resourceName" is in the .jar file, and can be found without issues up to version 1.9.1 (downgrading OpenWebStart to version 1.9.1 allows the application to run again). The error occurs on both Windows and Linux. I can provide the entire output from OpenWebStart if it's needed to help diagnose the issue (but, unfortunately, not the .jar file). Thank you,

Patrice

sclassen commented 3 months ago

The jar file is not relevant. But a complete log file (both stage 1 and 2) would be helpful.

Either past them here or send them to openwebstart@karakun.com with a short message linking to this GH issue.

patrice0 commented 3 months ago

I have emailed the log file.

patrice0 commented 3 months ago

Adding a two lines program that triggers the issue here (it's been emailed as well). test.tar.gz

sclassen commented 3 months ago

We found the source of the problem an plan on releasing a bugfix early next week

ericdech commented 3 weeks ago

The problem is still present on release 1.10.1. Will it be fixed in the next release?