为了账号安全,请及时绑定邮箱和手机立即绑定

页面报500 tomcat报Servlet.service() for servlet [search] in context with path [/ajaxtest] threw exception

严重: Servlet.service() for servlet [search] in context with path [/ajaxtest] threw exception

java.lang.NullPointerException

at java.lang.String.contains(Unknown Source)

at com.mall.SearchServlet.getData(SearchServlet.java:45)

at com.mall.SearchServlet.doGet(SearchServlet.java:36)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1139)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Unknown Source)


正在回答

1 回答

我出现了同样错误,解决:

由于试用Eclipse的Build Path导入JSON需要用的Jar,发现这样不行。
解决办法:手动将需要的Jar拷贝到lib目录下。

https://blog.csdn.net/neneno/article/details/84226059

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

页面报500 tomcat报Servlet.service() for servlet [search] in context with path [/ajaxtest] threw exception

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信