-
Apr 13th, 2009, 04:22 PM
#1
Hibernate Exception
Hi
I am new to Spring and Hibernate, I am trying to learn this technologies.
I got <tx:annotation-driven/>
in my hibernate context xml file. When I try to add a new record using this line of code
sessionFactory.getCurrentSession().merge(user);
I am getting this exception
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
org.springframework.orm.hibernate3.SpringSessionCo ntext.currentSession(SpringSessionContext.java:63) .
I have copied these configuration and code from Petclinic example.
Please help
Philip
Last edited by philipj; Apr 13th, 2009 at 04:30 PM.
-
Apr 13th, 2009, 05:51 PM
#2
No worries guys, I found the answer too.
Philip
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules