wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Hibernate: org.hibernate.AssertionFailure: null id don't flush the Session after an exception occurs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: org.hibernate.AssertionFailure: null id don Watch "Hibernate: org.hibernate.AssertionFailure: null id don New topic
Author

Hibernate: org.hibernate.AssertionFailure: null id don't flush the Session after an exception occurs

Peter Petrov
Greenhorn

Joined: Feb 03, 2006
Posts: 17
Does anybody know what the Hibernate stack trace below means (some details & fix tips)?
I found a few sources on the web but not too explanatory, I think.
Some references or links would also be appreciated about this issue and its cause.

I mean I just would like to understand and fix the issue below.

Also, seems to me the id field is annotated property in the ReportEntry entity class.



But if so - what is the problem then?

Any help would be appreciated.
Many thanks in advance.







Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

From my understanding, this is just a side effect of the real exception that has occured some lines above this stacktrace. Do you see any additional stacktrace before this? If not, is your code catching some exception but not logging or rethrowing it back?


[My Blog] [JavaRanch Journal]
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

Jaikiran,
I do have same problem and I see following error before the error show above. Any idea about the problem. This used to work till yesterday.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

You are right Jaikiran,
The problem was not in id of hibernate entity.

I have following code in my hibernate entity


Following code in my seam facelet


Somehow my front was sending phoneNum ="" so whenever hibernate validation fails and drove me crazy, by showing
null id error
.
Unfortunately hibernate never sent appropriate error message. I figured out problem only when I went into debug mode.
 
wood burning stoves
 
subject: Hibernate: org.hibernate.AssertionFailure: null id don't flush the Session after an exception occurs