-->
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: NewbieNoClassDefFoundError:javax/transaction/Synchronization
PostPosted: Wed Nov 24, 2004 2:58 pm 
Newbie

Joined: Wed Nov 24, 2004 2:44 pm
Posts: 13
Sorry for that Question, but I'm absolute New to Hibernate.

After starting my Class I got the following error stack:
net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
Oct 17, 2004 7:01:58 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
FINE: instantiated session factory
Oct 17, 2004 7:01:58 PM core.businessLogic.Main main
INFO: --- next: test.factory.openSession() ---
Exception
in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:313)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:326)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:334)
at core.businessLogic.Main.main(Main.java:61)

I can't find the class javax/transaction/Synchronization? Do I have a wrong SDK?

Regards Richard


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:59 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You are missing a required third party library. Start here (or at least with the first chapter of the reference documentation): http://www.hibernate.org/152.html


Top
 Profile  
 
 Post subject: Hibernate without J2EE lib?
PostPosted: Wed Dec 01, 2004 7:53 am 
Newbie

Joined: Wed Nov 24, 2004 2:44 pm
Posts: 13
I did a new start with hibernate 2.1.7 and it works after I installed J2EE and included j2ee.jar to the classpath.

Is it possible to run hibernate without this J2EE lib? I would like to use Java 5.

Regards Richard


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 01, 2004 9:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you need jta.jar a normal jar library which doesn't require a full j2ee installation ;)

And it works fine with jdk 1.5

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 3:00 pm 
Newbie

Joined: Wed Nov 24, 2004 2:44 pm
Posts: 13
Thank you! Now, it's running fine :)

Regards Richard


Top
 Profile  
 
 Post subject: Thanks a lot
PostPosted: Fri Feb 08, 2008 3:17 am 
Newbie

Joined: Fri Feb 08, 2008 3:05 am
Posts: 1
Location: Coimbatore , India
Hi max & all

I had face this problem and used max's suggestion then my application is working fine.

Thanks & Regards,
K.Elanges.


Top
 Profile  
 
 Post subject: NewbieNoClassDefFoundError:javax/transaction/Synchronization
PostPosted: Sat Feb 09, 2008 12:44 pm 
Newbie

Joined: Wed Jun 29, 2005 12:10 pm
Posts: 1
Location: Hamburg, Germany
I just found that IntelliJ IDEA 7.0.2 does not copy the jta.jar file when creating a new project that includes the Hibernate facet. All other required jars are present, though. Once I manually copy the jta.jar to my project's lib subdirectory the error goes away.

Since it cost me about an hour to resolve this, I thought I'd post it in case somebody else hits this particular wall.


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.