Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Java 11 application using Resin 4.0.58 unable to start using 4.9.0 jar files


#1

Hey There,

I’m trying to use Resin to run my Java 11 application, which works without the newrelic javaagent jar attached just fine. When I try to add <jvm-arg>-javaagent:/usr/local/newrelic/apps/newrelic.jar</jvm-arg> to my resin config, I get these errors:

`Unexpected error (113) returned by AddToSystemClassLoaderSearch
Unable to add /usr/local/newrelic/apps/newrelic.jar to system class path - the system class loader does 
not define the appendToClassPathForInstrumentation method or the method failed
FATAL ERROR in native method: processing of -javaagent failed`

java.lang.ExceptionInInitializerError at com.caucho.loader.DynamicClassLoader.addRoot(DynamicClassLoader.java:538) at com.caucho.loader.SystemClassLoader.initClasspath(SystemClassLoader.java:205) at com.caucho.loader.SystemClassLoader.initClasspath(SystemClassLoader.java:156) at com.caucho.loader.SystemClassLoader.init(SystemClassLoader.java:117) at com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.java:1606) at com.caucho.loader.SystemClassLoader.loadClassImpl(SystemClassLoader.java:253) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1548) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1529) at java.logging/java.util.logging.LogManager$1.run(LogManager.java:234) at java.logging/java.util.logging.LogManager$1.run(LogManager.java:223) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.logging/java.util.logging.LogManager.<clinit>(LogManager.java:223) at java.logging/java.util.logging.Logger.demandLogger(Logger.java:648) at java.logging/java.util.logging.Logger.getLogger(Logger.java:717) at java.logging/java.util.logging.Logger.getLogger(Logger.java:701) at com.caucho.vfs.FilePath.<clinit>(FilePath.java:56) at com.caucho.vfs.Vfs.<clinit>(Vfs.java:414) at com.caucho.loader.DynamicClassLoader.appendToClassPathForInstrumentation(DynamicClassLoader.java:672) Caused by: java.lang.NullPointerException at java.logging/java.util.logging.Logger.demandLogger(Logger.java:654) at java.logging/java.util.logging.Logger.getLogger(Logger.java:717) at java.logging/java.util.logging.Logger.getLogger(Logger.java:701) at com.caucho.loader.Loader.<clinit>(Loader.java:54) ... 18 more java.lang.NoClassDefFoundError: Could not initialize class com.caucho.loader.JarLoader at com.caucho.loader.DynamicClassLoader.addRoot(DynamicClassLoader.java:538) at com.caucho.loader.SystemClassLoader.initClasspath(SystemClassLoader.java:205) at com.caucho.loader.SystemClassLoader.initClasspath(SystemClassLoader.java:156) at com.caucho.loader.SystemClassLoader.init(SystemClassLoader.java:117) at com.caucho.loader.DynamicClassLoader.loadClassImpl(DynamicClassLoader.java:1606) at com.caucho.loader.SystemClassLoader.loadClassImpl(SystemClassLoader.java:253) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1548) at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1529) at java.logging/java.util.logging.LogManager$1.run(LogManager.java:234) at java.logging/java.util.logging.LogManager$1.run(LogManager.java:223) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.logging/java.util.logging.LogManager.<clinit>(LogManager.java:223) at java.logging/java.util.logging.Logger.demandLogger(Logger.java:648) at java.logging/java.util.logging.Logger.getLogger(Logger.java:717) at java.logging/java.util.logging.Logger.getLogger(Logger.java:701) at com.caucho.vfs.FilePath.<clinit>(FilePath.java:56) at com.caucho.vfs.Vfs.<clinit>(Vfs.java:414) at com.caucho.loader.DynamicClassLoader.appendToClassPathForInstrumentation(DynamicClassLoader.java:672)

I’ve tried upgrading the jar files to the latest versions and upgraded resin to its latest version but to no avail.


#2

Hey @jason.ellers. I have some ideas that may be worth exploring. Do you happen to be using any other startup arguments such as -m for modules or -Djava.system.classloader ? Also, which JDK 11 are you using, OpenJDK?