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 attribute
at 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.GlassfishS开发者_运维问答erver3Base.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.
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.
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.
精彩评论