分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

1、
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Repeated column in mapping for entity: com.xindeco.myregister.pojo.MyRegisterInfo column: password (should be mapped with insert="false" update="false")

百分百配置文件 属性 错误

<property name="pensionNumber" type="string" column="50"></property>

本人 不小心 写成 column 了 应该是 length

出错原因:1、数据库的字段值和javaBean中的属性类型不统一。对于基本类型,要用wrapper类型而不是primitive类型。2、hibernate的配置文件xxx.hbm.xml中的属性配置不为空,而数据库中的字段却为空。3.两个字段对应同一列,如:password 和repassword同时对应数据库表中的password一列,同时update和insert都设为true。
xml文件如下:
    <property name="password"
                          type="java.lang.String"
                          update="true"
                          insert="true"
                          access="property"
                          column="password"
                          length = "32"
                          />

<property name="repassword"
                          type="java.lang.String"
                          update="false"
                          insert="false"
                          access="property"
                          column="password"
                          length = "32"
                          />
解决的方法:
将repassword的insert和update设为false。

4:.hbm.xml的映射文件出错,具体字段出错,比如长度,或者少写,或者多写

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

Repeated column in mapping for entity相关推荐

  1. MyEclipse如何复制项目、无法修改web-context-root问题解决办法/ Repeated column in mapping for entity

    复制项目完了之后很怪 其中一大部分还是用的之前那个 我们复制完了之后要按照下面改: 1.MyEclipse无法修改web-context-root问题解决办法 定位到当前项目下的.settings文件 ...

  2. Repeated column in mapping for entity: cn.cnic.qlms.entity.User column: id (should be mapped with in

    错误信息: 信息: Initializing Spring root WebApplicationContext [QLMS] ERROR [localhost-startStop-1] org.sp ...

  3. JPA:Repeated column in mapping for entity

    坑:这个来自新建实体类(New-..JPA entities from tables) 大概会造成三种错误:一种是①标题这种,一种大意是②至少要有一个非只读的列(大意关键词non-read only, ...

  4. Hibernate的数据查找,添加!

    1.首先看一下测试数据库的物理模型 2.测试所需要的Hibernate的jar包 3.数据库的sql /*=============================================== ...

  5. hibernate关联关系(一对多)

    什么是关联(association) 关联指的是类之间的引用关系.如果类A与类B关联,那么被引用的类B将被定义为类A的属性.例如: class B{private String name;}publi ...

  6. Hibernate开发中常见错误总结

    org.hibernate.MappingException: Unknown entity: cn.itcast.hibernate717.helloworld.Person hibernate框架 ...

  7. Hibernate面试题

    2019独角兽企业重金招聘Python工程师标准>>> 什么是Hibernate的并发机制?怎么去处理并发问题? Hibernate并发机制: a.Hibernate的Session ...

  8. hibernater面试一

    什么是Hibernate的并发机制?怎么去处理并发问题? Hibernate并发机制: a.Hibernate的Session对象是非线程安全的,对于单个请求,单个会话,单个的工作单元(即单个事务,单 ...

  9. zTree实现地市县三级级联报错(一)

    zTree实现地市县三级级联 1.详细报错例如以下: java.lang.IllegalStateException: Failed to load ApplicationContextat org. ...

  10. 表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理

    有两张表,结构如下: t_item: t_bid: id int id int name varchar name varchar item_id int 其中表t_item的主键id是表t_bid的 ...

最新文章

  1. Delphi XE5 常用功具与下载
  2. 使用OpenVINO加速Pytorch表情识别模型
  3. r语言 bsda包_使用R语言creditmodel包进行Vintage分析或留存率分析
  4. 【CentOS】磁盘管理与vim编译器
  5. Linux学习资料-万用字符与特殊符号
  6. 《应用软件安全编程指南》国标发布 奇安信代码卫士已全面支持
  7. Robo 可视化mongoDb的操作
  8. 山东理工大学计算机基础考试试题,山东理工大学计算机基础试题08
  9. spring boot集成redis
  10. [DAX] MIN函数 | MINX函数
  11. linux uvc协议_UVCCamera-master
  12. C++代码静态分析与优化(7)_vera++
  13. 腾讯企业 html邮件模板,python连接腾讯企业邮箱发送html邮件
  14. VTD解析XML( VTDGen、AutoPilot )
  15. MySQL 表分区 A PRIMARY KEY must include all columns in the table's partitioning function
  16. Hexo-零基础搭建个人博客(详解)
  17. selenium详细介绍
  18. 网络协议02 - Mac地址和IP地址
  19. asp.net+sqlserver固定资产管理系统系统c#项目
  20. 分析解决11gR2 双节点RAC环境下的gc cr block busy/gc buffer busy acquire等待

热门文章

  1. matlab函数grid,Matlab基本函数-grid、box函数
  2. 聚合支付、第四方支付有哪些平台?
  3. 【阿里云镜像】更新阿里巴巴开源镜像站镜像——Ubuntu镜像
  4. windows主机开启winrm端口powershell脚本
  5. 转帖:在北京5年艰辛快乐的创业经历
  6. java app远程调取摄像头_Java调用计算机摄像头照相(Rest API控制,方便远程拍照)...
  7. GitLab 注册 Runner Registering Runners
  8. word流程图两条线的端点连接_word流程图连接线怎么用
  9. WPS标题编号级别,根据上一级自动编号
  10. word中二级标题随一级标题自动编号