为了账号安全,请及时绑定邮箱和手机立即绑定

数据库sql server2005 看看这是什么错

Exception in thread "main" java.lang.ExceptionInInitializerError

at com.zw.test.test.add(test.java:27)

at com.zw.test.test.main(test.java:14)

Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:185)

at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135)

at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:385)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1790)

at com.zw.base.HibernateUtil.<clinit>(HibernateUtil.java:22)

... 2 more

Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

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

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

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

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

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

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:513)

at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163)

... 6 more

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:513)

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

... 15 more

Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for students in class com.zw.bean.Grade

at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:316)

at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:310)

at org.hibernate.mapping.Property.getGetter(Property.java:321)

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

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

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

... 20 more


正在回答

2 回答

反射的类错了,可能是你生成get,set方法时字段写错了

0 回复 有任何疑惑可以回复我~

谢谢 啦 错误找到了 

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Hibernate初探之一对多映射
  • 参与学习       42171    人
  • 解答问题       295    个

Hibernate中一对多关联映射配置,以及cascade和inverse属性作用

进入课程

数据库sql server2005 看看这是什么错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信