12 Replies Latest reply on Jun 13, 2012 1:03 PM by suraj chhetry

    myfaces 1.1 in JBoss 7.1

    Clifton Sothoron Newbie

      Our application depends on myfaces 1.1.5. The necessary jar files are in my WEB-INF/lib.  I've created a jboss-deployment-structure.xml file with the following:


      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">



                <module name="javax.faces.api" slot="main"/>

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





      However, this does not work. I get the following errors:


      POST_MODULE: Failed to process phase POST_MODULE of deployment WebApp.war


      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class com.sun.fa


      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcesso



      Caused by: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener


      What do I have to do to get JBoss 7.1/7.0 to allow my application to use myfaces 1.1.5? 


      Thanks in Advance,


      Clifton Sothoron

        • 1. Re: myfaces 1.1 in JBoss 7.1
          Dee Kay Newbie

          Hello Clifton,


          i'm facing the same problem (migration from AS6.1 to 7).

          Any solution?



          Kind regards



          • 2. Re: myfaces 1.1 in JBoss 7.1
            Clifton Sothoron Newbie

            Sorry Daniel,

            I don't have a solution at this time.  I hope to get back to this.




            • 3. Re: myfaces 1.1 in JBoss 7.1
              Dee Kay Newbie

              Hi Clif,


              i finally solved my problem. My aim was to use JSF 1.2 in AS7 in combination with MyFaces.

              Finally i packaged


              - javaee.jar

              - jsf-api.jar

              - jsf-impl.jar


              from JEE5 and


              - myfaces-api-1.x.jar

              - myfaces-impl-1x.jar


              in my project and it runs really fine now.


              You should give it a try ... :-)





              • 4. Re: myfaces 1.1 in JBoss 7.1
                Martin Reinhardt Newbie

                @Daniel, did you use the same settings for the jboss-deployment-structure.xml as above? I've got this issue, also

                • 5. Re: myfaces 1.1 in JBoss 7.1
                  Stan Silvert Master

                  Don't use both jsf-api.jar and myfaces-api-1.x.jar.  These two jars contain different versions of the same classes.  Don't use jsf-impl.jar either as it is the Mojarra implementation of the classes in myfaces-impl. 


                  For MyFaces 1.x, use WAR_BUNDLES_JSF_IMPL.



                  • 7. Re: myfaces 1.1 in JBoss 7.1
                    Dee Kay Newbie

                    Hi Martin,


                    i simply added these JARs to the classpath.

                    And as Stan mentioned, add this fragment to your web.xml.













                    • 8. Re: myfaces 1.1 in JBoss 7.1
                      Martin Reinhardt Newbie

                      can you post your web.xml and faces-config.xml?

                      • 9. Re: myfaces 1.1 in JBoss 7.1
                        Clifton Sothoron Newbie


                        I finally got back to this issue. Your fix resolved my problem.


                        Many thanks,



                        • 10. Re: myfaces 1.1 in JBoss 7.1
                          suraj chhetry Newbie

                          Dear All,

                            I have same issue. I am getting following error when iam using myfaces with jboss 7.1.1 Final.  Here is my stacktrace


                          Error configuring application listener of class com.sun.faces.config.ConfigureListener: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener from [Module "deployment.etopup-ear.ear.etopup.war:main" from Service Module Loader]

                                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                    at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                                    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3342) [jbossweb-7.0.13.Final.jar:]

                                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

                                    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_31]

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_31]

                                    at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_31]



                          Here is dependancy POM


                          <!-- JSF -->














                          and web.xml






                          • 11. Re: myfaces 1.1 in JBoss 7.1
                            Clifton Sothoron Newbie


                            I included myfaces-api-1.1.5.jar and myfaces-impl-1.1.5.jar in WEB-INF/lib along with the changed web.xml. That was done to support myfaces 1.1. I have no choice about what version to use.


                            You indicated version 2.1.7 in your POM.  JBoss includes JSF 2.1. Why don't you just use what JBoss bundles?  In any event, did you include and api and the impl jar files in WEBiINF/lib?





                            • 12. Re: myfaces 1.1 in JBoss 7.1
                              suraj chhetry Newbie

                              Dear Clifton,

                                 there are a lot of performance comparision between mojjara and myfaces and it says myfaces is much faster than mojarra you can find details here