0 Replies Latest reply on Mar 12, 2010 10:09 AM by Nair Sudeep

    Tomhawk Or Prime Faces integration - EAR Class loader issues

    Nair Sudeep Newbie
      Hello Everyone,

      I had a weird ClassLoader issue when Tomahawk 1.1.9 was integrated to a Seam Generated Project.  Spent much time on this issue and finally figured out it's a class loader issue.

      For those who have the class loader issues and are new to seam like me, Here is the solution I got working. I thought I will just post it here just incase anyone else finds it useful (Beginners might, Experts will have better solutions, Please share that so that we can all know the right ways to do these things). 

      I think if there are no comments from anyone, I would continue using any thirdparty UI component with SEAM in same way. [ I tested Prime faces and it worked the same way]



      Surprisingly, For me to get it working, I Had to MOVE all the libs in WEB-INTF/lib folder of WAR inside the EAR to the /LIB directory of EAR.
      So, I commented out the portion in the build.xml where it says to prevent LIBS being copied to WEB-INF/lib folder.

      '
      <!--      <copy todir="${war.dir}/WEB-INF/lib">
                  <fileset dir="${lib.dir}">
                      <includesfile name="deployed-jars-war.list"/>
                      <exclude name="jboss-seam-gen.jar"/>
                      <exclude name="jboss-seam-debug.jar" unless="is.debug"/>
      </fileset>
      </copy>-->

      '

      Then I PUT all libs from deployers-wars-jars.lst to deployers-ear-jars list in the project folder. Here is the list of libs I used for Tomahawk. I put the Deployers list I am using towards end of the post.



      created a MANIFEST.MF file with content
      Class-Path: lib/
      in resources/META-INF of the project.

      Then Added the following block to Build.xml
      '
              <copy todir="${war.dir}/META-INF/">
                  <fileset dir="${basedir}/resources/META-INF/">
                      <include name="MANIFEST.MF"/>
                 </fileset>
              </copy>
      '


      Build it, use Tomahawk tags Or PrimeFaces Tags in your project, It all works!

      This post helps only after you configure Myfaces Extension filter in your web.xml and put all necessary dependencies for Tomhawk.  I am stopping from where the following post ended. If you need help to configure tomahawk.

      SCHEDULE works like charm And is Better than Rich Faces Schedule AND it co-exists with Rich Faces ..


      Here is the deployers-ears-jars list if someone is interested.

      antlr-runtime.jar
      commons-beanutils.jar
      core.jar
      drools-templates.jar
      drools-decisiontables.jar
      drools-compiler.jar
      drools-api.jar
      drools-core.jar
      groovy-all.jar
      janino.jar
      jboss-el.jar
      jboss-seam-remoting.jar
      jbpm-jpdl.jar
      mvel2.jar
      richfaces-api.jar]

      #Tomahawk stuff.
      tomahawk-1.1.9.jar
      commons-el-1.0.jar
      commons-fileupload-1.2.1.jar
      commons-logging-1.1.1.jar
      commons-collections-3.2.1.jar
      commons-codec-1.3.jar
      commons-validator-1.3.1.jar
      commons-lang-2.4.jar

      #LIBS from web-inf of war file.
      commons-digester.jar
      jboss-seam-debug.jar
      jboss-seam-excel.jar
      jboss-seam-ioc.jar
      jboss-seam-mail.jar
      jboss-seam-pdf.jar
      jboss-seam-resteasy.jar
      jboss-seam-rss.jar
      jboss-seam-ui.jar
      jsf-facelets.jar
      jxl.jar
      richfaces-impl.jar
      richfaces-ui.jar
      # You can remove the JARs for themes you aren't using
      darkX.jar
      glassX.jar
      laguana.jar