`
ranyut
  • 浏览: 259821 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTup

 
阅读更多

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionfactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] 

 

找了我两天,终于发现是.hbm.xml中

 

<id name="customerId" type="long">
            <column name="CUSTOMER_ID" />
            <generator class="identity" />
        </id>
        <property name="name" type="string">
            <column name="NAME" length="45" not-null="true" />
        </property>

 应该改为:

 

<id name="customerId" type="java.lang.Long">
            <column name="CUSTOMER_ID" />
            <generator class="identity" />
        </id>
        <property name="name" type="java.lang.String">
            <column name="NAME" length="45" not-null="true" />
        </property>
 

 

报错能不能报出详细信息啊,漫无目的的找实在是太痛苦。。。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics