org.hibernate.PropertyValueException: not-null property references a null or transient value:

com.bjcx.project.entity.task.Equipmenttable.ProjPortfolioID 
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72) 
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate

字面意思:一个不允许为Null的属性引用了一个为Null的或者无效的值。

原因:在***.hbm.xml中的

<property name="ProjPortfolioID" column="ProjPortfolioID" 
    type="big_decimal" not-null="true" length="10" />

中,not-null="true",这说明属性ProjPortfolioID 不允许为空,而在ActionForm中未给他赋值,则就为空,所以就会报错!

org.hibernate.PropertyValueException: not-null property references a null or transient value:的更多相关文章

  1. org.hibernate.PropertyValueException: not-null property references a null or transient value: model.

    今天在写一个SSH整合的项目时,首先将数据库操作部分单独分离出来,写完后使用Junit进行測试,经过測试.发现没有不论什么问题,对数据库中的内容进行增删改查没有问题,可是将他整合到SSH的项目中时,报 ...

  2. hibernate级联保存问题,出错not-null property references a null or transient value

    Servlet.service() for servlet default threw exception org.hibernate.PropertyValueException: not-null ...

  3. hibernate添加数据时Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value: com.javakc.hibernate.test.entity.TestEntity.testName

    意思是,一个非null属性引用了一个null或瞬态值.就是在对应实体类配置文件hbm.xml中该属性配置了not-null="true",将其去掉即可.

  4. Confluence 6 "net.sf.hibernate.PropertyValueException: not-null" 相关问题解决

    如果你遇到了下面的错误信息,例如: ERROR [Importing data task] [confluence.importexport.impl.ReverseDatabinder] endEl ...

  5. "net.sf.hibernate.PropertyValueException"

    2019独角兽企业重金招聘Python工程师标准>>> 如果你遇到了下面的错误信息,例如: ERROR [Importing data task] [confluence.impor ...

  6. 【Hibernate】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

    今天用hibernate框架写crm项目时遇到报错: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' n ...

  7. 百度ueditor 实例化 Cannot set property 'innerHTML' of null 完美解决方案

    此时此刻,我正在用博客园推荐的TinyMCE编辑器写这个博客,突然想起最近在项目中使用百度ueditor编辑器中的一些经历.所以记录在此,与大家分享. 不得不说,百度ueditor是一款很好的在线编辑 ...

  8. Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null

    在开发Ext 项目中如果遇到 Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null 这个错误,检查下renderT ...

  9. Extjs4---Cannot read property 'addCls' of null

    用MVC做后台管理系统时遇到的问题,关于tab关闭后再打开不显示,或者报错 我在新的tabpanel中加入了一个grid,当我关闭再次打开就会报错Cannot read property 'addCl ...

随机推荐

  1. 【转载】4412开发板、PC、ubuntu通过网线连接

    今天看到使用TFTP方式,开发板直接从ubuntu下载程序,不需要一直通过烧写文件系统下载,我试了一下,虚拟机.开发板.pc三者老是互相ping不通.纠结了很久终于解决了. 写下这个小笔记,供大家参考 ...

  2. 关于 SSIS 并行foreach loop的一个设计思路

    SSIS 包在控制流方面的性能优化,主要是提高并行度. 可以设置并发线程数MaxConcurrentExecuteables. SSIS中的foreach loop container 不是并行执行任 ...

  3. SSH applicationContext.xml文件配置

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  4. CUDA入门1

      1GPUs can handle thousands of concurrent threads. 2The pieces of code running on the gpu are calle ...

  5. 【读书笔记《Android游戏编程之从零开始》】8.Android 游戏开发常用的系统控件(系统控件常见问题)

    Android 中常用的计量单位Android有时候需要一些计量单位,比如在布局Layout文件中可能需要指定具体单位等.常用的计量单位有:px.dip(dp).sp,以及一些不常用的pt.in.mm ...

  6. codeforces 616E Sum of Remainders (数论,找规律)

    E. Sum of Remainders time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  7. python3使用套接字遇到TypeError: 'str' does not support the buffer interface如何解决

    这是我查看的博客 http://blog.csdn.net/chuanchuan608/article/details/17915959 直接引用里面的关键语句: When you use clien ...

  8. UESTC 887 方伯伯的儿童节 --树形DP

    定义: 1.dp[u][1]表示u这个点设立糖果发放点且u这棵子树满足条件时的最少糖果点数 2.dp[u][0]表示u这个点不设立发放点且u这棵子树满足条件时的最少糖果点数 设v1,v2……vn为u的 ...

  9. Java虚拟机详解01----初识JVM

    主要内容如下: JVM的概念 JVM发展历史 JVM种类 Java语言规范 JVM规范 一.JVM的概念: JVM: Java Virtual Machine,意为Java虚拟机. 虚拟机: 指通过软 ...

  10. Vector3.Dot 判断方位

    判断方位 假设空间中有这几个坐标,判断一个物体在另一个物体的左边还是右边,前后还是后面 物体空间图 假如以C为中心,判断L是在它的左边还是右边 判断方法 using UnityEngine; usin ...