详细解决方案
hibernate.cfg.xml 加载映射文件有,tomcat无法启动解决思路
热度:408 发布时间:2016-04-17 10:26:57.0
<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">
<column name="name" length="50" />
</property>
<property name="location" type="java.lang.String">
<column name="location" length="50" />
</property>
<property name="gprsLasttime" type="java.sql.Timestamp">
相关解决方案
- hibernate 存入数据库当前时间
- Hibernate 投射文件中length属性无法改变integer字段的默认长度
- apache-tomcat-7.0.32下的html页面不能访问有关问题
- Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml解决办法
- hibernate DAO中加了局物,未提交
- hibernate 字段lazy 的兑现原理
- Hibernate 的query.list()的有关问题
- Server Tomcat v7.0 Server不能起步
- Hibernate 关联表字段赋值有关问题
- hibernate 连接 oracle session 有关问题
- hibernate 中没有做一对多 , 那种关联映射的关联的话如何做连接查询
- hibernate 联接mysql出错
- tomcat 部署出现以上提示信息 求解 急
- 大神们开始觅错啦!org.hibernate.exception.SQLGrammarException: could not execute query
- struts2,hibernate,spring3 常用框架的API CHM版本,该怎么处理
- struts2,hibernate,spring3 惯用框架的API CHM版本
- Eclipse + Tomcat Debug時很慢,该怎么解决
- JDOM ,windows7 ,tomcat 哪位高手的bug
- tomcat 配置https的有关问题
- struts hibernate 测试小例子 不报错 但数据库没反应 求分析项目在小弟我的资源里面
- hibernate 查询缓存有关问题
- struts2 hibernate 分页有关问题
- 请问上Linux平台上怎么搭建JDK \TOMCAT\MYSQL
- hibernate与此同时使用多数据源?spring+hibernate
- Tomcat 6.0 servlet 中文字符乱码解决思路
- hibernate 保留对象时,根据映射文件,无法获取主键值
- 求教:tomcat 的 perm gen设立
- hibernate 多对多添加有关问题,弄一天多了,请求大佬解答。小的 在此谢过了
- struts + hibernate 后台页面修改数据后,前台页面显示的内容新旧数据交替出现。请高手帮忙分析上原因
- hibernate 多对1关联配置有关问题