not found while looking for property
来源:互联网 发布:上位机编程语言 编辑:程序博客网 时间:2024/06/06 03:57
最近在研究hibernate。过程当中碰到了很多问题啊!其中一个就是not found while looking for property错误
Caused by: org.hibernate.MappingException: class main.Java.POJO.User not found while looking for property: id
配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="main.java.POJO">
<class name="User" table="loginuser">
<id name="id" column="Id" >
<generator class="native"/>
</id>
<property name="username" column="username" />
<property name="password" column="password" />
<property name="sex" column="sex" />
</class>
</hibernate-mapping>
怎么看配置也没有问题啊!网上找了N久!终于在这篇文章里面看到了原因!
按照里面的方法把每个值都加上属性后就OK了
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="main.java.POJO">
<class name="User" table="loginuser">
<id name="id" column="Id" type="java.lang.Integer">
<generator class="native"/>
</id>
<property name="username" column="username" type="java.lang.String"/>
<property name="password" column="password" type="java.lang.String"/>
<property name="sex" column="sex" type="java.lang.String"/>
</class>
</hibernate-mapping>
特记于此!以备勿忘!
- not found while looking for property错误
- not found while looking for property
- Hibernate中配置文件出现class cn.fpxty.LinkMan not found while looking for property:linkid错误
- Looking for a four-byte integer type... Not found.
- Setter not found for property class
- Facelets: Setter not found for property class
- ReducedHTMLParser:558 Invalid tag found: unexpected input while looking for attr name or '/>' 错误
- Linux下 安装 zlib时出现 Looking for a four-byte integer type... Not found.
- unexpected EOF while looking for matching ``'
- el PropertyNotFoundException: Property not found
- 异常:Property 'name' not found
- System Property recharge_money_max not Found!
- PropertyNotFoundException: Property 'dFlag' not found
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- 编译unexpected end of file while looking for
- unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive
- POJ
- swift——复合类型——tuple
- Python-pandas模块数据处理
- Java 1.5,1.6,1.7,1.8新特性整理
- 51nod 1118 机器人走方格 & 1119 机器人走方格 V2(排列组合)
- not found while looking for property
- 工业设计公司对工业设计的讲解
- HDU 1014 Uniform Generator
- swift——复合类型——String
- Hadoop2.X大数据集群规划与架构设计
- LocalBroadcastManager的使用
- jquery使用进阶
- Citrix Provisioning Services 7.13企业实战 百度云下载
- echart饼图上显示数据