无聊想搭建一个项目,练手,做点小功能就一个卡在这个问题上

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(已解决)的更多相关文章

  1. LR调试脚本的时候报错Error -27796:(已解决)

    LR调试bbs脚本的时候报错: 1.Error -27796: Failed to connect to server "192.168.211.128:80": [10060] ...

  2. hibernate报错org.hibernate.HibernateException: No CurrentSessionContext configured!

    org.hibernate.HibernateException: No CurrentSessionContext configured! at org.hibernate.internal.Ses ...

  3. hibernate报错org.hibernate.SessionException: Session was already closed

    org.hibernate.SessionException: Session was already closedat org.hibernate.internal.SessionImpl.clos ...

  4. Hibernate报错,关于配置的SessionFactory找不到问题

    最近写项目使用hibernate默认的dtd,在启动项目时经常会出现这个问题,hibernate报错,配置factory的id找不到,找不到mapping配置文件, 不能读取配置的xml文件 Coul ...

  5. Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification version

    Tomcat7.0启动报错:java.lang.illegalargumentexception:taglib definition not consisten with specification ...

  6. DB2读取CLOB字段-was报错:操作无效:已关闭 Lob。 ERRORCODE=-4470, SQLSTATE=null

    DB2读取CLOB字段-was报错:操作无效:已关闭 Lob. ERRORCODE=-4470, SQLSTATE=null 解决方法,在WAS中要用的数据源里面配置连个定制属性: progressi ...

  7. Oracle 12c报错:ORA-01078和LRM-00109的解决办法

    Oracle 12c报错:ORA-01078和LRM-00109的解决办法 2017-12-17 10:25:30 lemon_love1 阅读数 4336  收藏 更多 分类专栏: oracle   ...

  8. linux下svn客户端报错Cannot negotiate authentication mechanism的解决方法

    svn客户端报错Cannot negotiate authentication mechanism的解决方法: 问题出现的原因之一: 因为SVN服务器配置了saslauthd服务用来实现与ldap的对 ...

  9. 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)

    安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...

随机推荐

  1. 转 四大Java EE容器(Tomcat、JBoss、Resin、Glassfish)之简单比较

                                      现在流行的Java EE容器有很多:Tomcat.JBoss.Resin.Glassfish等等.下面对这四种Java EE容器进行 ...

  2. 阻止文件不被上传到iCloud-b

    有空用下 http://www.cocoachina.com/bbs/read.php?tid=86244 http://www.ooso.net/archives/617 http://blog.c ...

  3. test知识

    内部测试SIT ——system integration testcase 用户测试UAT——user acceptance test SIT是集成测试UAT是验收测试从时间上看,UAT要在SIT后面 ...

  4. BZOJ 1208 宠物收养所

    Description 最近,阿Q开了一间宠物收养所.收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物.每个领养者都希望领养到自己满意的宠物,阿Q根据领养者的要求通过他自己发明的一个特 ...

  5. BZOJ 3091 城市旅行

    Description Input Output Sample Input 4 5 1 3 2 5 1 2 1 3 2 4 4 2 4 1 2 4 2 3 4 3 1 4 1 4 1 4 Sample ...

  6. OPENFILER记下,有空再玩之,ISCSI,以后网络起来了,速度还是应该可以的

  7. SQL Server查看所有表大小,所占空间

    create table #Data(name varchar(100),row varchar(100),reserved varchar(100),data varchar(100),index_ ...

  8. 快速创建php server

    mkdir testmv test.html testphp -S localhost:8082http://localhost:8082/test.html

  9. Delphi 重写控件的一个例子。

    unit DBGridEx;   interface   uses   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, ...

  10. bzoj 3158 千钧一发(最小割)

    3158: 千钧一发 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 767  Solved: 290[Submit][Status][Discuss] ...