You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to start New Relic Agent. Please remove -javaagent from your startup arguments and contact New Relic support.
java.lang.NoClassDefFoundError: java/rmi/UnexpectedException
at com.newrelic.agent.RPMServiceManagerImpl.createRPMService(RPMServiceManagerImpl.java:174)
at com.newrelic.agent.RPMServiceManagerImpl.<init>(RPMServiceManagerImpl.java:78)
at com.newrelic.agent.service.ServiceManagerImpl.doStart(ServiceManagerImpl.java:258)
at com.newrelic.agent.service.AbstractService.start(AbstractService.java:63)
at com.newrelic.agent.Agent.continuePremain(Agent.java:176)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.newrelic.bootstrap.BootstrapAgent.startAgent(BootstrapAgent.java:175)
at com.newrelic.bootstrap.BootstrapAgent.premain(BootstrapAgent.java:117)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.rmi.UnexpectedException
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
meiao
added
feature request
Suggestion for a new product enhancement or change
and removed
bug
Something isn't working as designed/intended
labels
Feb 5, 2025
There are 3 places where this exception is being thrown. One on RPMService and two on DataSenderImpl.
Indeed it would be better to send a more appropriate exception.
Description
On a small JRE created with JDeps I get
Expected Behavior
Agent works without the
java.rmi
JDK moduleTroubleshooting or NR Diag results
See above
Steps to Reproduce
Create a JRE with these modules:
and start the agent
Your Environment
Java 23
Additional context
The issue is this line:
newrelic-java-agent/newrelic-agent/src/main/java/com/newrelic/agent/RPMService.java
Line 54 in 5e745ea
Where an RMI exception is being abused instead of using a custom one.
The text was updated successfully, but these errors were encountered: