This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes StaleStateException on session.flush() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "StaleStateException on session.flush()" Watch "StaleStateException on session.flush()" New topic
Author

StaleStateException on session.flush()

Rashmee Kulkarni
Greenhorn

Joined: Mar 27, 2010
Posts: 19
Hi All,

I am trying to do basic insert operation using hibernate.I am using access db.My problem is that record gets saved but session.flush() throws following exception:




Update operation works fine on same db.

Here are my config and code files :
1) contact.hbm.xml



2) hibernate.cfg.xml

<?xml version='1.0' encoding='utf-8'?>


3) Contact.java (POJO)


4) MyExample.java


What would be the cause behind such behavior?
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Hi
I don't know enough about hibernate to add anything helpful, but I do know when searching the web for help I avoid rose india pages, and I have heard many people on here say the same.

also I am moving your thread to the hibernate forum, where you are muchj more ikely to get people who can help you.
 
wood burning stoves
 
subject: StaleStateException on session.flush()
 
Similar Threads
/hibernate.cfg.xml not found while Running simple java program
data insert error
Hibernate exception problem
session.flush(); gives null
org.hibernate.exception.GenericJDBCException