4 Replies Latest reply on Sep 23, 2008 7:36 PM by asavitsky

    Does Seam 2.0.2sp1 work with Tomcat 5.5.9?

    joe

      I'm trying to run the Tomcat with JBoss Embedded jpa booking example.  I run the build and deploy the war.  I then get the following error:



      ERROR [catalina.core.ContainerBase.[Catalina].[localhost].[/jboss-seam-jpa]] Error configuring application listener of class com.sun.faces.config.ConfigureListener
      java.lang.NoClassDefFoundError: javax/el/CompositeELResolver
              at java.lang.Class.getDeclaredConstructors0(Native Method)
              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
              at java.lang.Class.getConstructor0(Class.java:2671)
              at java.lang.Class.newInstance0(Class.java:321)
              at java.lang.Class.newInstance(Class.java:303)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3618)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104



      I find this class exists in el-api.jar which is not in the classpath.  So I add el-api.jar to the WEB-INF/lib directory.  I then get the following error:



      INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
      Sep 19, 2008 5:37:50 PM com.sun.faces.config.ConfigureListener installExpressionFactory
      SEVERE: Error Instantiating ExpressionFactory
      java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
              at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:164)
              at com.sun.faces.config.ConfigureListener.installExpressionFactory(ConfigureListener.java:1521)



      This library appears to be in el-ri.jar or JSP 2.1 jar.  Am I doing something wrong?  Is there a place that explains how to run seam applications on tomcat 5.5.x?  Any help is greatly appreciated!




        • 1. Re: Does Seam 2.0.2sp1 work with Tomcat 5.5.9?

          You seem to be missing the Sun EL libs. Check whether you have the el-api.jar and el-ri.jar in your classpath. I myself am running Seam on Tomcat 5.5.26 without any problems or extra setup steps.

          • 2. Re: Does Seam 2.0.2sp1 work with Tomcat 5.5.9?
            joe

            Thanks for the response Alex.  Are you using JBoss Embedded with Tomcat 5.5.26?  I am able to get this to work with Tomcat 5.5 without JBoss Embedded.  Using the Seam JPA example I run ant tomcat55 and everything works fine, but when I run ant jboss-embedded I get the above errors.  So, I'm wondering if I'm porting a seam EJB application from JBoss to Tomcat will I need to pull out all my EJB components and convert them into POJOs? 

            • 3. Re: Does Seam 2.0.2sp1 work with Tomcat 5.5.9?
              joe
              I got this to work.  I ran 'ant tomcat55' in seam/examples/jpa and this generated a distribution for tomcat55.  I copied the WEB-INF/lib directory to save and ran 'ant clean'.  I then ran 'ant jboss-embedded' and manually copied in the el-* jar files.  This appeared to work.  Is this a bug with the jboss-embedded make?  Is there an option to run this ant make with required libs for tomcat55?
              • 4. Re: Does Seam 2.0.2sp1 work with Tomcat 5.5.9?

                No, I'm using POJO components, thus no (need of) JBoss Embedded. To me, the gains of using full EJBs don't outweight the troubles of setting up the EJB container.