I need to be able to deploy Seam apps on Tomcat. I've setup the datasource, but keep getting this stack trace. Can anyone help me decipher the following errors? Many thanks! -Michael

00:34:59,593 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
00:34:59,781 FATAL [Ejb3Configuration] hibernate.cfg.xmlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] import.sqlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] jbpm.cfg.xmlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] messages_en.propertiesO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] META-INF/jboss-beans.xmlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] META-INF/persistence.xmlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] pooter-dev-ds.xmlO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] seam.propertiesO-:-Ofalse
00:34:59,781 FATAL [Ejb3Configuration] security.drlO-:-Ofalse
00:34:59,781 WARN [Ejb3Configuration] Overriding hibernate.transaction.factory_class is dangerous, this might break the EJB3 specification implementation
00:34:59,843 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
00:34:59,859 ERROR [NamingHelper] Could not obtain initial context
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)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
at org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
at org.jboss.seam.Component.callComponentMethod(Component.java:1810)
at org.jboss.seam.Component.callCreateMethod(Component.java:1725)
at org.jboss.seam.Component.newInstance(Component.java:1714)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:165)
at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:137)
at org.jboss.seam.init.Initialization.init(Initialization.java:479)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
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.start(ContainerBase.java:1015)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
00:34:59,859 FATAL [DatasourceConnectionProvider] Could not find datasource: java:comp/env/pooterDatasource
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)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
at org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
at org.jboss.seam.Component.callComponentMethod(Component.java:1810)
at org.jboss.seam.Component.callCreateMethod(Component.java:1725)
at org.jboss.seam.Component.newInstance(Component.java:1714)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:165)
at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:137)
at org.jboss.seam.init.Initialization.init(Initialization.java:479)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
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.start(ContainerBase.java:1015)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
00:34:59,859 WARN [Contexts] Could not destroy component: pooterEntityManagerFactory
java.lang.NullPointerException
at org.jboss.seam.core.EntityManagerFactory.shutdown(EntityManagerFactory.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
at org.jboss.seam.Component.callComponentMethod(Component.java:1802)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1733)
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:230)
at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:175)
at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:37)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3866)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4502)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4366)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Mike, don't give up! i too was developing for Tomcat5.5.20/Seam1.2 and had a lot of problems with conflicting versions of oh so many jar files (JAR Hell is evident when working within this environ, some of which is jsf related). So what I did, as a temporary work around is to subclass all seam related and myfaces related listeners specified in my web.xml, components.xml, faces-config.xml... and put log statements and try-catch blocks around each overriden method. The try-catch consumes all Throwables and prints log statements with stack trace. That allows me to continue developing without my pages throwing the underlying exceptions and making my life a bit less frustrating. Hope this helps. This is of course not recommended for production. You can directly email me at mrines77@gmail.com, if you prefer.MarkPS(Now I am moving to Tomcat 6.0.10 (just released) since it is supposed to support the new jsp and jsf standards. Probably going to have different problems but those will, again be relagated away from the page display.)

I had some errors like the ones you're seeing once upon a time when I had a resources directory set as both a source path and a module library path in my IDE.

Take a stop back and see if you can get one of the base Seam examples deploying under Tomcat ("ant deploy.tomcat" in any Seam directory).

If you can, then the problem is almost certainly something subtle in your WEB-INF directory and in your webapp's file layout. Pay special attention to WEB-INF and META-INF, and compare every single freaking file in there to the contents of the .war file from the Seam example.

It's nice to know that this problem *can* be solved. I've been able to deploy the examples to Tomcat using "ant deploy.tomcat". However, when I generate a simple example that uses EJB3 and MySql and try to get it to work on Tomcat, I'm always met with failure. The errors that I seem unable to fix are the following (I've abbreviated them):

Does anyone have a simple WAR file that works on Tomcat using MySql? Anyone?? Bueller? Bueller??

-Michael

and the following:

17:24:45,295 FATAL [DatasourceConnectionProvider] Could not find datasource: java:/testappDatasource
javax.naming.NamingException: Local server is not initialized
at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)