]
Antony Stubbs updated HHH-2849:
-------------------------------
Attachment: IdentifierGeneratorFactory.java.patch
fixed params.get to params.getProperty
Better error logging in IdentifierGeneratorFactory.java
-------------------------------------------------------
Key: HHH-2849
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2849
Project: Hibernate3
Issue Type: Patch
Components: core
Affects Versions: 3.2.4.sp1, 3.3
Reporter: Antony Stubbs
Priority: Minor
Attachments: IdentifierGeneratorFactory.java.patch,
IdentifierGeneratorFactory.java.patch
Original Estimate: 1 hour
Remaining Estimate: 1 hour
When specifying an incorrect id generator class in the hibernate mapping file, the
following error messages are produced for the exception:
Caused by: java.lang.RuntimeException: Exception building SessionFactory: could not
instantiate id generator
Caused by: org.hibernate.MappingException: could not instantiate id generator
Caused by: org.hibernate.MappingException: could not interpret id generator strategy:
com.x.persistence.sdfhibernate.SomeIdentityGenerator
This doesn't show which mapping it's talking about.
The patch I submitted slightly improves the message by adding the entity name:
Caused by: org.hibernate.MappingException: could not instantiate id generator for entity
com.x.persistence.hibernate.EntityClass
admitedly I haven't tested it yet, because I am unable to get maven to build
hibernate. but i'm working on that now (unable to download
org.codehaus.mojo:antlr-maven-plugin:pom:2.0-SNAPSHOT)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: