我以前也经历过类似的问题,我通过将cglib排除在jersey之外来解决这个问题(参见pom.xml)。然而,现在看来,这影响了应用程序的其他部分。 at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.initializeat java.lang.Thread.run(T
HelloWorldImpl();}Exception in thread "main" java.lang.IllegalStateException: CGLIBEither add CGLIB to the classpath or remove the following @Configuration bean definitions: [appConfigorg.springframework.context.annotation.ConfigurationClassPostP
bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.EnhancerInitialization of bean failed; nested exception is java.lang.IncompatibleClassChangeError: class net.sf.cglib.core.DebuggingClassWriterhas interface org.objectweb.
这是我使用Eclipse内部的存根运行Spec时获得的堆栈跟踪:at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at net.sf.cglib.core.AbstractClassGenerator<init>(AbstractClassGenerator.ja