I transformate my application in a vaadin cdi with the next steps:
- Eliminate servelt-api depndency.
- Add vaadin-cdi dependency.
- Eliminate vaadinServlet class
- Annotate with @CDIUI(“”) my UI class
- Annotate with @CDIVIew my View class
Now when i try to deploy in wildfly i found the next error:
20:10:16,377 ERROR [org.jboss.msc.service.fail]
(MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit.“login-vaadin.war”.component.“uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet”.WeldInstantiator: org.jboss.msc.service.StartException in service jboss.deployment.unit.“login-vaadin.war”.component.“uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet”.WeldInstantiator: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:184)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:192)
at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:230)
at org.jboss.as.weld.injection.InjectionTargets.createInjectionTarget(InjectionTargets.java:60)
at org.jboss.as.weld.injection.WeldComponentService.start(WeldComponentService.java:120)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
… 3 more
Caused by: java.lang.IncompatibleClassChangeError: uoc.jdelgadot.login_vaadin.MyUI and uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet disagree on InnerClasses attribute
at java.lang.Class.getDeclaringClass0(Native Method)
at java.lang.Class.getDeclaringClass(Class.java:1235)
at java.lang.Class.getEnclosingClass(Class.java:1277)
at java.lang.Class.getSimpleBinaryName(Class.java:1443)
at java.lang.Class.isMemberClass(Class.java:1433)
at org.jboss.weld.util.reflection.Reflections.getNesting(Reflections.java:138)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedConstructor.initParameters(BackedAnnotatedConstructor.java:50)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedConstructor.initParameters(BackedAnnotatedConstructor.java:28)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedCallable.(BackedAnnotatedCallable.java:34)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedConstructor.(BackedAnnotatedConstructor.java:38)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedConstructor.of(BackedAnnotatedConstructor.java:32)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:168)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:161)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:49)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.(BackedAnnotatedType.java:157)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.(BackedAnnotatedType.java:161)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.(BackedAnnotatedType.java:161)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.(BackedAnnotatedType.java:62)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:46)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:80)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:77)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache$1.apply(ReentrantMapBackedComputingCache.java:55)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache$1.apply(ReentrantMapBackedComputingCache.java:51)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:64)
at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getCastValue(ReentrantMapBackedComputingCache.java:80)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
… 9 more
20:10:16,582 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) WFLYCTL0013: Operation (“add”) failed - address: ([(“deployment” => “login-vaadin.war”)]
) - failure description: {“WFLYCTL0080: Failed services” => {“jboss.deployment.unit."login-vaadin.war".component."uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet".WeldInstantiator” => “Failed to start service
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet
Caused by: java.lang.IncompatibleClassChangeError: uoc.jdelgadot.login_vaadin.MyUI and uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet disagree on InnerClasses attribute”}}
20:10:16,591 ERROR [org.jboss.as.server]
(management-handler-thread - 4) WFLYSRV0021: Deploy of deployment “login-vaadin.war” was rolled back with the following failure message:
{“WFLYCTL0080: Failed services” => {“jboss.deployment.unit."login-vaadin.war".component."uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet".WeldInstantiator” => “Failed to start service
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet
Caused by: java.lang.IncompatibleClassChangeError: uoc.jdelgadot.login_vaadin.MyUI and uoc.jdelgadot.login_vaadin.MyUI$MyUIServlet disagree on InnerClasses attribute”}}