This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate throwing exception on insert on one-to-many Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate throwing exception on insert on one-to-many" Watch "Hibernate throwing exception on insert on one-to-many" New topic
Author

Hibernate throwing exception on insert on one-to-many

Desiree Rguez.
Greenhorn

Joined: Jun 08, 2005
Posts: 6
Hello, I have the following DB tables:



One DSNValue can has a list of DSAreas.
These are the mapping files:



And when I create a new DSNValue I hace the following code:



t.commit throws a NullPointerException, but in the hibernate log I can see the INSERT statements an its values and they are ok. For selecting the DB elements this mapping configuration works fine. What can be happening?


 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Hibernate throwing exception on insert on one-to-many