求高手解决严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了求高手解决严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException相关的知识,希望对你有一定的参考价值。

2010-8-30 17:28:21 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded Apache Tomcat Native library 1.1.8.
2010-8-30 17:28:22 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2010-8-30 17:28:22 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2010-8-30 17:28:22 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1125 ms
2010-8-30 17:28:22 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-8-30 17:28:22 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.10
2010-8-30 17:28:23 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\Tomcat6.0\webapps\WebQs_beta\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2010-8-30 17:28:23 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\Tomcat6.0\webapps\WebQs_beta\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2010-8-30 17:28:23 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-8-30 17:28:23 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2010-8-30 17:28:23 org.apache.catalina.startup.Catalina start
信息: Server startup in 1500 ms
2010-8-30 17:31:02 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.default2_jsp._jspInit(default2_jsp.java:28)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:157)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
default2_jsp._jspInit代码段为:

public void _jspInit()

_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
_jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());


这一段错误

servlet-api.jar加载失败。一般这个jar 是不需要在你的项目中显式存放的。因为。一般tomcat里lib下都会有这个jar。你在自己的项目里 又写了一个。反而会冲突。 参考技术A validateJarFile(C:\Tomcat6.0\webapps\WebQs_beta\WEB-INF\lib\servlet-api.jar) - jar not loaded.

servlet-api.jar包不能加载
可能原因1、没有导入或者异常到tomcat--lib目录下查看是否存在 2、项目中与服务器中发生冲突 解决办法 删除项目中原有的servlet-api.jar包
参考技术B 他给你提示空指针异常 并查看 default2_jsp.java:28行 参考技术C 2010-8-30 17:28:23 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\Tomcat6.0\webapps\WebQs_beta\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

检查servlet-api.jar是不是有问题,没有加载这个包。

以上是关于求高手解决严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException的主要内容,如果未能解决你的问题,请参考以下文章

严重: Servlet[jsp]的Servlet.service()抛出异常 java.lang.IllegalStateException: 当前响应已经调用了方法getOutputStream()

jsp页面初始化错误高手指点下谢谢了!

严重: Servlet.service() for servlet [jsp] threw exception java.lang.NullPointerException

c# socket 客户端 循环发包 服务器端粘粘包严重!求高手给我个解决粘包的例子!

tomcat启动报错,求高手指点

Servlet.service() for servlet jsp threw exception