我用ssh做一个系统的时候,如果放断点调试的时候就能删了,去掉断点就删不了,不知道为什么?下面是action中删除的代码: //删除进货信息
public ActionForward deleteInProduct(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
{
//获得要删除的进货信息编号
int id = 0;
if(request.getParameter("id") != null){
id = Integer.parseInt(request.getParameter("id"));
} //删除
boolean isDelete = inProductBIZ.RemoveInProduct(id);
System.out.println(isDelete);
//查询所有的进货信息
List<TblInProduct> inProducts = inProductBIZ.GetAllInProduct();
request.setAttribute("inProducts", inProducts);
return mapping.findForward("InProductlist");
} 控制台出现的异常:
Exception in thread "Timer-1" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:257)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1934)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
public ActionForward deleteInProduct(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
{
//获得要删除的进货信息编号
int id = 0;
if(request.getParameter("id") != null){
id = Integer.parseInt(request.getParameter("id"));
} //删除
boolean isDelete = inProductBIZ.RemoveInProduct(id);
System.out.println(isDelete);
//查询所有的进货信息
List<TblInProduct> inProducts = inProductBIZ.GetAllInProduct();
request.setAttribute("inProducts", inProducts);
return mapping.findForward("InProductlist");
} 控制台出现的异常:
Exception in thread "Timer-1" java.lang.NullPointerException
at com.mchange.v2.log.log4j.Log4jMLog$Log4jMLogger.isLoggable(Log4jMLog.java:257)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:1934)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
解决方案 »
- iBatis中的queryForMap返回的对象Map
- struts2 通过 get set 方法 自动绑定后台属性值,此值到底是存放于哪里?是application还是request?
- 关于JAVA后台的一个XML问题!
- 如何不依赖tomcat或者jboss,独立部署webservice
- 求MyEclipse+weblogic开发SessionBean+JPA的详细案例!
- SPRING MVC问题
- 如何在一个jsp文件中实现根据不同的请求装载不同的网页文件内容(急在线等)
- 请问DOM与JDOM的区别
- weblogic8 出现如下错误,请问是什么回事?????
- struts2实现ajax调用action实现页面跳转
- hibernate 对象查找问题
- 各位帮帮忙!
祝LZ成功