当前位置: 技术问答>java相关
为什么网站运行一段时间就会出现这样的错误?
来源: 互联网 发布时间:2015-08-11
本文导语: 重起tomcat就好了,但是访问一段时间后就又不行了 不知道是mysql数据库还是链接池的问题? ************************************** Error: 500 Location: /sec2/index.jsp Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper...
重起tomcat就好了,但是访问一段时间后就又不行了
不知道是mysql数据库还是链接池的问题?
**************************************
Error: 500
Location: /sec2/index.jsp
Internal Servlet Error:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java, Compiled Code)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java, Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NullPointerException
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java, Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java:484)
不知道是mysql数据库还是链接池的问题?
**************************************
Error: 500
Location: /sec2/index.jsp
Internal Servlet Error:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java, Compiled Code)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java, Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NullPointerException
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java, Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java, Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java:484)
|
你大概是在操作数据库的时候循环update或insert,但又没有释放连接。
|
空指针错,使用了空对象中的方法或属性,你在使用对象时最好是判断null。