7 Replies Latest reply on Dec 15, 2006 2:32 PM by amitev

    Cannot run Seam on Tomcat

    amitev

      Hi all! I tryed seam on jboss but got the following exception:
      java.lang.NoClassDefFoundError: javax/persistence/Entity

      How to solve this?

        • 1. Re: Cannot run Seam on Tomcat

          Missing one or more of the Seam library dependencies in your Tomcat deploy. Make sure all the jars in the Seam lib directory are getting deployed with your web applications.

          Cheers.

          Mike.

          • 2. Re: Cannot run Seam on Tomcat
            amitev

             

            "quilleashm" wrote:
            Missing one or more of the Seam library dependencies in your Tomcat deploy. Make sure all the jars in the Seam lib directory are getting deployed with your web applications.

            Cheers.

            Mike.


            Are you sure? The exception tolds that seam looks for javax.persistence - but i'm using tomcat which is not a jee container.

            • 3. Re: Cannot run Seam on Tomcat

              That class should be in hibernate-all.jar.

              Did you follow one of the samples apps for your project structure?

              • 4. Re: Cannot run Seam on Tomcat
                amitev

                So I need hibernate jars when i don't need hibernate at all?

                • 5. Re: Cannot run Seam on Tomcat
                  amitev

                  I have ejb3-persistence.jar now in my lib directory. Now i get this exception:
                  java.lang.NoClassDefFoundError: javax/jms/ExceptionListener
                  at java.lang.Class.getDeclaredMethods0(....

                  I suspect that i'm not setting something right.

                  • 6. Re: Cannot run Seam on Tomcat

                    You'll probably chase your tail for a while here. If you don't want to put all the jars into the deploy you'll probably need to deactivate some of the seam built in components.

                    For example the one you are having trouble with now is the remoting component which you can deactivate like this

                     <component class="org.jboss.seam.remoting.messaging.SubscriptionRegistry" installed="false"/>
                    


                    inside your components.xml file. A lot of the components are installed by default but if they have functionality you don't need you can just mark this as not installed. Obviously if you do that you will lose a piece of the Seam functionality.

                    Look at the stack trace when you get a NoClassDefFoundError to see which component is causing the problem and then decide if you need it or not.

                    Cheers.

                    Mike.

                    • 7. Re: Cannot run Seam on Tomcat
                      amitev

                      Thank you!