1 Reply Latest reply on Apr 15, 2008 4:43 PM by Jay Balunas

    Are the Tomcat instructions incomplete?

    jk;l jkl; Expert

      I built the Tomcat example in the seam distribution and followed the steps at this page but the built example didn't work.


      I noticed that using ant to build the example (in 2.0.1.GA) doesn't bundle persistence.xml into the META-INF. Is this intentional? Bundling it manually still doesn't result in the example successfully deploying on Tomcat 6.0.10.


      There seems to be a JAR file missing - what else needs to be done in order to make the sample Tomcat application run? Am I missing something, or are those instructions on the getting started section of this site incomplete?


      Thanks.



      15-Apr-2008 1:43:50 PM org.apache.catalina.core.StandardContext listenerStart
      SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.RuntimeException: exception invoking: startup
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:135)
           at org.jboss.seam.Component.callComponentMethod(Component.java:2090)
           at org.jboss.seam.Component.callCreateMethod(Component.java:2005)
           at org.jboss.seam.Component.newInstance(Component.java:1976)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
           at org.jboss.seam.init.Initialization.init(Initialization.java:583)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
           at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:448)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
           at org.jboss.seam.Component.callComponentMethod(Component.java:2090)
           at org.jboss.seam.Component.callCreateMethod(Component.java:2005)
           at org.jboss.seam.Component.newInstance(Component.java:1976)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
           at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
           at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
           at org.jboss.seam.init.Initialization.init(Initialization.java:583)
           at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
           at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:448)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type
           at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)
           at net.sf.cglib.core.KeyFactory.<clinit>(KeyFactory.java:66)
           at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
           at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
           at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
           at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
           at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
           at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
           at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
           at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
           at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
           at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
           at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
           at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
           at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
           at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
           at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
           at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81)
           at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        • 1. Re: Are the Tomcat instructions incomplete?
          Jay Balunas Novice

          There was a bug found in the build scripts for the JPA example because of some other updated libraries. 


          See JBSEAM-2773 for details.  It has been fixed for the next release of seam.


          The solution is to add the asm.jar to the archive.


          It was all that was needed to the example running on tomcat 6.0.16.


          Please check the jboss-seam-jpa/WEB-INF/classes/META-INF directory for the persistence.xml file.  That is where it is found in the example.