2020年5月19日 | Leave a comment 问题: Failed to start Quarkus: java.lang.RuntimeException: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [crawler.CloudDoc] Caused by: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class *** at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:138) at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer$HibernateEnhancingClassVisitor.hibernateEnhancement(HibernateEntityEnhancer.java:81) at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer$HibernateEnhancingClassVisitor.visitEnd(HibernateEntityEnhancer.java:74) at org.objectweb.asm.ClassReader.accept(ClassReader.java:721) at org.objectweb.asm.ClassReader.accept(ClassReader.java:401) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.handleTransform(QuarkusClassLoader.java:403) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:332) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:294) at java.base/java.lang.Class.forNameImpl(Native Method) at java.base/java.lang.Class.forName(Class.java:410) at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:36) ... 24 more Caused by: java.lang.UnsupportedOperationException at net.bytebuddy.jar.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248) at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:651) at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:391) at net.bytebuddy.pool.TypePool$Default.parse(TypePool.java:1051) at net.bytebuddy.pool.TypePool$Default.doDescribe(TypePool.java:1035) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.access$401(TypePool.java:1115) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.doResolve(TypePool.java:1190) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1252) at net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getSuperClass(TypeDescription.java:7051) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignable(TypeDescription.java:6563) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignableTo(TypeDescription.java:6596) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignableTo(TypeDescription.java:6591) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.collectCollectionFields(EnhancerImpl.java:398) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.doEnhance(EnhancerImpl.java:189) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:132) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$$Lambda$468.000000008DC64420.apply(Unknown Source) at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:141) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:132) ... 34 more 123456789101112131415161718192021222324252627282930313233 Caused by: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class *** at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:138) at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer$HibernateEnhancingClassVisitor.hibernateEnhancement(HibernateEntityEnhancer.java:81) at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer$HibernateEnhancingClassVisitor.visitEnd(HibernateEntityEnhancer.java:74) at org.objectweb.asm.ClassReader.accept(ClassReader.java:721) at org.objectweb.asm.ClassReader.accept(ClassReader.java:401) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.handleTransform(QuarkusClassLoader.java:403) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:332) at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:294) at java.base/java.lang.Class.forNameImpl(Native Method) at java.base/java.lang.Class.forName(Class.java:410) at io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService.classForName(FlatClassLoaderService.java:36) ... 24 moreCaused by: java.lang.UnsupportedOperationException at net.bytebuddy.jar.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248) at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:651) at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:391) at net.bytebuddy.pool.TypePool$Default.parse(TypePool.java:1051) at net.bytebuddy.pool.TypePool$Default.doDescribe(TypePool.java:1035) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.access$401(TypePool.java:1115) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.doResolve(TypePool.java:1190) at net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1252) at net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getSuperClass(TypeDescription.java:7051) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignable(TypeDescription.java:6563) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignableTo(TypeDescription.java:6596) at net.bytebuddy.description.type.TypeDescription$AbstractBase.isAssignableTo(TypeDescription.java:6591) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.collectCollectionFields(EnhancerImpl.java:398) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.doEnhance(EnhancerImpl.java:189) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:132) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$$Lambda$468.000000008DC64420.apply(Unknown Source) at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:141) at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:132) ... 34 more 解决: 引入了 一些jar 造成 有些jar 版本乱了 pom.xml 中找到对应的影响依赖项目,排除掉 <exclusion> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId> </exclusion> 1234 <exclusion> <groupId>net.bytebuddy</groupId> <artifactId>byte-buddy</artifactId></exclusion> 参考: