OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled (resin, Ubuntu, OpenJDK 11)
Asked Answered
F

2

6

I've been running this old Caucho Resin (4.0.41) for many, many years on an Ubuntu box. I need to retire that server, so I'm trying to set up resin 4.0.64 on a new Ubuntu 18.04.4 server, and after a lot of poking and fiddling, it's launching, but ultimately failing early on with:

OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.caucho.loader.SystemClassLoader"). To use archived non-system classes, this property must be not be set
Error occurred during initialization of VM
java.lang.Error: com.caucho.loader.SystemClassLoader
    at java.lang.ClassLoader.initSystemClassLoader([email protected]/ClassLoader.java:1989)
    at java.lang.System.initPhase3([email protected]/System.java:2069)
Caused by: java.lang.ClassNotFoundException: com.caucho.loader.SystemClassLoader
    at jdk.internal.loader.BuiltinClassLoader.loadClass([email protected]/BuiltinClassLoader.java:581)
    at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass([email protected]/ClassLoaders.java:178)
    at java.lang.ClassLoader.loadClass([email protected]/ClassLoader.java:521)
    at java.lang.Class.forName0([email protected]/Native Method)
    at java.lang.Class.forName([email protected]/Class.java:398)
    at java.lang.ClassLoader.initSystemClassLoader([email protected]/ClassLoader.java:1975)
    at java.lang.System.initPhase3([email protected]/System.java:2069)

I can't seem to find any results googling for this, and I can't find any thing obvious that sets java.system.class.loader.

Any suggestions? Thanks!

Facial answered 13/4, 2020 at 11:43 Comment(0)
H
2

A similar error was discussed in the octave issue tracker about 1 month after this question was asked. They speculate the -Djava.system.class.loader=XXX line was added as a workaround for an old Sun JVM. Now that other JVMs are used, they have a patch that prevents the property from being set.

I invoked the following java code from octave, which worked in my case:

java.lang.System.clearProperty("java.system.class.loader")

Hindustani answered 26/10, 2020 at 1:3 Comment(1)
I finally ended up rewriting my app against Spring Boot, so I won't be able to test this, but thanks for the answer!Facial
I
1

The same problem occurs when Idea didn't find idea64.vmoptions file. The reason and solution I described in my another answer.

Ir answered 16/9, 2023 at 16:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.