java.lang.IncompatibleClassChangeError: Found interface org.jboss.as.web.common.WebInjectionContainer, but class was expected
Issue
- Updating to JBoss EAP 7.3.10, JBoss EAP 7.4.2 or later, we see an error like:
2023-03-16 12:55:16,197 SEVERE [org.apache.myfaces.webapp.AbstractFacesInitializer] (ServerService Thread Pool -- 102) An error occured while initializing MyFaces: java.lang.reflect.InvocationTargetException: javax.faces.FacesException: java.lang.reflect.InvocationTargetException
at javax.faces.FactoryFinder.injectAndPostConstruct(FactoryFinder.java:420)
at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:519)
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:361)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:225)
at org.apache.myfaces.application.ViewHandlerImpl.<init>(ViewHandlerImpl.java:91)
at org.apache.myfaces.application.ApplicationImpl.<init>(ApplicationImpl.java:271)
at org.apache.myfaces.application.ApplicationImpl.<init>(ApplicationImpl.java:254)
at org.apache.myfaces.application.ApplicationFactoryImpl.createAndLogNewApplication(ApplicationFactoryImpl.java:55)
at org.apache.myfaces.application.ApplicationFactoryImpl.<init>(ApplicationFactoryImpl.java:50)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.faces.FactoryFinder.injectAndPostConstruct(FactoryFinder.java:415)
... 44 more
Caused by: java.lang.IncompatibleClassChangeError: Found interface org.jboss.as.web.common.WebInjectionContainer, but class was expected
at org.jboss.as.jsf.injection.MyFacesInjectionProvider.postConstruct(MyFacesInjectionProvider.java:51)
... 49 more
Environment
- JBoss Enterprise Application Platform (EAP)
- 7.3
- 7.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.