[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4820) @IdClass with "extra" attributes leads to misleading error
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Tue Jan 19 11:47:30 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35274#action_35274 ]
Hardy Ferentschik commented on HHH-4820:
----------------------------------------
If I am not mistaken the error message is:
{code}
org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]
at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:101)
at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:122)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:75)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)
at org.hibernate.mapping.Component.buildType(Component.java:175)
at org.hibernate.mapping.Component.getType(Component.java:168)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:274)
at org.hibernate.mapping.RootClass.validate(RootClass.java:237)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1189)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1374)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:965)
at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:93)
at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:106)
at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:108)
at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:165)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:98)
... 28 more
Caused by: org.hibernate.PropertyNotFoundException: field [quantity] not found on org.hibernate.test.annotations.idclassgeneratedvalue.SimplePK
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:182)
at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:174)
at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:197)
at org.hibernate.mapping.Property.getGetter(Property.java:294)
at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:65)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:60)
... 33 more
{code}
> @IdClass with "extra" attributes leads to misleading error
> ----------------------------------------------------------
>
> Key: HHH-4820
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4820
> Project: Hibernate Core
> Issue Type: Bug
> Reporter: Steve Ebersole
> Assignee: Hardy Ferentschik
>
> Even if we end up not supporting HHH-4819, the error message we currently give is completely wrong. The error message names some non- at Id annotated field in the entity class even though it is the field in the pk class that causes the issue.
--
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