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(java.base@11.0.6/ClassLoader.java:1989)
    at java.lang.System.initPhase3(java.base@11.0.6/System.java:2069)
Caused by: java.lang.ClassNotFoundException: com.caucho.loader.SystemClassLoader
    at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@11.0.6/BuiltinClassLoader.java:581)
    at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@11.0.6/ClassLoaders.java:178)
    at java.lang.ClassLoader.loadClass(java.base@11.0.6/ClassLoader.java:521)
    at java.lang.Class.forName0(java.base@11.0.6/Native Method)
    at java.lang.Class.forName(java.base@11.0.6/Class.java:398)
    at java.lang.ClassLoader.initSystemClassLoader(java.base@11.0.6/ClassLoader.java:1975)
    at java.lang.System.initPhase3(java.base@11.0.6/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!

Rick
  • 3,298
  • 3
  • 29
  • 47

1 Answers1

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")

Gigagram
  • 21
  • 2
  • I finally ended up rewriting my app against Spring Boot, so I won't be able to test this, but thanks for the answer! – Rick Oct 26 '20 at 19:26