So here is my configuration on Tomcat 5.5.. and Oracle10 which I'm using .
server.xml entry
------------------
<Context>
<Resource name="jdbc/testDS1" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:xe" username="jana" password="jana" maxActive="20" maxIdle="10" maxWait="-1" />
</Context>
web.xml entry at gwt-console-server.war\WEB-INF\
----------------------------------------------------------------------
<resource-ref>
<res-ref-name>jdbc/testDS1</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
So we have "persistence.xml" inside gwt-console-server.war\WEB-INF\classes\META-INF\ which has datasource(testDS1) entry.So Im not sure if we need to modify this file or not? I tried adding "context.xml" in META-INF with resource entry but that didn't help.
We need to tweak persistence.xml I belive to let Tomcat locate datasource and also persistemce.xml uses "org.hibernate.transaction.JBossTransactionManagerLookup" may be this lookup class should be changed.
Let me know if you have any fix/suggestion for this.
Error Log
==========================================================================
SEVERE: createMBeans: Throwable
java.lang.NullPointerException
at org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:1057)
at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:497)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:570)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:366)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:535)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:498)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:660)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:628)
at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:278)
at org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:129)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:693)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 4, 2011 11:20:29 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 4, 2011 11:20:29 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.31
Jan 4, 2011 11:20:29 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 4, 2011 11:20:29 AM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Context path must be configured
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3880)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4064)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
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:700)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 4, 2011 11:20:29 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jan 4, 2011 11:20:29 AM org.apache.catalina.mbeans.ServerLifecycleListener propertyChange
SEVERE: Exception handling Container property change
java.lang.NullPointerException
at org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:988)
at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:404)
at org.apache.catalina.mbeans.ServerLifecycleListener.processContainerPropertyChange(ServerLifecycleListener.java:1091)
at org.apache.catalina.mbeans.ServerLifecycleListener.propertyChange(ServerLifecycleListener.java:216)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at org.apache.catalina.core.ContainerBase.setLoader(ContainerBase.java:367)
at org.apache.catalina.core.StandardContext.setLoader(StandardContext.java:1347)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4092)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
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:700)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NullPointerException
at org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4099)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
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:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
... 6 more
==========================================================================
Thanks,
Anand