问题描述
我正在使用Net Beans IDE,当我开始部署Web项目时,它在控制台输出中显示了一个错误,提示:
I am using Net Beans IDE , When i start to deploy my web project it shows me at the console output an error says:
failed.org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(db col name)
从消息中它无法转换类型;我试图检查文件.hbm和.java中的类型,但到目前为止还算运气.
From the message it can not convert types ; I tried to check the types in my files .hbm and .java but no luck so far .
为此错误引发的属性定义为
The property for which this error is being thrown is defined as
<property name="exemptionOwnerName1" type="String">
推荐答案
原因是,hibernate尝试转换类型,但是其中之一兼容
The reason is , hibernate tries to convert the types but one of them was in compatible
我的代码是这样的字符串
my code was string like this
<property name="exemptionOwnerName1" type="String">
,并且应该以小写字母s
and it should by with small letter s
<property name="exemptionOwnerName1" type="string">
似乎区分大小写,并且在 hbm 中应该为 string ,在 java 类中为 String
seems its case sensitive and in hbm it should be string and in java class String
这篇关于failed.org.hibernate.MappingException:无法确定以下类型:字符串,用于列:[org.hibernate.mapping.Column(db col name)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!