异常:failed for object com.sdu.crm.pojo.Customer@136a986 [java.lang.NullPointerException]
异常:
failed for object com.sdu.crm.pojo.Customer@136a986 [java.lang.NullPointerException]
大家好,如果大家看到了这篇文字。我觉得大家应该是遇到了该类问题。
首先,NullPointerException 空指针异常。
其次,大家应该是是在使用struts2和hibernate的使用遇到的这个问题。
把pojo文件修改一下
一般是将int修改成Integer就可以了。
例如:
你的pojo中有个age属性,并且生成了seter和geter。
那么这个异常会出现在set方法中,因为我们从页面中获得数据是string类型的。
会提示没有set(java.lang.String)方法。
异常:failed for object com.sdu.crm.pojo.Customer@136a986 [java.lang.NullPointerException]的更多相关文章
- 严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"] java.lang.NullPointer
刚接触servlet类,按照课本的方法使用eclipse新建了一个servlet类. 新建完成后,在web.xml里面进行注册 这时候就会报错了. 五月 07, 2016 11:23:28 上午 or ...
- java异常:java.lang.NullPointerException
/** * 功能:空指针异常测试 */ /* Object[] parameters1=null; if(parameters1.length>0&¶meters1!=n ...
- Spring异常解决 java.lang.NullPointerException,配置spring管理hibernate时出错
@Repository public class SysUerCDAO { @Autowired private Hibernate_Credit hibernate_credit; /** * 根据 ...
- java.lang.NullPointerException: Attempt to invoke virtual method 'int com.example.xxx.Json.NewsBean.getError_code()' on a null object reference错误解决
AS在运行的过程中出现了错误: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.example.xx ...
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
今天遇到了一个在servlet的service方法中获取ServletContext对象出现java.lang.NullPointerException(空指针)异常,代码如下: 1 //获取Serv ...
- hive分区导致FAILED: Hive Internal Error: java.lang.NullPointerException(null)
写了一条hive sql ,其中条件中存在 dt>=20150101 and dt<=20150228 这样的条件,原来执行没问题,今天就抛出 FAILED: Hive Internal ...
- failed with: java.lang.NullPointerException
failed with: java.lang.NullPointerException 需要在nutch的配置文件 'conf/nutch-site.xml'. 里设置如下,不然就报上面的错误了. 当 ...
- Eclipse 在启动发生错误异常:An internal error occurred during: "Initializing Java Tooling". java.lang.NullPointerException的解决办法
异常现象: 打开Eclipse,出现 An internal error occurred during: "Initializing Java Tooling". java.la ...
- 【tomcat】启动报错:Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.lang.Exception: Socket bind failed 和java.net.BindException: Address already in use: JVM_Bind错误解决
背景:[新手] 将开发机子上的Tomcat连同其中的项目,一起拷贝到服务器上,启动tomcat的start.bat,然后报错如下: 问题1: Failed to initialize end poin ...
随机推荐
- Jquery AJAX POST与GET之间的区别
1:GET访问 浏览器 认为 是等幂的就是 一个相同的URL 只有一个结果[相同是指 整个URL字符串完全匹配]所以 第二次访问的时候 如果 URL字符串没变化 浏览器是 直接拿出了第一次访问的结果 ...
- python文本文件,生成指定的文件格式
import os import sys import string #在一个特定的模式打开指定的文件,获取文件句柄 def getFileIns(filePath,model): print(&qu ...
- SQL点滴29—错误无处不在
原文:SQL点滴29-错误无处不在 我只想说以下是很基础的sql知识,但是很容易犯错.所以睁大我们的眼睛,屏住我们的呼吸,小心的检查吧! 案例1if not exists (select OrderI ...
- HashMap之Hash碰撞冲突解决方案及未来改进
说明:参考网上的两篇文章做了简单的总结,以备后查(http://blogread.cn/it/article/7191?f=wb ,http://it.deepinmind.com/%E6%80%A ...
- 使用Visual Studio 2010 - 初学者系列 - 学习者系列文章
本文介绍Visual Studio 2010的基本使用. 1. 欢迎界面 2. 进入界面 3.选择菜单中的项目 4.选择项目路径,还有空白解决方案 5.选择 新建解决方案文件夹 6.选择新建项目 ...
- java这些东西发展(4)-------无穷time of error
今天,有些郁闷的心情啊.空指针下午折磨.到现在为止仍然没有得到解决,专家的招募结果没拿到,我们必须继续自己的,进而改变一点点一点点地找到它,但现在我不想搞,准备回家,这浪费了一个多小时,之前记录的下一 ...
- 关于easyui的tab,layout,datagrid嵌套的问题
我的项目使用easyui作为前台的展示框架现在页面中是一个layout布局(分上,左,中)在左边是一些菜单,点击后,在中间部分增加一个tab显示内容而增加的tab里面是显示一些列表数据,列表上面是查询 ...
- 打开VMware的系统出错
打开VMware系统时,出现错误 “Invalid configuration file. File "I:/My Virtual Machines/Windows XP english P ...
- jquery扩展方法案例
-----------------扩展方法: $.extend({ "max": function (a, b) { if (a > b) return a; }, &quo ...
- asp.net mvc请求响应模型原理回顾
根据讲师所讲总结了一下(可能存在些描述错误) -------------mvc进入asp.net管道原理: (在执行httpapplication管道之前mvc和asp.net是相同的,不同之处在于管 ...