[Java] Error/exception during APM agent deployment

Hello Team,
While deploying APM agent to java application, observed below exception/error. Any assistance on this is greatly appreciated.

<org.aspectj.weaver.loadtime.Aj> <Application_Server_FQDN> <dpm_server1> <[STANDBY] ExecuteThread: ‘2’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApiHelper$1
org.aspectj.weaver.BCException: Whilst processing type ‘Lcom/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApiHelper$1;’ - cannot cast the outer type to a reference type. Signature=Lcom/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApiHelper; toString()=com.nr.instrumentation.javax.ws.rs.api.JavaxWsRsApiHelper class=JavaxWsRsApiHelper
when processing type mungers


Kind Regards,
Sachin MS

Hello All,

Solution for this issue can be found out in the below link.
https://discuss.newrelic.com/t/java-custom-java-jmx-metrics-with-aspectj/146916

1 Like

Hello @sachinms123.

I hope you are well!

Thank you for reaching out with your issue, and then following up after finding a solution. Please reach out if you find you have further questions or anything we can help with.

Have a great day!

Hi,
Unfortunately the solution did not helped much. Issue still persists.
Kindly assist on this.

Kind Regards,
Sachin MS

Sorry to hear that, @sachinms123.

Thank you for reaching back out with an update. While this is out of my scope as I am not a support engineer, I am going to loop in one of our support engineers for assistance. Please note they will respond to this topic when available. Please reach out if there is anything else we can assist with in the mean time.

Hi @michaelfrederick,

Thanks for reaching out. Issue is fixed now. After following the 3rd option in the below github link, conflict agent deployment issue AspectJ has been resolved. Below info was updated in newrelic.yml

class_transformer:
    com.newrelic.instrumentation.jax-rs-1.0:
        enabled: false

https://github.com/newrelic/newrelic-java-agent/issues/347

Kind Regards,
Sachin MS

Hi there @sachinms123 -

I am very glad to hear that you got this resolved. Thank you so much for sharing the solution as well - that will help a lot of people!