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/12/03 06:23:33 UTC

[GitHub] [skywalking] YangXueJun opened a new issue #3996: javassist.compiler.CompileError: setSkyWalkingDynamicField(java.lang.Object)

YangXueJun opened a new issue #3996:  javassist.compiler.CompileError: setSkyWalkingDynamicField(java.lang.Object) 
URL: https://github.com/apache/skywalking/issues/3996
 
 
   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?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   
   Dubbo version: 2.7.3
   Operating System version: mac 
   Java version: 1.8
   skywalking 6.4
   
   
   - What happen?
   
   One service is exposed to Rest and dubbo at the same time, it will throw a RuntimeException.
   (当一个服务类同时暴露成为一个dubbo服务和Rest服务时,会抛出一个RuntimeException)
   
   
   code
   ```
   @RestController
   @Service
   public class ProviderDemoServiceImpl implements ProviderDemoService {
   
   
       @Autowired
       private GoodsStorageMapper goodsStorageMapper;
   
       /**
        * 描述功能
        * @param helloReqDto
        * @return HelloResDto
        * @author yangxuejun
        * @date 2019/11/26 上午10:48
        **/
       @Override
       public HelloResDto hello(HelloReqDto helloReqDto) {
   
           log.info(JSON.toJSONString(helloReqDto));
   
         
   
           return new HelloResDto("I'am fine!");
       }
   }
   
   
   ```
   
   
   error  log
   ```
   java.lang.RuntimeException: [source error] setSkyWalkingDynamicField(java.lang.Object) not found in com.topology.mamaezhan.cloud.pdemo.service.application.service.impl.ProviderDemoServiceImpl
   	at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:348)
   	at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:287)
   	at org.apache.dubbo.common.bytecode.Wrapper.makeWrapper$original$POGqGkKA(Wrapper.java:261)
   	at org.apache.dubbo.common.bytecode.Wrapper.makeWrapper$original$POGqGkKA$accessor$taGwTSLo(Wrapper.java)
   	at org.apache.dubbo.common.bytecode.Wrapper$auxiliary$azLLPFgY.call(Unknown Source)
   	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.StaticMethodsInter.intercept(StaticMethodsInter.java:86)
   	at org.apache.dubbo.common.bytecode.Wrapper.makeWrapper(Wrapper.java)
   	at org.apache.dubbo.common.bytecode.Wrapper.getWrapper(Wrapper.java:118)
   	at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory.getInvoker(JavassistProxyFactory.java:41)
   	at org.apache.dubbo.rpc.proxy.wrapper.StubProxyFactoryWrapper.getInvoker(StubProxyFactoryWrapper.java:118)
   	at org.apache.dubbo.rpc.ProxyFactory$Adaptive.getInvoker(ProxyFactory$Adaptive.java)
   	at org.apache.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:641)
   	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:576)
   	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:457)
   	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:415)
   	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:378)
   	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:336)
   	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:114)
   	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:60)
   	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:402)
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
   	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
   	at com.topology.mamaezhan.cloud.providerdemo.launcher.ProviderDemoLauncher.main(ProviderDemoLauncher.java:21)
   Caused by: javassist.CannotCompileException: [source error] setSkyWalkingDynamicField(java.lang.Object) not found in com.topology.mamaezhan.cloud.pdemo.service.application.service.impl.ProviderDemoServiceImpl
   	at javassist.CtNewMethod.make(CtNewMethod.java:79)
   	at javassist.CtNewMethod.make(CtNewMethod.java:45)
   	at org.apache.dubbo.common.bytecode.ClassGenerator.toClass(ClassGenerator.java:323)
   	... 33 common frames omitted
   Caused by: javassist.compiler.CompileError: setSkyWalkingDynamicField(java.lang.Object) not found in com.topology.mamaezhan.cloud.pdemo.service.application.service.impl.ProviderDemoServiceImpl
   	at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:749)
   	at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:695)
   	at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157)
   	at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46)
   	at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242)
   	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:330)
   	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
   	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
   	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
   	at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:398)
   	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:355)
   	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
   	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
   	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
   	at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292)
   	at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274)
   	at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44)
   	at javassist.compiler.Javac.compileMethod(Javac.java:169)
   	at javassist.compiler.Javac.compile(Javac.java:95)
   	at javassist.CtNewMethod.make(CtNewMethod.java:74)
   	... 35 common frames omitted
   ```

----------------------------------------------------------------
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