jessin20161124 opened a new issue #8731:
URL: https://github.com/apache/skywalking/issues/8731


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   Java Agent (apache/skywalking-java)
   
   ### What happened
   
   I use custom classloader to launch application code. When I add the 
skywalking agent as the startup option, it fail to startup. My application code 
also use sofa-ark. I am not sure who can solve this problem. Please refer to 
https://github.com/sofastack/sofa-ark/issues/479 
   
   ### What you expected to happen
   
   startup normally when using skywalking agent option
   
   ### How to reproduce
   
   java  -javaagent:/Users/ruby/Downloads/agent/skywalking-agent.jar 
-Dserver.port=8081 -jar xxx-abc.jar
   
   
   ### Anything else
   
   the startup failure log is as follows:
   DEBUG 2022-03-23 15:41:33:654 main AgentPackagePath : The beacon class 
location is 
jar:file:/Users/ruby/Downloads/agent/skywalking-agent.jar!/org/apache/skywalking/apm/agent/core/boot/AgentPackagePath.class.
   INFO 2022-03-23 15:41:33:656 main SnifferConfigInitializer : Config file 
found in /Users/ruby/Downloads/agent/config/agent.config.
   Exception in thread "main" java.lang.reflect.InvocationTargetException
   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 
com.alipay.sofa.ark.bootstrap.MainMethodRunner.run(MainMethodRunner.java:48)
   at 
com.alipay.sofa.ark.bootstrap.AbstractLauncher.launch(AbstractLauncher.java:97)
   at 
com.alipay.sofa.ark.bootstrap.AbstractLauncher.launch(AbstractLauncher.java:49)
   at com.alipay.sofa.ark.bootstrap.ArkLauncher.main(ArkLauncher.java:35)
   Caused by: java.lang.ExceptionInInitializerError
   at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
   at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
   at ch.qos.logback.classic.Logger.info(Logger.java:579)
   at com.alipay.sofa.ark.common.log.ArkLogger.info(ArkLogger.java:168)
   at 
com.alipay.sofa.ark.container.service.ArkServiceContainer.start(ArkServiceContainer.java:75)
   at com.alipay.sofa.ark.container.ArkContainer.start(ArkContainer.java:141)
   at com.alipay.sofa.ark.container.ArkContainer.main(ArkContainer.java:99)
   ... 8 more
   Caused by: java.lang.reflect.InvocationTargetException
   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 ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java)
   ... 15 more
   Caused by: java.lang.reflect.InvocationTargetException
   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 
org.apache.skywalking.apm.dependencies.net.bytebuddy.dynamic.Nexus.initialize(Nexus.java:137)
   ... 20 more
   Caused by: java.lang.NoClassDefFoundError: 
Lorg/apache/skywalking/apm/agent/core/plugin/interceptor/enhance/ConstructorInter;
   at java.lang.Class.getDeclaredFields0(Native Method)
   at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
   at java.lang.Class.getDeclaredField(Class.java:2068)
   at 
org.apache.skywalking.apm.dependencies.net.bytebuddy.implementation.LoadedTypeInitializer$ForStaticField.onLoad(LoadedTypeInitializer.java:122)
   at 
org.apache.skywalking.apm.dependencies.net.bytebuddy.implementation.LoadedTypeInitializer$Compound.onLoad(LoadedTypeInitializer.java:192)
   at 
org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$InitializationStrategy$SelfInjection$Dispatcher$InjectingInitializer.onLoad(AgentBuilder.java:3083)
   ... 25 more
   Caused by: java.lang.ClassNotFoundException: 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ConstructorInter
   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at 
com.alipay.sofa.ark.bootstrap.ContainerClassLoader.loadClass(ContainerClassLoader.java:42)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   ... 31 more
   
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to