Java error on startup

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Java error on startup

Post by nico_g »

Hello,
I've been using UMS with success on Opensuse Tumbleweed during a few years.
I had to reinstall my server a few days ago with the last Tumbleweed snapshot (180816) and now ums doesn't work. I tried different versions (even with Java 8 or 7).
I'm using plasma5 with kernel 4.7
I always have the same error log on startup (even tried with a new user account) :
Exception in thread "main" java.lang.IllegalAccessError: superclass access check failed: class com.jgoodies.looks.windows.WindowsLookAndFeel (in unnamed module @0x4ddced80) cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @0x4ddced80
at java.lang.ClassLoader.defineClass1(java.base@9-internal/Native Method)
at java.lang.ClassLoader.defineClass(java.base@9-internal/ClassLoader.java:939)
at java.security.SecureClassLoader.defineClass(java.base@9-internal/SecureClassLoader.java:152)
at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base@9-internal/BuiltinClassLoader.java:553)
at jdk.internal.loader.BuiltinClassLoader.access$200(java.base@9-internal/BuiltinClassLoader.java:88)
at jdk.internal.loader.BuiltinClassLoader$3.run(java.base@9-internal/BuiltinClassLoader.java:466)
at jdk.internal.loader.BuiltinClassLoader$3.run(java.base@9-internal/BuiltinClassLoader.java:460)
at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method)
at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base@9-internal/BuiltinClassLoader.java:459)
at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base@9-internal/BuiltinClassLoader.java:406)
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:364)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)
at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
at net.pms.PMS.main(PMS.java:1173)

Thanks a lot for your help.

Nicolas
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Java error on startup

Post by Nadahar »

It seems to either be some issue with the Java version or that your installation is for some reason misidentified as Windows. Check your Java runtime installation, and try to install "standard" openJDK or Oracle JRE. net.pms.PMS:1173 (which triggers the error) doesn't make any sense for UMS 6.5, so to know exactly what triggers the error the correct version for the posted log is needed. I'm guessing that it's triggered by this line though. If the reason is misidentification by jgoodies it could be very hard for us to track down why, but it would be reasonable to guess that it is done either by JNA.Platform or some "home made" logic parsing OS strings that might fail to recognize your Opensuse version. It's still hard to imagine how failing to recognize the correct Linux version could end up interpreting the platform as Windows.
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Re: Java error on startup

Post by nico_g »

Thanks for your help.
I installed the standard (Opensuse) Java 9 and 8.
Is it possible that the uncorrect detection could be caused by the window manager (Plasma 5) ?
I maybe can try under Gnome ?
I have found on the web this ling, giving almost the same error :
https://bugs.openjdk.java.net/browse/JDK-8136366

I can try some tests this evening.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Java error on startup

Post by Nadahar »

I would find it very strange if Plasma would cause this. From the link you provided, the issue seems to be with Java 9. We haven't even tested UMS with Java 9 AFAIK, Java 9 isn't released by Oracle yet and isn't scheduled for release until 2017 I think. To be sure that Java 8 is used, I'd uninstall Java 9 and see if that resolves it.
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Re: Java error on startup

Post by nico_g »

I will try this, if there is no dependencies problem...
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Java error on startup

Post by Nadahar »

If you can't uninstall Java 9 you should try to find a way to make sure that Java 8 is being used. I don't know enough about Linux configuration of Java to know this, but there should be a way to do that at least.
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Re: Java error on startup

Post by nico_g »

I think I can choose java version with update-alternatives
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Re: Java error on startup

Post by nico_g »

I tried to change to java8 and jav7 and always the same error...
I will reboot and retest, and after test using gnome.
nico_g
Posts: 9
Joined: Mon Aug 22, 2016 4:58 pm

Re: Java error on startup

Post by nico_g »

i tested with gnome, even with a new user account and always the same error.
Is it a way to force the detection ?
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Java error on startup

Post by Nadahar »

It doesn't look like it's a misidentification, it seems to be tied to the Java 9 error you linked to. It doesn't help to choose Java 7 or 8 version of UMS if you run it on a Java 9 Virtual Machine. Have you tried uninstalling Java 9? If you look at the schedule for Java 9 you'll see that shipping anything with Java 9 now is really premature. I can't think of anything that would reasonably rely on Java 9 at this stage as Java 9 itself isn't finished.
Post Reply