日期:2014-05-17  浏览次数:20760 次

hibernate.cfg.xml 加载映射文件有,tomcat无法启动
<property name="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="hibernate.show_sql">true</property>
<mapping resource="com/pro/models/Users.hbm.xml" />
<mapping resource="com/pro/models/Admin.hbm.xml" />
<mapping resource="com/pro/models/Car.hbm.xml" />
<mapping resource="com/pro/vo/UsercarCar.hbm.xml" /> //加入这一行就会出错,这个是视图

出错信息:
 ERROR (org.springframework.web.context.ContextLoader:215) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext_user.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

UsercarCar.hbm.xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- 
  Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping package="com.pro.vo">
  <class name="UsercarCar" table="usercarcar" lazy="false">
   
  <id name="mid">
<generator class="native"></generator>
  </id>
  <property name="carid" type="java.lang.String">
  <column name="carid" length="50" />
  </property>
  <property name="userid" type="java.lang.String">
  <column name="userid" length="50" />
  </property>
  <property name="gpssn" type="java.lang.String">
  <column name="gpssn" length="12" />
  </property>
  <property name="minv" type="java.lang.Short">
  <column name="minv" />
  </property>
  <property name="sim" type="java.lang.String">
  <column name="sim" length="50" />
  </property>
  <property name="creattime" type="java.sql.Timestamp">
  <column name="creattime" length="23" />
  </property>
  <property name="authphones" type="java.lang.String">
  <column name="authphones" length="50" />
  </property>
  <property name="rectregions" type="java.lang.String">
  <column name="rectregions" length="50" />
  </property>
  <property name="name" type="java.lang.String"