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

hibernate添加数据时Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value: com.javakc.hibernate.test.entity.TestEntity.testName的更多相关文章

  1. nutch爬取时Exception in thread “main” java.io.IOException: Job failed!

    用cygwin运行nutch 1.2爬取提示IOException: $ bin/nutch crawl urls -dir crawl -depth 3 -topN 10 crawl started ...

  2. windows上react-native run-android时Exception in thread "main" java.lang.IllegalArgumentException: MALFORMED报错

    报错如图 解决 在C:\Users\{用户名}\.gradle\wrapper\dists路径下,删除所有文件夹,重新run-android ps:网上搜了说是说是java解压缩编码格式问题什么的,感 ...

  3. Exception in thread "main" org.hibernate.TransientObjectException: object references an unsaved tran

    今天在使用一对多,多对一保存数据的时候出现了这个错误 Hibernate错误: Exception in thread "main" org.hibernate.Transient ...

  4. ERROR: Field 'PostId' doesn't have a default value Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement

    例子: Post p = new Post(); p.setPostId(3); p.setPostName("技术"); 在执行数据保持时提示session.save(p); 的 ...

  5. Exception in thread "main" org.hibernate.HibernateException: save is not valid without active transaction

    在spring4+hibernate4整合过程中,使用@Transactional注解事务会报"Exception in thread "main" org.hibern ...

  6. 基于Web的Kafka管理器工具之Kafka-manager启动时出现Exception in thread "main" java.lang.UnsupportedClassVersionError错误解决办法(图文详解)

    不多说,直接上干货! 前期博客 基于Web的Kafka管理器工具之Kafka-manager的编译部署详细安装 (支持kafka0.8.0.9和0.10以后版本)(图文详解)   问题详情 我在Kaf ...

  7. 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...

  8. 在运行Hibernate Hello World程序的时候,抛如下错误: view plain Exception in thread "main" org.hibernate.exception.LockAcquisitionException 解决方法

    在运行Hibernate Hello World程序的时候,抛如下错误: Exception in thread "main" org.hibernate.exception.Lo ...

  9. Hibernate错误:Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

    报错:Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execu ...

随机推荐

  1. Elasticsearch深入搜索之全文搜索及JavaAPI使用

    一.基于词项与基于全文 所有查询会或多或少的执行相关度计算,但不是所有查询都有分析阶段. 和一些特殊的完全不会对文本进行操作的查询(如 bool 或 function_score )不同,文本查询可以 ...

  2. php快速定位当前调用的类的位置

    php快速定位当前调用的类的位置 $func = new ReflectionMethod('类名', '方法名'); $start = $func->getStartLine() - 1; $ ...

  3. 通过jquery隐藏和显示元素

    通过jquery隐藏和显示元素 调用jquery本身提供的函数 $("xxx").hide();//隐藏xxx $("xxx").show();//显示xxx ...

  4. 寒假特训——搜索——H - Nephren gives a riddle

    What are you doing at the end of the world? Are you busy? Will you save us? Nephren is playing a gam ...

  5. ElasticSearch(三):Java操作ElasticSearch索引之CRUD

    package com.gxy.ESChap01; import java.net.InetAddress; import java.util.HashMap; import java.util.Ma ...

  6. (3)Python字符串

  7. 选择数据库管理系统(DBMS)时主要考虑的因素

    选择数据库管理系统时应从以下几个方面予以考虑: (1) 构造数据库的难易程度. 需要分析数据库管理系统有没有范式的要求,即是否必须按照系统所规定的数据模型分析现实世界,建立相应的模型:数据库管理语句是 ...

  8. http和https工具类 (要注意httpclient版本号和log4j的版本号)

    1 工具类 package dd.com; import java.io.IOException; import java.security.cert.CertificateException; im ...

  9. ajax @requestBody

    前端: $.ajax({ type: "POST", contentType: "application/json;charset=UTF-8", url: R ...

  10. UVA1442-Cav(扫描法)

    Problem UVA1442-Cav Accept: 185  Submit: 679Time Limit: 3000 mSec Problem Description Input The inpu ...