-->
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.  [ 8 posts ] 
Author Message
 Post subject: problem when buildSessionFactory()
PostPosted: Mon Dec 01, 2003 6:18 am 
Newbie

Joined: Thu Nov 20, 2003 2:35 am
Posts: 7
Location: Thailand
I can't buildSessionFactory it have error code below


Exception in thread "main" java.lang.ExceptionInInitializerError
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:718)
at aa.main(aa.java:43)
Caused by: java.lang.IllegalStateException: No backend found
at net.sf.cglib.CodeGenerator.<init>(CodeGenerator.java:127)
at net.sf.cglib.KeyFactoryGenerator.<init>(KeyFactoryGenerator.java:93)
at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:229)
... 2 more

My mapping file is

<class name="db.Contact" table="contact">
<id name="ID" column="ID" unsaved-value="null">
<generator class="identity"/>
</id>
.
.
.
.
</class>

_________________
Rattapon P.


Top
 Profile  
 
 Post subject: Re: problem when buildSessionFactory()
PostPosted: Mon Dec 01, 2003 6:20 am 
Newbie

Joined: Thu Nov 20, 2003 2:35 am
Posts: 7
Location: Thailand
rattp wrote:
I can't buildSessionFactory it have error code below


Exception in thread "main" java.lang.ExceptionInInitializerError
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:718)
at aa.main(aa.java:43)
Caused by: java.lang.IllegalStateException: No backend found
at net.sf.cglib.CodeGenerator.<init>(CodeGenerator.java:127)
at net.sf.cglib.KeyFactoryGenerator.<init>(KeyFactoryGenerator.java:93)
at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:229)
... 2 more

My mapping file is

<class name="db.Contact" table="contact">
<id name="ID" column="ID" unsaved-value="null">
<generator class="identity"/>
</id>
.
.
.
.
</class>

I'm a beginner with hibernate wait for your help :>

_________________
Rattapon P.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 11:01 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Using RC1 ?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 11:50 am 
Beginner
Beginner

Joined: Thu Nov 20, 2003 12:29 pm
Posts: 39
Hi!

i have the same problem! i use RC1.

bye
N8chtschwaermer


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Give FAQ a try
http://www.hibernate.org/74.html#A2

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2003 11:11 pm 
Newbie

Joined: Thu Nov 20, 2003 2:35 am
Posts: 7
Location: Thailand
Thanks for your kindness but I have next problem.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:310)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:323)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:331)
at aa.main(aa.java:48)

_________________
Rattapon P.


Top
 Profile  
 
 Post subject: javax/transaction/Synchronization is in jta.jar
PostPosted: Tue Dec 02, 2003 12:00 am 
Regular
Regular

Joined: Sun Sep 21, 2003 11:43 pm
Posts: 85
Location: Massachusetts
The class javax.transaction.Synchronization.class is in jta.jar. Make sure that is in your classpath. I use Tomcat (v4.1.29) and put it under TOMCAT_HOME/common/lib and used to have it under my webapp's /WEB-INF/lib directory.

Regards,
David


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 02, 2003 12:22 am 
Newbie

Joined: Thu Nov 20, 2003 2:35 am
Posts: 7
Location: Thailand
Yeah. I've got it.
I'm use eclipse and didn't include all of lib in /hibernate/lib.

thank you for all of your kindness.

_________________
Rattapon P.


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