51Testing软件测试论坛

标题: hibernate异常 [打印本页]

作者: 测试积点老人    时间: 2018-11-27 11:14
标题: hibernate异常
请问这个是什么异常,该怎么解决?
  1. org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

  2. at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)

  3. at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)

  4. at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)

  5. at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)

  6. at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:485)

  7. at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)

  8. at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)

  9. at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:286)

  10. at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)

  11. at com.itheima.onetomany.onetomanytest.test1(onetomanytest.java:12)

  12. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  13. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  14. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  15. at java.lang.reflect.Method.invoke(Unknown Source)

  16. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

  17. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

  18. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

  19. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

  20. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

  21. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

  22. at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

  23. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

  24. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

  25. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

  26. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

  27. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

  28. at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

  29. at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)

  30. at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)

  31. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)

  32. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)

  33. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)

  34. at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

  35. Caused by: java.lang.reflect.InvocationTargetException

  36. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  37. at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

  38. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

  39. at java.lang.reflect.Constructor.newInstance(Unknown Source)

  40. at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)

  41. ... 32 more

  42. Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for Students in class com.itheima.onetomany.Grade

  43. at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:326)

  44. at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:320)

  45. at org.hibernate.mapping.Property.getGetter(Property.java:330)

  46. at org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:297)

  47. at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:155)

  48. at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)

  49. ... 37 more
复制代码



作者: abcsell    时间: 2018-11-28 10:01
组件获取失败了
作者: jingzizx    时间: 2018-11-28 11:07
缺少方法
作者: qqq911    时间: 2018-11-28 11:21
重装下
作者: 海海豚    时间: 2018-11-28 13:22
https://www.cnblogs.com/e206842/p/6550605.html




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2