All entries for Friday 01 July 2005

July 01, 2005

I hate Hibernate PropertyAccessException!

So I recently changed around some of my hibernate mapping fields around; moving properties from specific subclass to the superclass, and all of a sudden the app broken with the following error:

org.hibernate.PropertyAccessException: could not set a field value by reflection setter of


This was puzzling because all my unit tests worked, and the setter was definately available.

The problem was that there was a null in the database for the field, for the row I was working on, and it was complaining (correctly) that it cannot set a null against a boolean.

If only the error message had included the value it was trying to set :) Just another example of Hibernates error messages being absolutely correct and entirely unhelpful :)

July 2005

Mo Tu We Th Fr Sa Su
Jun |  Today  | Aug
            1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search this blog



Most recent comments

  • Interesting… While I'm not completely convinced in such microbenchmarks, I'm pretty sure that 1ms … by Alexander Snaps on this entry
  • Hello. I bought the book yesterday. I was trying to find the source code for chapter 11 and chapter … by Suleman on this entry
  • by live mashup demo on this entry
  • Thanks mate ….. This blog was really helpful. by Maaz Hurzuk on this entry
  • Ty. Not directly helpful for my problem, but pointed me in the right direction. You will also get th… by Mike E. on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder