How to use MyFaces, Sun or other JSF packaged in a deployment in JBoss EAP 6
Issue
-
I'm migrating an application which packages MyFaces JSF, how do I configure JBoss to let me use MyFaces in JBoss EAP 6 instead of the default Sun JSF 2?
-
We use Sun RI JSF 2.0.3 + custom patches. This is the only version which works with our application and we cannot upgrade or downgrade the JSF version. This JSF is bundled with our EAR itself. We followed the steps mentioned in the migration document here like this
<exclusions> <module name="javax.faces.api" slot="main"/> <module name="com.sun.jsf-impl" slot="main"/> </exclusions>
Even after doing this, our application did not start. Got the following exception
Caused by: javax.faces.FacesException: Class org.jboss.as.web.deployment.jsf.JandexAnnotationProvider is not an instance of com.sun.faces.spi.AnnotationProvider
at com.sun.faces.spi.AnnotationProviderFactory.createAnnotationProvider(AnnotationProviderFactory.java:74) [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
at com.sun.faces.config.ConfigManager$AnnotationScanTask.<init>(ConfigManager.java:746) [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:324) [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
... 9 more
- We are seeing he problem is also described in: https://community.jboss.org/message/829624#829624 in JBoss EAP 6.1.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
- 6.3
- 6.2.0
- 6.1.0
- 6.0.1
- 6.0.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.