JNLPClassLoader cannot find class: ClassNotFoundException
Posted: 24 Jun 2022, 11:01
We experience some strange behavior when running a graphical application using, which is started using OpenWebStart 1.6.0 running on Oracle Java 17.0.1 on Windows 10. The application is correctly downloaded to the client from the server as defined in the JNLP and after the start the following two ClassNotFoundExceptions the being thrown:
We can see in the log (attached) that the corresponding libs containing the classes are correctly loaded and available:
1. jai_core-1.1.4+8-lcd.jar
2. jai_imageio-1.2+23-lcd.jar
Is there anything special about the JNLPClassLoader which could prohibit to load them?
Or any other idea on the root cause of this issue? Is there any workaround like a different classloader to fix this issue? It's of course no problem to start the application as standalone without OpenWebStart.
Code: Select all
java.lang.NoClassDefFoundError: javax/media/jai/JAI
at com.luciad.format.raster.TLcdGeoTIFFModelDecoder.<clinit>(LuciadLightspeed_2020.1.19:328)
at com.luciad.lucy.addons.decoders.aD.a(LuciadLightspeed_2020.1.19:42)
at com.luciad.internal.lucy.format.TLcyLazyModelDecoderWrapperFactory$TLcyLazyModelDecoder.a(LuciadLightspeed_2020.1.19:109)
at com.luciad.internal.lucy.format.TLcyLazyModelDecoderWrapperFactory$TLcyLazyModelDecoder.b(LuciadLightspeed_2020.1.19:101)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.luciad.internal.lucy.format.c.run(LuciadLightspeed_2020.1.19:193)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: javax.media.jai.JAI
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.lambda$loadClass$9(JNLPClassLoader.java:1446)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.loadClass(JNLPClassLoader.java:1446)
at com.luciad.format.raster.TLcdGeoTIFFModelDecoder.<clinit>(LuciadLightspeed_2020.1.19:328)
at com.luciad.lucy.addons.decoders.aD.a(LuciadLightspeed_2020.1.19:42)
at com.luciad.internal.lucy.format.TLcyLazyModelDecoderWrapperFactory$TLcyLazyModelDecoder.a(LuciadLightspeed_2020.1.19:109)
at com.luciad.internal.lucy.format.TLcyLazyModelDecoderWrapperFactory$TLcyLazyModelDecoder.b(LuciadLightspeed_2020.1.19:101)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.luciad.internal.lucy.format.c.run(LuciadLightspeed_2020.1.19:193)
at java.base/java.lang.Thread.run(Thread.java:833)
Code: Select all
java.lang.NoClassDefFoundError: com/sun/media/imageioimpl/plugins/tiff/TIFFImageMetadata
at com.luciad.lucy.addons.decoders.aD.a(LuciadLightspeed_2020.1.19:86)
at com.luciad.internal.lucy.format.TLcyLazyModelEncoderWrapperFactory$TLcyLazyModelEncoder.b(LuciadLightspeed_2020.1.19:102)
at com.luciad.internal.lucy.format.TLcyLazyModelEncoderWrapperFactory$TLcyLazyModelEncoder.a(LuciadLightspeed_2020.1.19:94)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.luciad.internal.lucy.format.f.run(LuciadLightspeed_2020.1.19:186)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: com.sun.media.imageioimpl.plugins.tiff.TIFFImageMetadata
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.lambda$loadClass$9(JNLPClassLoader.java:1446)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at net.sourceforge.jnlp.runtime.classloader.JNLPClassLoader.loadClass(JNLPClassLoader.java:1446)
at com.luciad.lucy.addons.decoders.aD.a(LuciadLightspeed_2020.1.19:86)
at com.luciad.internal.lucy.format.TLcyLazyModelEncoderWrapperFactory$TLcyLazyModelEncoder.b(LuciadLightspeed_2020.1.19:102)
at com.luciad.internal.lucy.format.TLcyLazyModelEncoderWrapperFactory$TLcyLazyModelEncoder.a(LuciadLightspeed_2020.1.19:94)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.luciad.internal.lucy.format.f.run(LuciadLightspeed_2020.1.19:186)
at java.base/java.lang.Thread.run(Thread.java:833)
We can see in the log (attached) that the corresponding libs containing the classes are correctly loaded and available:
1. jai_core-1.1.4+8-lcd.jar
2. jai_imageio-1.2+23-lcd.jar
Is there anything special about the JNLPClassLoader which could prohibit to load them?
Or any other idea on the root cause of this issue? Is there any workaround like a different classloader to fix this issue? It's of course no problem to start the application as standalone without OpenWebStart.