hardy.ferentschik wrote:
In your case the JPATRaversableResolver is enabled. I assume you are using javax.persistence. If Persistence is on your classpath each property/class to be validated will be passed to the JPATRaversableResolver to determine whether validation is required. The main idea here is that if you have eg lazy loaded collections there is no need to load them in order to validate them (under the assumption that they must have been validated when they got persisted).
To check whether a class/field is persistent PersistenceUtil.isLoaded is called. In Hibernate's case this will trigger some reflection on the class/field. It is important that when this happens the actual class/field is passed to Hibernate and not a proxy of some sort.
Thanks for the explanation!
Quote:
Did you try to step through with a debugger to see which field causes the exception?
--Hardy
Not yet. Right now i've prepared a small application, which can be used to reproduce the problem:
http://www.chollya.org/hvbug.tar.gzGoing to unpack hibernate and validator sources this evening and check in the debugger how and where exception is threw