玻璃鱼 + CDI 导致 IncompleteClassChangeError
第一次尝试 CDI。我正在使用 Glassfish v3。当我部署应用程序时,出现以下失败:
java.io.IOException: com.sun.enterprise.admin.cli.remote.RemoteFailureException: 加载应用程序时出现异常: org.glassfish.deployment.common.DeploymentException: java.lang.IncompleteClassChangeError: com.example.arizona.client.ArizonaService 和 com.example.arizona.client.ArizonaService$App 不同意 InnerClasses 属性
在 com.fuhrer.idea.glassfish.server.GlassfishServer3.doParseResponse(GlassfishServer3.java:28) 在 com.fuhrer.idea.glassfish.server.GlassfishServer3Base.parseResponse(GlassfishServer3Base.java:156) 在 com.fuhrer.idea.glassfish.server.GlassfishServer3Base.invoke(GlassfishServer3Base.java:127) 在 com.fuhrer.idea.glassfish.server.GlassfishServer3Base.handleDeployment(GlassfishServer3Base.java:78) 在 com.fuhrer.idea.javaee.server.JavaeeServerInstance$2.run(JavaeeServerInstance.java:131)
我应该提到的是,我什至实际上还没有使用注入或任何其他 CDI 功能。这只是为了理顺依赖关系。
Trying my hand at CDI for the first time. I'm using Glassfish v3. When I deploy my app, I get the following failure:
java.io.IOException:
com.sun.enterprise.admin.cli.remote.RemoteFailureException:
Exception while loading the app :
org.glassfish.deployment.common.DeploymentException:
java.lang.IncompatibleClassChangeError:
com.example.arizona.client.ArizonaService
and
com.example.arizona.client.ArizonaService$App
disagree on InnerClasses attributeat
com.fuhrer.idea.glassfish.server.GlassfishServer3.doParseResponse(GlassfishServer3.java:28)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.parseResponse(GlassfishServer3Base.java:156)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.invoke(GlassfishServer3Base.java:127)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.handleDeployment(GlassfishServer3Base.java:78)
at
com.fuhrer.idea.javaee.server.JavaeeServerInstance$2.run(JavaeeServerInstance.java:131)
I should mention that I'm not even actually using injection, or any other CDI features yet. This is just trying to get the dependencies straightened out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到过同样的问题,但是是 Tomcat 中的 Weld。对我来说,问题是由于将内部类定义更改为普通类而引起的。就我而言,结果是旧的内部类仍在类目录中,但有一个新的父类。
清理类目录对我有用。
I've had the same issue, but with Weld in Tomcat. Problem for me was caused by changing an inner class definition to a normal class. Resulted, in my case, in having the old innerclass still in the classes directory but with a new parent class.
Cleaning the classes directory worked for me.
将近一年后,我很遗憾地说我从未解决过这个问题,并且出于各种原因完全转向另一个堆栈:Tomcat、Wicket 和 Wicket-CDI,所有这些都对我很有用。
Nearly a year later I'm sorry to say that I never solved this, and for various reasons moved on to another stack altogether: Tomcat, Wicket and Wicket-CDI, all of which have worked great for me.