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

    myfaces 1.1 in JBoss 7.1

    cbsoth00

      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">

      <deployment>

            <exclusions>

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

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

             </exclusions>

      </deployment>

        </jboss-deployment-structure>

       

      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

      ces.config.ConfigureListener

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

      r.java:113)

       

      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
          happy_robot

          Hello Clifton,

           

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

          Any solution?

           

           

          Kind regards

           

          Daniel

          • 2. Re: myfaces 1.1 in JBoss 7.1
            cbsoth00

            Sorry Daniel,

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

            Best,

             

                 Clif...

            • 3. Re: myfaces 1.1 in JBoss 7.1
              happy_robot

              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 ... :-)

               

              Regards

               

              Daniel

              • 4. Re: myfaces 1.1 in JBoss 7.1
                mreinhardt

                @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
                  ssilvert

                  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.

                   

                  Stan

                  • 6. Re: myfaces 1.1 in JBoss 7.1
                    ssilvert
                    • 7. Re: myfaces 1.1 in JBoss 7.1
                      happy_robot

                      Hi Martin,

                       

                      i simply added these JARs to the classpath.

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

                       

                      <context-param>

                              <param-name>

                                  org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL

                              </param-name>

                              <param-value>true</param-value>

                      </context-param>

                       

                       

                      Regards

                       

                      Daniel

                      • 8. Re: myfaces 1.1 in JBoss 7.1
                        mreinhardt

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

                        • 9. Re: myfaces 1.1 in JBoss 7.1
                          cbsoth00

                          Daniel,

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

                           

                          Many thanks,

                           

                          Clif

                          • 10. Re: myfaces 1.1 in JBoss 7.1
                            surajchhetry

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

                              <dependency>

                                                          <groupId>org.apache.myfaces.core</groupId>

                              <artifactId>myfaces-api</artifactId>

                              <version>2.1.7</version>

                              </dependency>

                             

                              <dependency>

                                                          <groupId>org.apache.myfaces.core</groupId>

                              <artifactId>myfaces-impl</artifactId>

                              <version>2.1.7</version>

                              </dependency>

                            </dependencies>

                             

                            and web.xml

                            <context-param>

                                                <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

                              <param-value>true</param-value>

                            </context-param>


                             


                            • 11. Re: myfaces 1.1 in JBoss 7.1
                              cbsoth00

                              Suraj,

                              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?

                               

                              Best,

                                          Clif...

                               

                              • 12. Re: myfaces 1.1 in JBoss 7.1
                                surajchhetry

                                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

                                http://lu4242.blogspot.com/2012/05/understandingjsf-2-and-wicket.html