hyfsy / hot-refresh

Hot refresh the class on the production environment
Apache License 2.0
3 stars 0 forks source link

SkywalkingAgent 的 Transform 内 debug一段时间后有时会出现 #17

Open hyfsy opened 1 year ago

hyfsy commented 1 year ago

2023-04-08 15:53:39 [ERROR] Failed to replace instrumentation class java.lang.ExceptionInInitializerError at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java) at sun.misc.Unsafe.defineAnonymousClass(Native Method) at java.lang.invoke.InnerClassLambdaMetafactory.spinInnerClass(InnerClassLambdaMetafactory.java:326) at java.lang.invoke.InnerClassLambdaMetafactory.buildCallSite(InnerClassLambdaMetafactory.java:194) at java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:304) at java.lang.invoke.CallSite.makeSite(CallSite.java:302) at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307) at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297) at sun.rmi.transport.Transport.setContextClassLoader(Transport.java:136) at sun.rmi.transport.Transport.serviceCall(Transport.java:193) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: Failed to init instrumentation at com.hyf.hotrefresh.core.agent.InstrumentationHolder.init(InstrumentationHolder.java:58) at com.hyf.hotrefresh.core.agent.InstrumentationHolder.(InstrumentationHolder.java:41) ... 22 more Caused by: java.lang.IllegalAccessError: tried to access method sun.instrument.InstrumentationImpl.findTransformerManager(Ljava/lang/instrument/ClassFileTransformer;)Lsun/instrument/TransformerManager; from class sun.instrument.InstrumentationImpl at sun.instrument.InstrumentationImpl.removeTransformer(InstrumentationImpl.java:108) at com.hyf.hotrefresh.core.agent.InstrumentationHolder.pilingInstrumentationSetStore(InstrumentationHolder.java:70) at com.hyf.hotrefresh.core.agent.InstrumentationHolder.init(InstrumentationHolder.java:49) ... 23 more