spring web app monitor newrelic conflicts loadtimeweaver with entity manager
-
28-10-2019 - |
문제
A Spring web application is required to be monitor with newrelic. spring-agent is being load as loadTimeWeaver , spring agent uses for jpa load enhane and custom config ,when spring-agent and newrelic configure to load with java_opts
, when application deploying it throws an exception for loading jpa...
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor9 cannot access its superclass sun.reflect.ConstructorAccessorImpl Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor9 cannot access its superclass sun.reflect.ConstructorAccessorImpl Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor9 cannot access its superclass sun.reflect.ConstructorAccessorImpl at sun.misc.Unsafe.defineClass(Native Method)
how can i configure to load spring agent and newrelic(monitoring for web application performance management) without conflicts each other ?
해결책
One possible way to get spring agent loading