Hibernate 报错org.hibernate.PropertyAccessException: IllegalArgumentException(已解决)
无聊想搭建一个项目,练手,做点小功能就一个卡在这个问题上
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.lssrc.pams.model.User.userId
具体报错是这个,查看半天,原来是直接从别处拷贝过来的配置文件,
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <hibernate-mapping >
<class table="User" name="com.denglu.domain.User" >
<id name="id" type="Integer">
<column name="id" not-null="true" />
<generator class="native"/>
</id>
<property name="name" type="string" >
<column name="name" />
</property>
<property name="pwd" type="string" >
<column name="pwd" />
</property>
</class>
</hibernate-mapping>
上面的ID定义出了问题,改成
java.lang.Integer
就好了,或者改成
int
也是OK的
Hibernate 报错org.hibernate.PropertyAccessException: IllegalArgumentException(已解决)的更多相关文章
- LR调试脚本的时候报错Error -27796:(已解决)
LR调试bbs脚本的时候报错: 1.Error -27796: Failed to connect to server "192.168.211.128:80": [10060] ...
- hibernate报错org.hibernate.HibernateException: No CurrentSessionContext configured!
org.hibernate.HibernateException: No CurrentSessionContext configured! at org.hibernate.internal.Ses ...
- hibernate报错org.hibernate.SessionException: Session was already closed
org.hibernate.SessionException: Session was already closedat org.hibernate.internal.SessionImpl.clos ...
- Hibernate报错,关于配置的SessionFactory找不到问题
最近写项目使用hibernate默认的dtd,在启动项目时经常会出现这个问题,hibernate报错,配置factory的id找不到,找不到mapping配置文件, 不能读取配置的xml文件 Coul ...
- Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification version
Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification ...
- DB2读取CLOB字段-was报错:操作无效:已关闭 Lob。 ERRORCODE=-4470, SQLSTATE=null
DB2读取CLOB字段-was报错:操作无效:已关闭 Lob. ERRORCODE=-4470, SQLSTATE=null 解决方法,在WAS中要用的数据源里面配置连个定制属性: progressi ...
- Oracle 12c报错:ORA-01078和LRM-00109的解决办法
Oracle 12c报错:ORA-01078和LRM-00109的解决办法 2017-12-17 10:25:30 lemon_love1 阅读数 4336 收藏 更多 分类专栏: oracle ...
- linux下svn客户端报错Cannot negotiate authentication mechanism的解决方法
svn客户端报错Cannot negotiate authentication mechanism的解决方法: 问题出现的原因之一: 因为SVN服务器配置了saslauthd服务用来实现与ldap的对 ...
- 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)
安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...
随机推荐
- winform布局格式
一.默认布局 ★可以加panel,也可以不加: ★通过鼠标拖动控件的方式,根据自己的想法布局.拖动控件的过程中,会有对齐的线,方便操作: ★也可选中要布局的控件,在工具栏中有对齐工具可供选择,也有调整 ...
- Babelfish
Time Limit: 1000MS Memory limit: 65536K 题目描述You have just moved from Waterloo to a big city. The peo ...
- Qt for Mac:发布程序(widgets和quick2)
当你用Qt开发好程序后,是不是会很期待将你的成果分享给你的小伙伴 可是Qt的库并不是OS X标配的,所以我们要自己去复制库到app包里,才可以让app在其他未安装Qt的电脑上运行. 比较幸运的是,Qt ...
- 普通table表格样式及代码大全(全)
普通table表格样式及代码大全(全)(一) 单实线边框表格 <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#00 ...
- 线性链表的双向链表——java实现
.线性表链式存储结构:将采用一组地址的任意的存储单元存放线性表中的数据元素. 链表又可分为: 单链表:每个节点只保留一个引用,该引用指向当前节点的下一个节点,没有引用指向头结点,尾节点的next引用为 ...
- Linux Shell编程(7)——变量赋值
=赋值操作符(它的左右两边不能有空白符) 不要搞混了=和-eq,-eq是比赋值操作更高级的测试.注意:等于号(=)根据环境的不同它可能是赋值操作符也可能是一个测试操作符.例子:简单的变量赋值 #!/b ...
- 【最大流】BAPC2014 A Avoiding the Apocalypse (Codeforces GYM 100526)
题目链接: http://codeforces.com/gym/100526 http://acm.hunnu.edu.cn/online/?action=problem&type=show& ...
- Android *.db-journal
config.xml <!-- The default journal mode to use use when Write-Ahead Logging is not active. Choic ...
- kafka在zookeeper中的存储结构
参考site:http://kafka.apache.org/documentation.html#impl_zookeeper 1.zookeeper客户端相关命令 在确保zookeeper服务启动 ...
- HDOJ(HDU) 2148 Score(比较、)
Problem Description 转眼又到了一年的年末,Lele又一次迎来了期末考试.虽然说每年都要考试,不过今年的这场考试对Lele来说却意义重大. 因为经济原因,如果今年没有排在班级前几名, ...