[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3264?page=c...
]
Paul Benedict commented on HHH-3264:
------------------------------------
Some further background on the problem....
BasicPropertyAccessor has very little information available to report anything beyond the
class and property that failed. That's understandable, but when the offending property
is a part of a commonly used component, it is difficult to narrow which entity had the
problem.
In my case, I had an HQL query which eagerly fetched two types of entities that both have
the same nested component. A getter method was throwing an exception because an API
contract was violated because of bad data. I had to step up through the stack trace until
the component's owning entity and identifier was available to the debugger. Once I had
that, it was easy to create the patch.
Error in two phase loading will not reveal entity name or key
-------------------------------------------------------------
Key: HHH-3264
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3264
Project: Hibernate3
Issue Type: Patch
Components: core
Affects Versions: 3.2.6
Reporter: Paul Benedict
Attachments: TwoPaseLoad.patch
I had a method getter that was throwing an exception during query execution. I
couldn't figure out which entity -- either name or identifier -- that was failing. The
best I got was:
org.hibernate.PropertyAccessException: Exception occurred inside getter of
org....myproperty
at
org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:148)
So I created a patch for TwoPhaseLoad which will wrap any nested exception and print out
the entity name and identifier.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira