当前位置: 技术问答>java相关
有高手对空指针错有研究吗(197分~~~)NullPointerException
来源: 互联网 发布时间:2015-02-19
本文导语: 出错内容如下,请高手指点一二 01-11-9 上午10:00 : AUDIT [www/Default Server]: SRVE0091I: [小服务程序日志]: "chinalife.Agent: [chinalife.Agent-error]null java.lang.NullPointerException at com.ibm.db.DatabaseConnection.(DatabaseConnection.java) at c...
出错内容如下,请高手指点一二
01-11-9 上午10:00 : AUDIT [www/Default Server]: SRVE0091I: [小服务程序日志]: "chinalife.Agent: [chinalife.Agent-error]null
java.lang.NullPointerException
at com.ibm.db.DatabaseConnection.(DatabaseConnection.java)
at chinalife.AgentDBBean.initialize(AgentDBBean.java:700)
at chinalife.AgentDBBean.execute(AgentDBBean.java:648)
at chinalife.Agent.performTask(Agent.java:193)
at chinalife.Agent.doPost(Agent.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:580)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:353)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:729)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:655)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:338)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:175)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:93)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:77)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:160)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104)
at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:212)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:347)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:216)
at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutOfProcThread.java:248)
at java.lang.Thread.run(Thread.java:481)
"
01-11-9 上午10:00 : AUDIT [www/Default Server]: SRVE0091I: [小服务程序日志]: "chinalife.Agent: [chinalife.Agent-error]null
java.lang.NullPointerException
at com.ibm.db.DatabaseConnection.(DatabaseConnection.java)
at chinalife.AgentDBBean.initialize(AgentDBBean.java:700)
at chinalife.AgentDBBean.execute(AgentDBBean.java:648)
at chinalife.Agent.performTask(Agent.java:193)
at chinalife.Agent.doPost(Agent.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:580)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:353)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:729)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:655)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:338)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:175)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:93)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:77)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:160)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230)
at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104)
at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:212)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:347)
at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:216)
at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutOfProcThread.java:248)
at java.lang.Thread.run(Thread.java:481)
"
|
你使用的是IBM的数据库连接缓冲池;3.0的不能在3.5用(建议不要用IBM的数据库连接缓冲池,从2.0到4.0都不行,而且不向下兼容)
|
首先java没有指针。。。。。。。。。。。。。
你对一个空值作乐操作,判断是否可以改算现在的算法,或者首先判断这个变量是否为空,然后再作现在的操作。
你对一个空值作乐操作,判断是否可以改算现在的算法,或者首先判断这个变量是否为空,然后再作现在的操作。
|
chinalife.AgentDBBean.initialize方法第700行
看看有没有.操作,然后看看.之前的那个对象有没有可能是空对象
看看有没有.操作,然后看看.之前的那个对象有没有可能是空对象