[引用http://m.blog.csdn.net/blog/u013998070/41087351] Null value was assigned to a property of primitive type setter of cn.itcast.oa.domain.Forum.topicCount 2014-11-13阅读376 评论0 最近做一个OA项目,其中有一个论坛管理的版块,起初在实体类Forum只有几个字段,在数据库中也有对应的数据,在页面显示时,完全没有任何问题:但是后来在…
原文地址:http://blog.csdn.net/kevinzhangfei/article/details/6995316 在action请求数据的过程中报出"Null value was assigned to a property of primitive type setter of"错误,搜索之后发现是因为数据库里相应的字段为NULL. 例如: <!--Hibernate映射文件中的字段--> <property name="printTime&…
异常描述:执行以下的addAsHaveParentId2方法出现此异常: /*-----------------------类Dept.Dept.hbm.xml有parentId属性(数据库中有此列)----------------------*/ @Test//添加一级部门--success(parentId为Null) public void addAsHaveParentId1(){ Dept d = new Dept("市场部", "湖北襄阳"); dept…
由于数据不合法的原因,好几次遇到: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.xugao.bean.MemberLevel.memberpointrate 的异常,很有必要把它记录下来,以免忘记, 当遇到异常的时候一般都是 表中字段有空的情况, 例如:Membenlevel 表, memberpointrate这个字段的值…
在action请求数据的过程中报出"Null value was assigned to a property of primitive type setter of"错误,搜索之后发现是因为数据库里相应的字段为NULL. 例如: <!--Hibernate映射文件中的字段--> <property name="printTime" type="long"><column name="print_time&…
org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.wa.dataprocess.query.model.AcrossDeptApply 包装类和基本数据类型的区别, 包装类默认为null,基本类型为0. public class AcrossDeptApply implements Serializable private Str…
org.springframework.orm.jpa.JpaSystemException: Null value was assigned to a property of primitive type setter of com.eshore.ismp.order.entity.HandSiOrder.siSize; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a…
出现Null value was assigned to a property of primitive type setter of错误是由于类型不匹配,将字段的属性由hibernate的int类型改为java.lang.Integer类型就可以了, org.springframework.orm.hibernate3.HibernateSystemException: Exception occurred inside setter of com.eshore.item.model.Chec…
六月 29, 2019 5:42:45 下午 org.apache.catalina.core.AprLifecycleListener init信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\OM_HOME\native\WIN32;D:\OM_…
at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:109) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:586) at org.hibernate.tuple.entity.PojoEntityTuplizer.s…
在SSH项目的开发中遇到了下面的错误: 检查后发现数据库和映射文件中这个字段是允许为空的,为什么还要出错呢?原来是因为这个字段是int的,int是基本类型,即使设置成可以为空也不能取空值. 解决的办法就是给这个字段赋一个默认值.…
问题: 解决方法:依据提示,把 int 修改为Integer解决. 总结: javaBean最好不要使用基本类型(记得某规范说过,具体不记得了,估计就是预防这样的问题吧)…
日志: [WARN-2016/07/26/18/:45/:52]ProcessEngineServiceImpl.(257) - 审批流程log日志--submitProcess方法:提交人userId:3333333349,TaskId:245959,ProcInstId:null,WfInstaceId:16583386853,当前时间:Tue Jul 26 18:45:52 CST 2016 [ERROR-2016/07/26/18/:45/:52]ProjectRepayControll…
错误原因:totalTime的类型为int,数据库中为NULL,int 类型不能赋值为NULL,只能为0,所以报此异常. 解决方案:将totalTime的类型改为Integer,或者初始化为0…
解决办法:把基本类型改为对象,譬如此处将pageId的类型由int 改为Integer 2016-10-19 19:36:11.275 DEBUG [http-nio-9999-exec-2][org.springframework.web.servlet.DispatcherServlet] Last-Modified value for [/user/1/detail] is: -1 2016-10-19 19:36:11.278 DEBUG [http-nio-9999-exec-2][o…
严重: Servlet.service() for servlet [note-portal] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Optional long parameter 'noteBookId' is present but cannot be translated into a n…
我的spring mvc 代码: @Controller @RequestMapping("/product") public class Fancy { @RequestMapping(value = "/fancy") @ResponseBody public String showFancy(@RequestParam(value = "page", required = false) int page) { return "{\…
接口测试的时候遇到了一个问题,导致测试阻断了好久,在此记录,谨防忘记. 具体报错如下: Optional int parameter 'pId' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type. 接口…
错误的意思是: "可选的int参数'fundID'存在但由于被声明为基本类型而无法转换为空值" 意思是fundID被申明为int的基本数据类型, 不能转换为字符串的null值. 难道是在参数调用 的时候, 需要把fundID设置为对象类型吗? 答案是正确的. @RequestMapping(value = "/fund-purchase") public String fundPurchase(int fundID) { Fund fund = fundServic…
因为 实体类中的主键 是String类型 不能自动为其分配id  所以需要手动设置在service层   model.setId(UUID.randomUUID().toString());…
本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsController] (default task-10) ProductDataStaticsController getManuBandChart is failed: org.springframework.beans.TypeMismatchException: Failed to convert pr…
错误Error: Request failed with status code 500 ,调试前端没问题,后端也没问题,还报错"连接超时" 在Network中找到错误Self referencing loop detected for property 'xxxx' with type 当我们后端调试一步一步调试也没发现错误在哪里,但是跳转到前端就报错了.前端没有接收到后端传过来的数据,总结了一下: **前端接收问题**前端就是接收**字段名**以及**类型**问题 比如:nAmE,…
org.apache.ibatis.exceptions.PersistenceException: ### Error updating database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'useName' in 'class cn.itcast.mybatis.pojo.User'### The error may involve…
异常信息如下: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.Date' to required type 'java.sql.Timestamp' for property 'wfsj'; nested exception is java.lang.IllegalStateException: Cannot conver…
在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] for property 'expert.birthdate'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of typ…
在一个业务类有下列属性 private SchedulerFactoryBeanscheduler; public SchedulerFactory BeangetScheduler() { return scheduler; } public void setScheduler(SchedulerFactoryBean scheduler) { this.scheduler = scheduler; } 用spring 进行装配: <property name="scheduler&qu…
出错的详细信息: 3 ERROR [http-nio-80-exec-3] org.springframework.web.servlet.DispatcherServlet - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerCon…
报错 type Exception report message javax.el.PropertyNotFoundException: Property 'lkmId' not found on type cn.itcast.entity.LinkMan description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache…
在使用模型驱动封装的时候,要保证表单中name属性名和类中属性名一致,否则将会报错如下: HTTP Status 500 - The given object has a null identifier: cn.itcast.entity.Customer; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier: cn.itcast.entity.Cus…
后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object 'huaYangArea' on field 'c…