5 Replies Latest reply on Apr 11, 2007 1:37 AM by christian.bauer

    Where do the seam jars go in jboss?

    jcranwellward

      I'm building a webb app with Jboss 4.0.4 and the lastest build of Seam. I want my web app to be deployable on any jboss AS without seam being previously installed. Therefore I bundle the jars I need during my ant build and put the seam jars in WEB-INF/lib of my .war. I'm using facelets for the views so I have included the following jars:

      jboss-seam-ui.jar
      jboss-seam-debug.jar
      jsf-facelets.jar
      el-api.jar
      el-ri.jar"

      and "jboss-seam.jar" in the root of my .ear along with any other jars i have used for my .ejb3 package.

      However jboss is having trouble finding a component i have listed in my faces-config.xml which is located in the WEB-INF directory:

      15:18:27,073 INFO [FacesConfigurator] Reading config
      /WEB-INF/faces-config.xml
      15:18:27,182 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
      15:18:27,188 ERROR [ClassUtils] Class com.sun.facelets.FaceletViewHandler not found
      java.lang.ClassNotFoundException: No ClassLoaders found for: com.sun.facelets.FaceletViewHandler

      (exception stack)

      I also have the "jboss-seam.jar" and "jboss-seam-ui.jar"in the /default/lib directory of the server.

      Is the correct place to put the seam jars needed to use EJB3 and facelets?


        • 1. Re: Where do the seam jars go in jboss?
          christian.bauer

           


          I also have the "jboss-seam.jar" and "jboss-seam-ui.jar"in the /default/lib directory of the server.


          Remove those. And use a clean JBoss install with a clean seam-gen generated application skeleton from which you can see where everything goes. These generated skeletons are self-contained applications.


          • 2. Re: Where do the seam jars go in jboss?
            dajevtic

            Alternatively you can place all required jars like myfaces, trinidad, seam, ajax4jsf, richfaces, etc. into the jsf-libs folder of jboss-deploy/jbossweb-tomcat55.sar/jsf-libs dir.
            It keeps you EAR file small in case you deploy to a remote server with small upload bandwidth.
            I prefer this approach as I don't get ClassCastExceptions etc. when redeploying multiple times.

            • 3. Re: Where do the seam jars go in jboss?
              pmuir

              No, don't put the seam jars in jsf-libs - you'll see problems if you try to deploy more than one seam app to the server

              • 4. Re: Where do the seam jars go in jboss?
                jcranwellward

                At the moment I have the main jboss-seam.jar in the root of my .ear along with some other jars that are needed for a java library im using. All the jars that are needed in the web layer are in WEB-INF/lib:

                jboss-seam-ui.jar,
                ajax4jsf.jar,
                jsf-facelets.jar
                el-*.jar,
                jstl-1.1.0.jar,
                jboss-seam.debug.jar
                jbpm-3.1.4.jar

                I have also listed the following jars in my application.xml

                jboss-seam.jar
                el-api.jar
                el-ri.jar
                jbpm-3.1.4.jar

                I think the setup ive got eliminates the need for any jars to already exist in my jboss install, and i have only included the jars I need.

                Is this right?

                • 5. Re: Where do the seam jars go in jboss?
                  christian.bauer

                  You can verify this by using seam-gen to generate a skeleton structure and then comparing the generated EAR to yours.