You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/01/16 09:08:55 UTC

[GitHub] [skywalking] dfsmallsky opened a new issue #4249: an't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

dfsmallsky opened a new issue #4249: an't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249
 
 
   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?
   can not see mysql trace
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   6.6.0   macos  1.8
   - Which company or project?
   sku 
   - What happen?
   If possible, provide a way for reproducing the error. e.g. demo application, component version.
   our project use sprintboot with multi datasources,when I trace, it only present dubbo and jedis ,and can not see mysql trace.
   I don't use spring devtools although.
   Could any person give some help?
   
   DEBUG 2020-01-16 17:00:40:919 main AbstractClassEnhancePluginDefine : prepare to enhance class com.mysql.jdbc.PreparedStatement by org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.PreparedStatementInstrumentation. 
   ERROR 2020-01-16 17:00:40:920 main SkyWalkingAgent : Enhance class com.mysql.jdbc.PreparedStatement error. 
   org.apache.skywalking.apm.agent.core.plugin.PluginException: Can't create InstanceMethodsAroundInterceptor.
   	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.<init>(InstMethodsInter.java:57)
   	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine.enhanceInstance(ClassEnhancePluginDefine.java:197)
   	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine.enhance(ClassEnhancePluginDefine.java:78)
   	at org.apache.skywalking.apm.agent.core.plugin.AbstractClassEnhancePluginDefine.define(AbstractClassEnhancePluginDefine.java:79)
   	at org.apache.skywalking.apm.agent.SkyWalkingAgent$Transformer.transform(SkyWalkingAgent.java:151)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Transformer$Compound.transform(AgentBuilder.java:2612)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$Transformation$Simple$Resolution.apply(AgentBuilder.java:10117)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.doTransform(AgentBuilder.java:10494)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10457)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.access$1500(AgentBuilder.java:10223)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10833)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer$LegacyVmDispatcher.run(AgentBuilder.java:10780)
   	at java.security.AccessController.doPrivileged(Native Method)
   	at org.apache.skywalking.apm.dependencies.net.bytebuddy.agent.builder.AgentBuilder$Default$ExecutingTransformer.transform(AgentBuilder.java:10380)
   	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
   	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
   	at java.lang.ClassLoader.defineClass1(Native Method)
   	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
   	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
   	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
   	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
   	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
   	at java.security.AccessController.doPrivileged(Native Method)
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   	at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1412)
   	at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4132)
   	at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4036)
   	at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:310)
   	at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
   	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.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:55)
   	at com.sun.proxy.$Proxy295.prepareStatement(Unknown Source)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:87)
   	at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
   	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85)
   	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
   	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
   	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:142)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
   	at com.sun.proxy.$Proxy294.query(Unknown Source)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
   	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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
   	at com.sun.proxy.$Proxy128.selectList(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
   	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
   	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
   	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
   	at com.sun.proxy.$Proxy243.getAll(Unknown Source)
   	at com.huatu.order.sal.refund.service.impl.OrderRefundReasonServiceImpl.init(OrderRefundReasonServiceImpl.java:47)
   	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.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:256)
   	at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:177)
   	at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:140)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
   	at org.springframework.boot.context.event.EventPublishingRunListener.finished(EventPublishingRunListener.java:101)
   	at org.springframework.boot.SpringApplicationRunListeners.callFinishedListener(SpringApplicationRunListeners.java:79)
   	at org.springframework.boot.SpringApplicationRunListeners.finished(SpringApplicationRunListeners.java:72)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
   	at com.huatu.sku.web.WebApplication.main(WebApplication.java:21)
   Caused by: java.lang.NoClassDefFoundError: org/apache/skywalking/apm/agent/core/plugin/interceptor/enhance/InstanceMethodsAroundInterceptor
   	at java.lang.ClassLoader.defineClass1(Native Method)
   	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
   	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
   	at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findClass(AgentClassLoader.java:144)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   	at java.lang.Class.forName0(Native Method)
   	at java.lang.Class.forName(Class.java:348)
   	at org.apache.skywalking.apm.agent.core.plugin.loader.InterceptorInstanceLoader.load(InterceptorInstanceLoader.java:76)
   	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.<init>(InstMethodsInter.java:55)
   	... 81 more
   Caused by: java.lang.ClassNotFoundException: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
   	at org.apache.skywalking.apm.agent.core.plugin.loader.AgentClassLoader.findClass(AgentClassLoader.java:152)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   	... 91 more
   
   ___
   ### Requirement or improvement
   - Please describe about your requirements or improvement suggestions.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575611589
 
 
   Yes, that makes sense too. SkyWalking agent doesn't support extClassLoader. If you have interests, welcome to add this case into the FAQ doc. https://github.com/apache/skywalking/blob/master/docs/en/FAQ/README.md
   
   Please reply whether you are going to do contribution or not. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575512854
 
 
   > @dfsmallsky do you have your own class loader in the application or what frameworks (like MyBatis, PageHelper, from your stack traces)? If you're using Spring Boot, it should be easy to create a reproduce project, I did encounter this problem because of class loader issue, if you're willing to help, maybe we can try to solve it, I need a minimal yet runnable reproduce application, can you create one in the GitHub @dfsmallsky
   
   Finally I resolve this!The problem is there is a mysql-connector-java.jar in my java ext path,I don't know how and why it is there...So when try to enhance mysql class, the classloader is extClassloader and can not find InstanceMethodsAroundInterceptor.
   Delete the jar in ext path,the mysql trace work!
   @kezhenxu94 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575073751
 
 
   so how does it happen?I know it is in apm-agent-core. @wu-sheng 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] dfsmallsky edited a comment on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
dfsmallsky edited a comment on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575512854
 
 
   > @dfsmallsky do you have your own class loader in the application or what frameworks (like MyBatis, PageHelper, from your stack traces)? If you're using Spring Boot, it should be easy to create a reproduce project, I did encounter this problem because of class loader issue, if you're willing to help, maybe we can try to solve it, I need a minimal yet runnable reproduce application, can you create one in the GitHub @dfsmallsky
   
   Finally I resolve this!The problem is there is a mysql-connector-java.jar in my java ext path,I don't know how and why it is there...So when try to enhance mysql class, the classloader is extClassloader and can not find InstanceMethodsAroundInterceptor.
   Delete the jar in ext path,the mysql trace work!
   @kezhenxu94 @wu-sheng 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575056194
 
 
   This is inside the agent core. You could simply search this class in the GitHub or source codes.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng closed issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
dfsmallsky commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-580625520
 
 
   > Yes, that makes sense too. SkyWalking agent doesn't support extClassLoader. If you have interests, welcome to add this case into the FAQ doc. https://github.com/apache/skywalking/blob/master/docs/en/FAQ/README.md
   > 
   > Please reply whether you are going to do contribution or not.
   
   Hi,I am going to work on my own APM project which uses Javassist and agent main,so I am sorry not to do contribution.... @wu-sheng but I can add something in README :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-575074975
 
 
   @dfsmallsky do you have your own class loader in the application or what frameworks (like MyBatis, PageHelper, from your stack traces)? If you're using Spring Boot, it should be easy to create a reproduce project, I did encounter this problem because of class loader issue, if you're willing to help, maybe we can try to solve it, I need a minimal yet runnable reproduce application, can you create one in the GitHub @dfsmallsky 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4249: Can't find org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
URL: https://github.com/apache/skywalking/issues/4249#issuecomment-580635972
 
 
   Sure. Have a nice journey on your own project. Good luck.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services