This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate AssertionFailure

ruben depuben
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am running into the following Hibernate exception when trying to get Sections with a certain name from Hibernate.

org.hibernate.AssertionFailure: null id in model.Section entry (don't flush the Session after an exception occurs)

at dao.hibernate.SectionDAOHibernate.isUniqueNameInsert(

Line 76 is the line where I try to get the Sections with q.list().

Any clue as to what may be wrong here? Can this be caused by an empty id in the database or something? I generate the indexes with the code below and this works fine for my other entities...

@Id @GeneratedValue
public Long getId() {
return id;

Best, Ruben

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic