org.hibernate.MappingException: Could not determine type for: String 数据类型错误
来源:互联网 发布:popen python 编辑:程序博客网 时间:2024/05/19 14:17
org.hibernate.MappingException: Could not determine type for: String, at table: labuser, for columns: [org.hibernate.mapping.Column(userid)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:307)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at com.guet.orm.dao.AnimalDao.insertAnimals(AnimalDao.java:33)
at com.guet.orm.test.HibernateDaoTest.insertTiger(HibernateDaoTest.java:43)
at com.guet.orm.test.HibernateDaoTest.main(HibernateDaoTest.java:29)
根据错误提示找到对应的配置文件,最终发现错误根源在
<discriminator column="userid"type="String"/>。
"String"是java的数据类型,Hibernate中对应的数据类型是"string",
在书写hibernate的配置文件时,要么使用"string",要么使用"java.lang.String"。
- org.hibernate.MappingException: Could not determine type for: String 数据类型错误
- org.hibernate.MappingException: Could not determine type for: String
- org.hibernate.MappingException: Could not determine type for 错误
- 【hibernate】org.hibernate.MappingException: Could not determine type for: String, for columns:
- org.hibernate.MappingException: Could not determine type for
- org.hibernate.MappingException: Could not determine type for
- Caused by: org.hibernate.MappingException: Could not determine type for
- org.hibernate.MappingException: Could not determine type for:
- org.hibernate.MappingException: Could not determine type for: String, at table: Elec_Text, for colum
- org.hibernate.MappingException: Could not determine type for: String, at table: Elec_SystemDDL, for
- org.hibernate.MappingException: Could not determine type for: java.lang.string
- 错误提示:Caused by: org.hibernate.MappingException: Could not determine type for
- SSH框架问题——hbm.xml配置出现的org.hibernate.MappingException: Could not determine type for:(貌似叫数据类型转换错误)问题
- Caused by: org.hibernate.MappingException: Could not determine type for: org.cgh.ssh.pojo.GoodsType,
- 使用Hibernate的UserType时报错:org.hibernate.MappingException: Could not determine type for: EMailList, at
- Hibernate异常Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set
- org.hibernate.MappingException: Could not determine type for: java.util.List, at table: user, for...
- org.hibernate.MappingException: Could not determine type for: Integer, at table: grade, for columns
- http 错误代码表
- 批量将数据插入MySQL数据库的PHP代码
- strcat()函数,报缓冲区不足。处理
- php 获取当前URL信息
- 关于以string类型的容器,容器中字符串的操作
- org.hibernate.MappingException: Could not determine type for: String 数据类型错误
- JS学习1. 如何在html中调用js文件
- SQL SERVER 2008删除维护计划作业
- sql模糊查询
- Linux下配置ip地址
- android textview混合显示图片和文字
- C# TextBox换行功能实现
- ngx_master_process_cycle函数详解
- 数组大折腾(b)