Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ClassNotFoundException: org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsInter #1298

Closed
3 tasks
zouyx opened this issue May 31, 2018 · 16 comments
Assignees
Labels
question End user question and discussion.
Milestone

Comments

@zouyx
Copy link
Member

zouyx commented May 31, 2018

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Question

  • What do you want to know?

when added jvm arguments : -javaagent:E:\agent\skywalking-agent.jar , can't start application.


Bug

  • Which version of SkyWalking, OS and JRE?

SkyWalking:5.0.0 beta
JRE:jdk 1.8

  • Which company or project?

  • What happen?

My demo application error log as below:

Caused by: java.lang.reflect.InvocationTargetException: null
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.springframework.aop.support.MethodMatchers.(MethodMatchers.java)
... 49 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
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:122)
... 54 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/skywalking/apm/agent/core/plugin/interceptor/enhance/StaticMethodsInter;
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:99)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.implementation.LoadedTypeInitializer$Compound.onLoad(LoadedTypeInitializer.java:162)
at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$InitializationStrategy$SelfInjection$Dispatcher$InjectingInitializer.onLoad(AgentBuilder.java:2841)
... 59 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsInter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 65 common frames omitted


Requirement or improvement

  • Please describe about your requirements or improvement suggestions.
@wu-sheng
Copy link
Member

wu-sheng commented Jun 1, 2018

I think we need your demo application to see what is happening. SkyWalking is used in many companies and projects widely. It is hard to assume this is bug from our release ways.

I have following questions?

  1. Do you download our release from apache.skywalking.org ?
  2. Do you try to write some plugins?
  3. Are you using some middleware, which is not in our supported list?

@wu-sheng wu-sheng self-assigned this Jun 1, 2018
@wu-sheng wu-sheng added the question End user question and discussion. label Jun 1, 2018
@wu-sheng
Copy link
Member

wu-sheng commented Jun 1, 2018

At the same time, you package folder is not as I expected. E:\agent\skywalking-agent.jar.

This is my expected official release, the red mark is agent related.
image

@zouyx
Copy link
Member Author

zouyx commented Jun 1, 2018

@wu-sheng thx for your reply.

in my case , i want to connect SkyWalking in my IDEA . but it show me the exception as my question

1.i have downloaded lastest release 5.0.0-beta.

2.maybe future

3.how can i get the list?

@wu-sheng
Copy link
Member

wu-sheng commented Jun 1, 2018

I am not sure what is happening. What do you mean about connecting from idea? Do you want to debug agent?

First, please use official release to make your monitor works. Agent is very complex, don't try to understand that at the beginning.

The list is the docs. Supported libraries, frameworks.....

@wu-sheng
Copy link
Member

wu-sheng commented Jun 5, 2018

@zouyx Is there any update for this?

@zouyx
Copy link
Member Author

zouyx commented Jun 5, 2018

@wu-sheng

IDEA is IntelliJ IDEA: The Java IDE for Professional Developers

i have run SkyWalking successfully in Linux, but fail in IntelliJ IDEA , OS: windows.

fail log as my question

@wu-sheng
Copy link
Member

wu-sheng commented Jun 5, 2018

This is hard to know, we usually use Idea to develop for skywalking. But no such issue.

@zouyx zouyx closed this as completed Jun 9, 2018
@wu-sheng wu-sheng added this to the 5.0.0-beta2 milestone Jun 9, 2018
@yszzu1
Copy link

yszzu1 commented Dec 26, 2019

I have got the same problem, which the project depends on elasticsearch-6.3.2 . May be the reason is ES6 not compatible with skywalking ? @wu-sheng

@dmsolr
Copy link
Member

dmsolr commented Dec 26, 2019

I have got the same problem, which the project depends on elasticsearch-6.3.2 . May be the reason is ES6 not compatible with skywalking ? @wu-sheng

Hi, Which version of skywalking?

@yszzu1
Copy link

yszzu1 commented Dec 26, 2019

image

I found the reason: can't use classpath wrapper in IDEA.

@superbible
Copy link

image

I found the reason: can't use classpath wrapper in IDEA.

Thanks, your solution helped me. I environment is IntellJ IDEA 2019.2.4 +Skywalking 8.10

@icyfox-bupt
Copy link

meet the same error too, above solution worked, thanks.

@zouyx
Copy link
Member Author

zouyx commented Mar 23, 2021

meet the same error too, above solution worked, thanks.

thanks bro.

@alberta0714
Copy link

image

I found the reason: can't use classpath wrapper in IDEA.

Nice! Thanks bro!

@SSSDNSY
Copy link

SSSDNSY commented Mar 22, 2022

image

I found the reason: can't use classpath wrapper in IDEA.

thanks buddy

@mroldx
Copy link

mroldx commented Jul 6, 2022

Nice! Thanks bro!

@apache apache locked as resolved and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question End user question and discussion.
Projects
None yet
Development

No branches or pull requests

9 participants