[英]Apache Wicket - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
[英]java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer when deploying to Google App Engine
我正在使用 Spring 框架和 Google App Engine 构建 Web 应用程序。 在开发服务器中它可以工作,但是在部署到 Google App Engine 服务器时我遇到了这个错误
Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
和
Initialization of bean failed; nested exception is java.lang.IncompatibleClassChangeError: class net.sf.cglib.core.DebuggingClassWriter has interface org.objectweb.asm.ClassVisitor as super class
第一个错误表明我似乎错过了 cglib.jar 中的 net.sf.cglib.proxy.Enhancer 但当我检查它已经存在时。 我无法理解第二个日志
我在类路径中使用了几个 jars 文件:
asm-4.0
asm-util-4.0
cglib-3.0
app engine sdk 1.7.6
spring framework 3.2.0
什么是问题? 我该如何解决?
提前致谢
看起来 Spring 3.2 已经包含 cglib 和 asm(请参阅发行说明的第 4.21 项: http : //static.springsource.org/spring-framework/docs/3.2.0.RELEASE/spring-framework-reference/html/new -in-3.2.html )。 它们在弹簧芯罐中。
您应该尝试从类路径中删除 asm 和 cglib jar,看看它是否有任何区别。
在 pom.xml 文件中从 appium java-client 中排除 cglib 依赖项,如下所示。 经过大量的谷歌搜索,这为我解决了这个问题。
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.3.0</version>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
</exclusions>
</dependency>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.