org.hibernate.MappingException: Could not determine type for 错误

来源:互联网 发布:mac 百度云破解版 编辑:程序博客网 时间:2024/05/27 14:14

今天做项目因所用表结构变了,手动修改映射的相应hbm.xml文件,再启动报了一个

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/Spring-Context.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.lang.Short , for columns: [org.hibernate.mapping.Column(STATE)]

错误,查了查,没有明确答案,后来想到是手写的,是不是手误了,检查果然type="java.lang.Short",写成"java.lang.Short ",后面多了空格,删了空格再试,正常了。

-_-||