We have an application that we have been deploying under JBoss 4.2.1 that we are now trying to deploy under Glassfish/Sun One AS version 9.0. The application deploys and works without errors under JBoss but throws an exception when deployed in Glassfish.
The application uses Seam 2.0.CR1 and Hibernate 3.2.1. I have copied the required libraries ( hibernate, etc .. ) to the as_install/lib directory. The application deploys and errors during Seam initialization with an error from Toplink.
As a side note, when I was trying to configure the datasources I was getting errors reported from Hibernate, not Toplink. As soon as those appeared to be fixed, I started getting the error below from Toplink. Also, the datasources do not appear in the JNDI view unless I disable then reenable them.
Thanks in advance for any information. I am new to Glassfish, so forgive any ignorance, and if I have left anything out please let me know.
Here is the Persistence unit information:
Datasource 1
<persistence xmlns="
http://java.sun.com/xml/ns/persistence"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="erp">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/erpDatasource</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="hibernate.default_schema" value="BuProd"/>
</properties>
</persistence-unit>
</persistence>
Datasource 2:
<persistence xmlns="
http://java.sun.com/xml/ns/persistence"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="core">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/coreDatasource</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="hibernate.default_schema" value="BuDev"/>
</properties>
</persistence-unit>
</persistence>
And the stacktrace:
[#|2007-11-08T06:57:10.219-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|2007-11-08 06:57:10,219 11109 [main] INFO org.jboss.seam.contexts.Contexts - starting up: core
|#]
[#|2007-11-08T06:57:10.438-0600|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;_RequestID=c6a7274f-b0f3-4e01-b81d-9c5843c241fa;|WebModule[/milton]Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NullPointerException
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:72)
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:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1965)
at org.jboss.seam.Component.callCreateMethod(Component.java:1880)
at org.jboss.seam.Component.newInstance(Component.java:1859)
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:98)
at org.jboss.seam.init.Initialization.init(Initialization.java:508)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1095)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:924)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1095)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
at org.apache.catalina.startup.Embedded.start(Embedded.java:920)
at com.sun.enterprise.web.WebContainer.start(WebContainer.java:794)
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:722)
at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:72)
at com.sun.enterprise.server.ondemand.ServiceGroup.startLifecycleServices(ServiceGroup.java:266)
at com.sun.enterprise.server.ondemand.WebServiceGroup.startLifecycleServices(WebServiceGroup.java:210)
at com.sun.enterprise.server.ondemand.WebServiceGroup.start(WebServiceGroup.java:60)
at com.sun.enterprise.server.ondemand.ServiceGroup$1.run(ServiceGroup.java:180)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.server.ondemand.ServiceGroup.startChildren(ServiceGroup.java:177)
at com.sun.enterprise.server.ondemand.MainServiceGroup.start(MainServiceGroup.java:45)
at com.sun.enterprise.server.ondemand.ServerEntryListenerImpl.notifyEntry(ServerEntryListenerImpl.java:72)
at com.sun.enterprise.server.ondemand.entry.ServerEntryHelper.sendEvent(ServerEntryHelper.java:62)
at com.sun.enterprise.server.ondemand.entry.ServerEntryHelper.generateAppLoaderEntryContext(ServerEntryHelper.java:47)
at com.sun.enterprise.server.AbstractLoader.generateEntryContext(AbstractLoader.java:831)
at com.sun.enterprise.server.AbstractLoader.notifyAppEvent(AbstractLoader.java:837)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:172)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:206)
at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:204)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:326)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
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:585)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
|#]
[#|2007-11-08T06:57:10.454-0600|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=10;_ThreadName=main;/milton;|Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/milton'|#]
[Message sent by forum member 'tzman' (tzman)]
http://forums.java.net/jive/thread.jspa?messageID=244539