org.hibernate.HibernateException: CGLIB Enhancement failed -- is terribly uninformative
exception
--------------------------------------------------------------------------------------------------
Key: HHH-3115
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3115
Project: Hibernate3
Issue Type: Improvement
Environment: any hibernate any DB
Reporter: John Towell
I have had hibernate through this exception several times and have no idea why until I
googled the exception and found the faq that says.
http://www.hibernate.org/116.html#A5
"If you use lazy loading with proxies (default for all classes in Hibernate 3),
Hibernate needs to subclass your class at runtime. It can't do this if you have a
private no-argument constructor. As per documentation, at least package visibility is
required."
It just seems logical to put some of this information into the exception itself and save
some people some time. The faq is informative, but why can't the exception message
just say the same thing. Seems like a big run around to me.
--
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