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 2019/08/28 03:31:38 UTC
[GitHub] [skywalking] Liu-XinYuan opened a new issue #3358: dubbo 4.0 and
service class without method intercept failure
Liu-XinYuan opened a new issue #3358: dubbo 4.0 and service class without method intercept failure
URL: https://github.com/apache/skywalking/issues/3358
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Question or discussion
- [x] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
___
### Bug
- Which version of SkyWalking, OS and JRE?
skywalking 6.3 dubbo4.0
- Which company or project?
- What happen?
skywalking agent error
`ERROR 2019-08-28 11:18:19:519 RMI TCP Connection(2)-127.0.0.1 StaticMethodsInter : class[class com.alibaba.dubbo.common.bytecode.Wrapper] before static method[makeWrapper] intercept failure
java.lang.RuntimeException: [source error] empty try block
at com.alibaba.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:354)
at com.alibaba.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:293)
at org.apache.skywalking.apm.plugin.dubbo.patch.MakeWrapperInterceptor.makeWrapper(MakeWrapperInterceptor.java:204)
at org.apache.skywalking.apm.plugin.dubbo.patch.MakeWrapperInterceptor.beforeMethod(MakeWrapperInterceptor.java:55)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsInter.intercept(StaticMethodsInter.java:76)
at com.alibaba.dubbo.common.bytecode.Wrapper.makeWrapper(Wrapper.java)
at com.alibaba.dubbo.common.bytecode.Wrapper.getWrapper(Wrapper.java:89)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory.getInvoker(JavassistProxyFactory.java:40)
at com.alibaba.dubbo.rpc.proxy.wrapper.StubProxyFactoryWrapper.getInvoker(StubProxyFactoryWrapper.java:104)
at com.alibaba.dubbo.rpc.ProxyFactory$Adpative.getInvoker(ProxyFactory$Adpative.java)
at com.alibaba.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:516)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:469)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285)
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246)
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145)
at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:110)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at com.sinoservices.utils.application.AppContextLoaderListener.contextInitialized(AppContextLoaderListener.java:30)
at com.sinoservices.framework.core.SinoContextLoaderListener.contextInitialized(SinoContextLoaderListener.java:35)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4627)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5091)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1737)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
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.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
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: javassist.CannotCompileException: [source error] empty try block
at javassist.CtNewMethod.make(CtNewMethod.java:79)`
application error
`019-08-28 11:19:20 [ZkClient-EventThread-141-10.251.73.2:2181,10.251.73.9:2181,10.251.73.17:2181] [INFO ] com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry[info] - [DUBBO] Notify urls for subscribe url consumer://10.67.53.46/com.sinoservices.wms.basicdata.service.WmsForSkuService?application=lmdm&category=providers,configurators,routers&check=false&default.check=false&default.timeout=200000&dubbo=4.0.0&interface=com.sinoservices.wms.basicdata.service.WmsForSkuService&methods=saveCdWhSkuModels,saveAllSkuByOwnerCode&pid=14834&revision=0.0.1-YH-SNAPSHOT&side=consumer×tamp=1566962148805, urls: [empty://10.67.53.46/com.sinoservices.wms.basicdata.service.WmsForSkuService?application=lmdm&category=routers&check=false&default.check=false&default.timeout=200000&dubbo=4.0.0&interface=com.sinoservices.wms.basicdata.service.WmsForSkuService&methods=saveCdWhSkuModels,saveAllSkuByOwnerCode&pid=14834&revision=0.0.1-YH-SNAPSHOT&side=consumer×tamp=1566962148805], dubbo version: 4.0.0, current host: 10.67.53.46
[ERROR][2019-08-28 11:19:20 059][org.springframework.web.context.ContextLoader]-[Context initialization failed]
java.lang.RuntimeException: [source error] setSkyWalkingDynamicField(java.lang.Object) not found in com.sinoservices.gls.rule.service.impl.CdColorControlServiceImpl
at com.alibaba.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:354)
at com.alibaba.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:293)
at com.alibaba.dubbo.common.bytecode.Wrapper.makeWrapper$original$7GGGEOhz(Wrapper.java:346)
at com.alibaba.dubbo.common.bytecode.Wrapper.makeWrapper$original$7GGGEOhz$accessor$4e77kcdr(Wrapper.java)
at com.alibaba.dubbo.common.bytecode.Wrapper$auxiliary$0A95d5nh.call(Unknown Source)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsInter.intercept(StaticMethodsInter.java:86)
at com.alibaba.dubbo.common.bytecode.Wrapper.makeWrapper(Wrapper.java)
at com.alibaba.dubbo.common.bytecode.Wrapper.getWrapper(Wrapper.java:89)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory.getInvoker(JavassistProxyFactory.java:40)
at com.alibaba.dubbo.rpc.proxy.wrapper.StubProxyFactoryWrapper.getInvoker(StubProxyFactoryWrapper.java:104)
at com.alibaba.dubbo.rpc.ProxyFactory$Adpative.getInvoker(ProxyFactory$Adpative.java)
at com.alibaba.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:516)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:469)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285)
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246)
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145)
at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:110)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at com.sinoservices.utils.application.AppContextLoaderListener.contextInitialized(AppContextLoaderListener.java:30)
at com.sinoservices.framework.core.SinoContextLoaderListener.contextInitialized(SinoContextLoaderListener.java:35)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4627)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5091)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1737)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
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.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
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: javassist.CannotCompileException: [source error] setSkyWalkingDynamicField(java.lang.Object) not found in com.sinoservices.gls.rule.service.impl.CdColorControlServiceImpl
at javassist.CtNewMethod.make(CtNewMethod.java:79)
at javassist.CtNewMethod.make(CtNewMethod.java:45)
at com.alibaba.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:322)
... 74 more`
___
### Requirement or improvement
I found out that the service class has no methods, but our enhanced rewriting method does not take this into account, causing the try code block to be empty and compiling not to pass.
scheme
In fact, the new version of dubbo has taken this issue into consideration. Before judging the number of non-object methods before building the try block, we can take it as a solution.
----------------------------------------------------------------
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