2

当我尝试进入休眠会话时(Session session = HibernateUtil.getSession();),我收到如下错误:


Testcase: testMain(test.smssender.SmsSenderTest):        Caused an ERROR
null
java.lang.ExceptionInInitializerError
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
        at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
        at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
        at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:123)
        at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
        at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
        at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
        at vas.framework.hibernate.HibernateUtil.(HibernateUtil.java:38)

HibernateUtil.java 文件的内容在这里: http: //pastebin.com/exCCdX2P

我找不到问题所在。有什么帮助吗?

更新:重新创建实体对象解决了我的问题。

4

1 回答 1

0

重新创建实体对象解决了我的问题。

于 2012-06-06T08:14:59.553 回答