IDEA JRebel插件热部署异常:JRebel: ERROR Class ..
原创 thinkJava 发表于:2020-03-24 15:34:31
  阅读 :3298   收藏   编辑
2020-03-24 15:04:41 JRebel: ERROR Class 'org.hibernate.validator.internal.engine.ValidatorFactoryImpl' could not be processed by org.zeroturnaround.jrebel.hibernate.validator.cbp.ValidatorFactoryImpl23CBP@sun.misc.Launcher$AppClassLoader@18b4aac2: org.zeroturnaround.bundled.javassist.CannotCompileException: [source error] no such field: beanMetaDataManagerMap
	at org.zeroturnaround.bundled.javassist.CtBehavior.insertBefore(JRebel:774)
	at org.zeroturnaround.bundled.javassist.CtBehavior.insertBefore(JRebel:734)
	at org.zeroturnaround.jrebel.hibernate.validator.cbp.ValidatorFactoryImpl23CBP.process(ValidatorFactoryImpl23CBP.java:69)
	at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:117)
	at com.zeroturnaround.javarebel.kn.a(JRebel:360)
	at com.zeroturnaround.javarebel.kn.a(JRebel:349)
	at com.zeroturnaround.javarebel.kn.a(JRebel:317)
	at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:133)
	at com.zeroturnaround.javarebel.jV.transform(JRebel:57)
	at java.lang.ClassLoader.defineClass(ClassLoader.java)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:38)
	at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:364)
	at org.springframework.boot.autoconfigure.BackgroundPreinitializer$ValidationInitializer.run(BackgroundPreinitializer.java:142)
	at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:104)
	at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:95)
	at java.lang.Thread.run(Thread.java:748)
Caused by: compile error: no such field: beanMetaDataManagerMap
	at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupField(JRebel:311)
	at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupFieldByJvmName(JRebel:297)
	at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.fieldAccess(JRebel:876)
	at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atFieldRead(JRebel:803)
	at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atExpr(JRebel:578)
	at org.zeroturnaround.bundled.javassist.compiler.ast.Expr.accept(JRebel:68)
	at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atVariableAssign(JRebel:249)
	at org.zeroturnaround.bundled.javassist.compiler.TypeChecker.atAssignExpr(JRebel:218)
	at org.zeroturnaround.bundled.javassist.compiler.ast.AssignExpr.accept(JRebel:39)
	at org.zeroturnaround.bundled.javassist.compiler.CodeGen.doTypeCheck(JRebel:242)
	at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(JRebel:330)
	at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(JRebel:50)
	at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(JRebel:351)
	at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(JRebel:50)
	at org.zeroturnaround.bundled.javassist.compiler.Javac.compileStmnt(JRebel:569)
	at org.zeroturnaround.bundled.javassist.CtBehavior.insertBefore(JRebel:754)
	... 25 more

原因

版本JRebel太低

解决

在IDEA中升级插件

File -> Settings -> Plugins 找到插件右键

jrebelupdate.png