-->
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.  [ 7 posts ] 
Author Message
 Post subject: missing Synchronization class
PostPosted: Sat Dec 20, 2003 5:21 pm 
Beginner
Beginner

Joined: Sat Dec 20, 2003 5:09 pm
Posts: 38
Trying to get Hibernate set-up with Struts and Tomcat ... little luck. At this point I'm getting a very strange error:

java.lang.NoClassDefFoundError: javax/transaction/Synchronization

that happens when I invoke my action. Strack trace shows it's bailing here:

Session session = sf.openSession();

Really can't figure this one out. I verified I all have all the required jars, and if I look at debug output I see hibernate2.jar being loaded ???

Any help would be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 5:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Are you sure you are not missing jta.jar?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 5:44 pm 
Beginner
Beginner

Joined: Sat Dec 20, 2003 5:09 pm
Posts: 38
Well, you were right. I didn't have that jar in my WEB-INF directory. But I got to tell ya, that just added to my confusion. This page:

http://www.hibernate.org/hib_docs/refer ... start.html

Doesn't list jta.jar as being required, and the /lib/read.me says it's only required if I'm not using an Application Server. I'm using Tomcat 5 ... which is an application server, no? Why in the world would I need to include that manually?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 5:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No, actually Tomcat is no application server, it is just a servlet container. You can leave jta.jar if you are using a complete J2EE container, like JBoss, Websphere, Weblogic or whatever.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 5:50 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 6:04 am
Posts: 161
Location: Linz, Austria
You need to include jta.jar if not deploying to a JTA-enabled application server. Tomcat does not provide a JTA implementation out-of-the-box, so you need to include jta.jar there. You can add it to Tomcat's common/lib directory, though, instead of including it in your web app's WEB-INF/lib.

Juergen


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 20, 2003 6:18 pm 
Beginner
Beginner

Joined: Sat Dec 20, 2003 5:09 pm
Posts: 38
OK, cool. THanks for the TIP. I really appreciate it.


Top
 Profile  
 
 Post subject: Tomcat 5
PostPosted: Mon Apr 04, 2005 2:53 am 
Beginner
Beginner

Joined: Thu Nov 20, 2003 8:13 pm
Posts: 31
Location: Newport Beach, CA
Note:
For some reason, placing jta.jar in common/lib (or shared/lib, or WEB-INF/lib, for crying out loud!) did not work for me on Win2K with Tomcat 5.0.27. I had to add it to the CLASSPATH in bin/setclasspath.bat:

Code:
...

set CLASSPATH=%classpath%;e:\source\Libraries\jta\jars\jta-1_0_1B-classes.zip

...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.