3 Replies Latest reply on Feb 23, 2007 4:21 PM by Michael Harrison

    Simple example for Tomcat?

    Michael Harrison Newbie

      Hey everyone,

      I'm new to Seam and am very excited the framework. For reasons I won't go into, I need to deploy a simple example of a Seam app that uses a database to Tomcat.

      When I first installed Tomcat 6.0, I was able to successfully deploy the DVD store and Booking examples. However, now they deploy but give errors. I've cleaned out all caches, redeployed, etc., but to no avail.

      Another thing I tried was I created a simple seam app using seam-gen. I then generated the entities against a simple database with a single table. In the setup I specified I wanted to generate a WAR instead of an EAR. The WAR does not work in Tomcat. I found some documentation that specifies what changes need to take place in order to work on Tomcat. After making those changes, it still fails.

      To make a long story short (too late), does anyone have a very simple WAR file of a Seam app that works in Tomcat and uses a datasource?

      Many thanks,
      -Michael

        • 1. Re: Simple example for Tomcat?
          Gavin King Master

          (1) If you are working against current CVS, Tomcat deployment should be fixed now (it may also have been broken in 1.1.6, I'm not sure about that).


          (2) What errors do you get?

          • 2. Re: Simple example for Tomcat?
            Michael Harrison Newbie

            Just now I cleaned out my Tomcat 6 webapp folder and removed any cached stuff. I redeployed the booking application. It starts-up fine. However, whenever I try to submit a form it fails with the following errors:

            13:00:17,369 ERROR [SeamExceptionFilter] could not roll back transaction
            javax.naming.NamingException: Local server is not initialized
             at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
             at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
            ...
            
            13:00:20,962 ERROR [SeamExceptionFilter] uncaught exception
            javax.servlet.ServletException: Could not instantiate Seam component: register
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)


            I'll go and grab the latest from CVS and give that a go.

            Thank you for help!
            -Michael


            • 3. Re: Simple example for Tomcat?
              Michael Harrison Newbie

              Quick update:

              I downloaded the latest Seam from CVS (2/20/07). Everything now works fine on Tomcat...

              -Michael