-->
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.  [ 2 posts ] 
Author Message
 Post subject: configure hibernate
PostPosted: Sun Mar 12, 2006 9:09 pm 
Newbie

Joined: Thu Dec 01, 2005 5:58 pm
Posts: 10
i am a new user to hibernate.

i tried the example provide by hibernate and it work fine.

however, when i try to integrate w/ hibernate, it gives me exception on
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
but it gives me a exception: org.hibernate.HibernateException: No TransactionManagerLookup specified

i tried to use
Session session = HibernateUtil.getSessionFactory().openSession()
then it gives me an exception on
session.getTransaction().commit();

i have the same code as the example, but why it does still give me an exception.

what's the difference between jdbc and jta?

thanks for any help.


Top
 Profile  
 
 Post subject: Re: configure hibernate
PostPosted: Mon Mar 13, 2006 10:17 am 
Regular
Regular

Joined: Wed Feb 22, 2006 11:28 am
Posts: 65
Location: Santiago, Chile
I had the same probleme than your.

The reason is very simple, when you use "getCurrentSession()" , tha indicate to your application server (JBoss, WebSphere, Oc4J, and so on) instance a Hibernate session. But, without a Server up, you donĀ“t do any thing with getCurrentSession(), and it will allow you see a exception like you posted.

Ok, when you are developing without application server, try to use openSession(). In the moment when you put you applicacion to a server, you can try to use getCurrentSession().

request for comments.

Neketsu Shonen


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