[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2849) Better error logging in IdentifierGeneratorFactory.java
Antony Stubbs (JIRA)
noreply at atlassian.com
Tue Sep 18 05:08:15 EDT 2007
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
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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list