I am experiencing this SystemException when starting Tomcat 5.5.7 and the HibernatePersist servlet (HibernateUtil simple version).
I have tracked down the throwing of the exception to this piece of code in JDBCContext.java:
Code:
private boolean isJTATransactionInProgress(javax.transaction.Transaction tx) throws SystemException {
return tx != null && JTAHelper.isInProgress( tx.getStatus() );
}
The NoClassDefFoundError is being caused by the fact that java 1.5 does not have a javax.transaction.SystemException (in fact, the only SystemException seems to be in the corba libraries), but what would make isJTATransactionInProgress() throw the exception in the first place?
Any pointers would be appreciated.
Hibernate version: 3.0.2
Full stack trace of any exception that occurs:Quote:
SEVERE: Initial SessionFactory creation failed.
java.lang.NoClassDefFoundError: javax/transaction/SystemException
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
at com.davidhaynes.probe.HibernatePersist.<clinit>(HibernatePersist.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1025)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:900)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3823)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4087)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:590)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Name and version of the database you are using:mysql 4.1.11
Context.xml Code:
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="probe" path="/probe">
<Resource name="jdbc/probe"
type="javax.sql.DataSource"
auth="Container"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://learjet.xxxxx.com/probe"
username="xxxxx"
password="xxxxx"
maxActive="20"
maxIdle="5"
maxWait="1"
removeAbandoned="true"
logAbandondened="true"
/>
</Context>