Zeroturnaround JRebel无法处理

时间:2017-07-11 05:25:42

标签: spring eclipse jrebel

ENV:

  1. JRebel for Eclipse 7.0.11
  2. 适用于Web开发人员的Eclipse Java EE IDE。版本:Mars.2版本(4.5.2)版本号:20160218-0600
  3. Spring 4.2.7.RELEASE
  4. 如果我使用了JRebel,我收到了这个错误:

        2017-07-11 01:07:30 JRebel: ERROR Class 'org.springframework.web.servlet.DispatcherServlet' could not be processed by org.zeroturnaround.javarebel.integration.spring.cbp.DispatcherServletCBP@org.apache.catalina.loader.WebappClassLoader@6524bbeb: java.lang.RuntimeException: org.zeroturnaround.bundled.javassist.NotFoundException: org.springframework.context.ApplicationContextAware
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:213)
        at org.zeroturnaround.bundled.javassist.CtClassType.makeFieldCache(SourceFile:900)
        at org.zeroturnaround.bundled.javassist.CtClassType.getMembers(SourceFile:891)
        at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredField2(SourceFile:1025)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:979)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:987)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:994)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField(SourceFile:960)
        at org.zeroturnaround.bundled.javassist.CtClass.getField(SourceFile:835)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.fieldAccess(SourceFile:837)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atFieldRead(SourceFile:803)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMember(SourceFile:988)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atMember(SourceFile:66)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Member.accept(SourceFile:39)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(SourceFile:665)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(SourceFile:157)
        at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(SourceFile:46)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(SourceFile:242)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:330)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:351)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
        at org.zeroturnaround.bundled.javassist.compiler.Javac.compileStmnt(SourceFile:567)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfterAdvice(SourceFile:892)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:851)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:792)
        at org.zeroturnaround.javarebel.integration.spring.cbp.DispatcherServletCBP.process(DispatcherServletCBP.java:44)
        at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(SourceFile:78)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:376)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:365)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:322)
        at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(SourceFile:34)
        at com.zeroturnaround.javarebel.rh.transform(SourceFile:106)
        at java.lang.ClassLoader.defineClass(ClassLoader.java)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:152)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5280)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.zeroturnaround.bundled.javassist.NotFoundException: org.springframework.context.ApplicationContextAware
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:201)
        ... 51 more
    
    2017-07-11 01:07:30 JRebel: ERROR Class 'ch.qos.logback.core.ContextBase' could not be processed by org.zeroturnaround.jrebel.integration.logback.cbp.ContextBaseCBP@org.apache.catalina.loader.WebappClassLoader@6524bbeb: java.lang.RuntimeException: org.zeroturnaround.bundled.javassist.NotFoundException: ch.qos.logback.core.Context
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:213)
        at org.zeroturnaround.bundled.javassist.CtClassType.makeFieldCache(SourceFile:900)
        at org.zeroturnaround.bundled.javassist.CtClassType.getMembers(SourceFile:891)
        at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredField2(SourceFile:1025)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:979)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:987)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField(SourceFile:960)
        at org.zeroturnaround.bundled.javassist.CtClass.getField(SourceFile:835)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.fieldAccess(SourceFile:837)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atFieldRead(SourceFile:803)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMember(SourceFile:988)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atMember(SourceFile:66)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Member.accept(SourceFile:39)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(SourceFile:665)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(SourceFile:157)
        at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(SourceFile:46)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(SourceFile:242)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:330)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
        at org.zeroturnaround.bundled.javassist.compiler.Javac.compileStmnt(SourceFile:567)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfterAdvice(SourceFile:892)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:851)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:792)
        at org.zeroturnaround.javarebel.integration.support.CBPs$DirectProcessorImpl.insertAfterLeafCtors(SourceFile:229)
        at org.zeroturnaround.jrebel.integration.logback.cbp.ContextBaseCBP.process(ContextBaseCBP.java:12)
        at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(SourceFile:78)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:376)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:365)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:322)
        at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(SourceFile:34)
        at com.zeroturnaround.javarebel.rh.transform(SourceFile:106)
        at java.lang.ClassLoader.defineClass(ClassLoader.java)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at com.zeroturnaround.javarebel.rp.a(SourceFile:118)
        at com.zeroturnaround.javarebel.rp.a(SourceFile:299)
        at com.zeroturnaround.javarebel.rh.transform(SourceFile:122)
        at java.lang.ClassLoader.defineClass(ClassLoader.java)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
        at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:59)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:50)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
        at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
        at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at org.springframework.web.context.AbstractContextLoaderInitializer.<init>(AbstractContextLoaderInitializer.java:44)
        at org.springframework.web.servlet.support.AbstractDispatcherServletInitializer.<init>(AbstractDispatcherServletInitializer.java:60)
        at org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer.<init>(AbstractAnnotationConfigDispatcherServletInitializer.java:39)
        at id.co.bippo.springapp.BippoWebAppInitializer.<init>(BippoWebAppInitializer.java:34)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.__newInstance(DelegatingConstructorAccessorImpl.java:45)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:152)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5280)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.zeroturnaround.bundled.javassist.NotFoundException: ch.qos.logback.core.Context
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:201)
        ... 76 more
    

    2017-07-11 01:07:34 JRebel: ERROR Class 'org.springframework.core.type.classreading.CachingMetadataReaderFactory' could not be processed by org.zeroturnaround.javarebel.integration.spring.core.cbp.CachingMetadataReaderFactoryCBP@org.apache.catalina.loader.WebappClassLoader@6524bbeb: java.lang.RuntimeException: org.zeroturnaround.bundled.javassist.NotFoundException: org.springframework.core.type.classreading.MetadataReaderFactory
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:213)
        at org.zeroturnaround.bundled.javassist.CtClassType.makeFieldCache(SourceFile:900)
        at org.zeroturnaround.bundled.javassist.CtClassType.getMembers(SourceFile:891)
        at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredField2(SourceFile:1025)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:979)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:987)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField2(SourceFile:994)
        at org.zeroturnaround.bundled.javassist.CtClassType.getField(SourceFile:960)
        at org.zeroturnaround.bundled.javassist.CtClass.getField(SourceFile:835)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.fieldAccess(SourceFile:837)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atFieldRead(SourceFile:803)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atMember(SourceFile:988)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atMember(SourceFile:66)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Member.accept(SourceFile:39)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(SourceFile:665)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(SourceFile:157)
        at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(SourceFile:46)
        at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atCallExpr(SourceFile:665)
        at org.zeroturnaround.bundled.javassist.compiler.JvstTypeChecker.atCallExpr(SourceFile:157)
        at org.zeroturnaround.bundled.javassist.compiler.ast.CallExpr.accept(SourceFile:46)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(SourceFile:242)
        at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:330)
        at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
        at org.zeroturnaround.bundled.javassist.compiler.Javac.compileStmnt(SourceFile:567)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfterAdvice(SourceFile:892)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:851)
        at org.zeroturnaround.bundled.javassist.CtBehavior.insertAfter(SourceFile:792)
        at org.zeroturnaround.javarebel.integration.spring.core.cbp.CachingMetadataReaderFactoryCBP.process(CachingMetadataReaderFactoryCBP.java:26)
        at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(SourceFile:78)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:376)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:365)
        at com.zeroturnaround.javarebel.tt.a(SourceFile:322)
        at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(SourceFile:34)
        at com.zeroturnaround.javarebel.rh.transform(SourceFile:106)
        at java.lang.ClassLoader.defineClass(ClassLoader.java)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.<init>(ClassPathScanningCandidateComponentProvider.java:81)
        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.<init>(ClassPathBeanDefinitionScanner.java:136)
        at org.springframework.web.context.support.AnnotationConfigWebApplicationContext.getClassPathBeanDefinitionScanner(AnnotationConfigWebApplicationContext.java:276)
        at org.springframework.web.context.support.AnnotationConfigWebApplicationContext.loadBeanDefinitions(AnnotationConfigWebApplicationContext.java:190)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.__refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)
        at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:510)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java)
        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 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.zeroturnaround.bundled.javassist.NotFoundException: org.springframework.core.type.classreading.MetadataReaderFactory
        at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile3(SourceFile:201)
        ... 60 more
    

    如果我没有使用JRebel,错误就消失了......

1 个答案:

答案 0 :(得分:2)

使用早于7.0.70的Tomcat?发布了JRebel版本7.0.12,应修复这些错误,因此请尝试更新JRebel for Eclipse插件。