最简单的原因可能是数据库外键字段选择了不能为空,

改为允许为空就行了。

报错org.springframework.dao.DataIntegrityViolationException的更多相关文章

  1. 报错org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet"

    org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n ...

  2. 报错:org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query; nested exception is javax.persistence.TransactionRequiredException: Executing an update/delete query

    service实现类上没有加@transaction 事务注解

  3. org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.

    今天报了这个异常,这是页面报的 org.springframework.dao.DataIntegrityViolationException: could not execute statement ...

  4. 【hibernate】报错:org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement

    报错如下: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a ...

  5. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  6. 【异常】Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException

    Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException ...

  7. org.springframework.dao.DataIntegrityViolationException:

    数据库用的hibernate,开发工具用的myeclipse,使用开发工具连接数据库生成hibernate基于xml的po类,运行时报org.springframework.dao.DataInteg ...

  8. applicationContext.xml报错org.springframework.orm.hibernate3.LocalSessionFactoryBean not found

    applicationContext.xml报错org.springframework.orm.hibernate3.LocalSessionFactoryBean not found 解决办法: 1 ...

  9. tomcat报错org.springframework.web.context.ContextLoaderListener找不到

    tomcat报错org.springframework.web.context.ContextLoaderListener找不到. 最后解决办法:将jar包copy到web-inf下面的lib中. 你 ...

随机推荐

  1. Python演绎的精彩故事(二)

    书接上回.在展示了App最顶层的代码后,我们去看看各模块怎样编程. 为了能看懂各模块的代码,首先须要铺垫一下Softchip架构的基本概念和设计规范. 1.随意模块不持有其它模块的实例.自然不再显式使 ...

  2. 使用string实现一个用于储存那些太大而无法使用 long long 的数

    类的定义: class stringInt { public: stringInt(); stringInt(string num); stringInt(int num); stringInt op ...

  3. mvn_action

    validate(验证): 验证项目正确,并且所有必要信息可用. compile(编译): 编译项目源码 test(测试): 使用合适的单元测试框架测试编译后的源码. package(打包): 源码编 ...

  4. adb常用命令整理

    adb connect <IPAddress:Port>  //通过指定的IP地址及端口连接设备 adb devices  //显示所有已连接的设备 adb install <Pac ...

  5. Spark简单集群搭建

    1. 上传spark-2.2.0-bin-hadoop2.7.tgz安装包到/home/dtouding目录下 2. 解压安装包到/bigdata/目录下,tar –zxvf spark-2.2.0- ...

  6. Educational Codeforces Round 10 D. Nested Segments

    D. Nested Segments time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  7. p1199八数码问题

    oj上简化的八数码问题,最强的数据仅仅是20步: 根据曼哈顿距离构造启发函数: 主算法:IDA*:(使用方法好像不太对......) 未用位运算优化: #include<iostream> ...

  8. DEDECMS织梦自定义表单中必填项、电话邮箱过滤以及验证码规则

    织梦自定义表单必填项规则--->(wwwshu-acca.com网站表单) 1. 在plus/diy.php 的第 40行下加如下代码: 1 2 3 4 5 6 7 8 9 10 11 12 1 ...

  9. 用 javascript 操作 xml

    1. [代码]js代码     <script language="JavaScript"><!--var doc = new ActiveXObject(&qu ...

  10. 目录操作(PHP)

    1.创建目录(文件夹)mkdir("./test");2.删除目录(文件夹)只能删除空的文件夹rmdir("./test");3.移动目录(文件夹)rename ...