How to use MyFaces, Sun or other JSF packaged in a deployment in JBoss EAP 6

Solution Verified - Updated -


  • 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

            <module name="javax.faces.api" slot="main"/>
            <module name="com.sun.jsf-impl" slot="main"/>           

    Even after doing this, our application did not start. Got the following exception

Caused by: javax.faces.FacesException: Class is not an instance of com.sun.faces.spi.AnnotationProvider
    at com.sun.faces.spi.AnnotationProviderFactory.createAnnotationProvider( [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
    at com.sun.faces.config.ConfigManager$AnnotationScanTask.<init>( [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
    at com.sun.faces.config.ConfigManager.initialize( [jsf-impl-2.0.3.jar:2.0.3-SNAPSHOT]
    ... 9 more


  • 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content