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>
报错能不能报出详细信息啊,漫无目的的找实在是太痛苦。。。