-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: javax.transaction.SystemException?
PostPosted: Wed May 04, 2005 1:32 pm 
Newbie

Joined: Wed May 04, 2005 1:10 pm
Posts: 8
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>

_________________
There's lies, damn lies and slashdot.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 04, 2005 1:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
System exception is only in the Java enterprise edition. The javax.transaction stuff in J2SE-5 is only the "client-side" exceptions relating corba access.

You need jta.jar which contains the transaction portion of the J2EE API. But, why are you using the JTA-transaction stuff? Have you integrated a TransactionManager into Tomcat (or maybe it comes with one nowadays)?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 04, 2005 2:01 pm 
Newbie

Joined: Wed May 04, 2005 1:10 pm
Posts: 8
steve wrote:
You need jta.jar which contains the transaction portion of the J2EE API. But, why are you using the JTA-transaction stuff? Have you integrated a TransactionManager into Tomcat (or maybe it comes with one nowadays)?


Thanks for the lead on the jta.jar. I'll get it and see if that helps. I am using the built-in Tomcat that comes with Netbeans 4.1, so perhaps the JTA stuff comes from there. I know I didn't specify it directly...

_________________
There's lies, damn lies and slashdot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.