org.hibernate.PropertyNotFoundException: field [name] not found on org.hibernate.test.annotations.cid.OrderLine

Hibernate JIRA | Arne Limburg | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    To verify this I modified the entities for the CompositeIdTest: I changed the Product class to be embeddable (by annotating it with @Embeddable instead of @Entity and annotating the property with @Basic instead of @Id) and the Reference in the OrderLinePK class from @ManyToOne @JoinColumn to @Embedded. This resulted in the following exception: org.hibernate.PropertyNotFoundException: field [name] not found on org.hibernate.test.annotations.cid.OrderLine at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:122) at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:114) at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:137) at org.hibernate.mapping.Property.getGetter(Property.java:272) at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:133) at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:43) at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38) at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52) at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50) at org.hibernate.mapping.Component.buildType(Component.java:152) at org.hibernate.mapping.Component.getType(Component.java:145) at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:120) at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:45) at org.hibernate.mapping.Component.buildType(Component.java:152) at org.hibernate.mapping.Component.getType(Component.java:145) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253) at org.hibernate.mapping.Property.isValid(Property.java:185) at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440) at org.hibernate.mapping.RootClass.validate(RootClass.java:192) at org.hibernate.cfg.Configuration.validate(Configuration.java:1108) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1293) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 9 years ago | Arne Limburg
    org.hibernate.PropertyNotFoundException: field [name] not found on org.hibernate.test.annotations.cid.OrderLine
  2. 0

    To verify this I modified the entities for the CompositeIdTest: I changed the Product class to be embeddable (by annotating it with @Embeddable instead of @Entity and annotating the property with @Basic instead of @Id) and the Reference in the OrderLinePK class from @ManyToOne @JoinColumn to @Embedded. This resulted in the following exception: org.hibernate.PropertyNotFoundException: field [name] not found on org.hibernate.test.annotations.cid.OrderLine at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:122) at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:114) at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:137) at org.hibernate.mapping.Property.getGetter(Property.java:272) at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:133) at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:43) at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38) at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52) at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50) at org.hibernate.mapping.Component.buildType(Component.java:152) at org.hibernate.mapping.Component.getType(Component.java:145) at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:120) at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:45) at org.hibernate.mapping.Component.buildType(Component.java:152) at org.hibernate.mapping.Component.getType(Component.java:145) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253) at org.hibernate.mapping.Property.isValid(Property.java:185) at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440) at org.hibernate.mapping.RootClass.validate(RootClass.java:192) at org.hibernate.cfg.Configuration.validate(Configuration.java:1108) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1293) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 9 years ago | Arne Limburg
    org.hibernate.PropertyNotFoundException: field [name] not found on org.hibernate.test.annotations.cid.OrderLine
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.PropertyNotFoundException

      field [name] not found on org.hibernate.test.annotations.cid.OrderLine

      at org.hibernate.property.DirectPropertyAccessor.getField()
    2. Hibernate
      AnnotationConfiguration.buildSessionFactory
      1. org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:122)
      2. org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:114)
      3. org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:137)
      4. org.hibernate.mapping.Property.getGetter(Property.java:272)
      5. org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:133)
      6. org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:43)
      7. org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38)
      8. org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52)
      9. org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50)
      10. org.hibernate.mapping.Component.buildType(Component.java:152)
      11. org.hibernate.mapping.Component.getType(Component.java:145)
      12. org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:120)
      13. org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:45)
      14. org.hibernate.mapping.Component.buildType(Component.java:152)
      15. org.hibernate.mapping.Component.getType(Component.java:145)
      16. org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
      17. org.hibernate.mapping.Property.isValid(Property.java:185)
      18. org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440)
      19. org.hibernate.mapping.RootClass.validate(RootClass.java:192)
      20. org.hibernate.cfg.Configuration.validate(Configuration.java:1108)
      21. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1293)
      22. org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
      22 frames
    3. org.hibernate.test
      TestCase.setUp
      1. org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51)
      2. org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61)
      2 frames
    4. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runBare(TestCase.java:125)
      2. junit.framework.TestResult$1.protect(TestResult.java:106)
      3. junit.framework.TestResult.runProtected(TestResult.java:124)
      4. junit.framework.TestResult.run(TestResult.java:109)
      5. junit.framework.TestCase.run(TestCase.java:118)
      6. junit.framework.TestSuite.runTest(TestSuite.java:208)
      7. junit.framework.TestSuite.run(TestSuite.java:203)
      7 frames
    5. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
      2. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      6. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      6 frames