报错!!!Servlet.service() for servlet [action] in context with path [/myssh] threw exception [java.lang.NullPointerException] with root cause java.lang.NullPointerException

这个为什么报错啊~~

at com.hsp.basic.BasicService.executeQuery(BasicService.java:33)

这个对应的语句是   Query query =this.sessionFactory.getCurrentSession().createQuery(hql);

Sep 24, 2017 11:39:50 PM org.apache.catalina.core.StandardWrapperValve invoke

严重: Servlet.service() for servlet [action] in context with path [/myssh] threw exception [java.lang.NullPointerException] with root cause

java.lang.NullPointerException

at com.hsp.basic.BasicService.executeQuery(BasicService.java:33)

at com.hsp.service.imp.EmployeeService.checkEmployee(EmployeeService.java:81)

at com.hsp.web.action.LoginAction.login(LoginAction.java:54)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)

at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)

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

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

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

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

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

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

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

at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

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

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

at com.hsp.web.filter.MyFilter.doFilter(MyFilter.java:23)

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

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

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

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

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

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

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

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)

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

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

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

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

at java.lang.Thread.run(Thread.java:745)

时间: 2024-10-15 10:38:02

报错!!!Servlet.service() for servlet [action] in context with path [/myssh] threw exception [java.lang.NullPointerException] with root cause java.lang.NullPointerException的相关文章

Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Unable to compile class for JSP] with root cause java.lang.IllegalArgumentException: Page directive: inval

严重: Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Unable to compile class for JSP] with root causejava.lang.IllegalArgumentException: Page directive: invalid value for import    at org.apache.jasper.comp

严重: Servlet.service() for servlet [spring] in context with path [/XX] threw exception [Request

一.描述:最近在使用springmvc+spring+hibernate4.0进行整合开发时出现了 严重: Servlet.service() for servlet [spring] in context with path [/XX] threw exception [Request processing failed; nested exception is org.hibernate.HibernateException: No Session found for current thr

Servlet.service() for servlet [jsp] in context ....错误

Servlet.service() for servlet [jsp] in context with path [/mvcTest] threw exception [java.lang.NullPointerException] with root causejava.lang.NullPointerException这是在用tomcat写一个小应用时遇到的错误,在网上看了很多没看明白,最终试错n次后发现了问题, 其实这个问题(我遇到的那种情况,可能这个报错不止我遇到的这种情况导致)的根本原

tomcat异常之Servlet.service() for servlet [spring-mvc] in context with path

严重: Servlet.service() for servlet [spring-mvc] in context with path [/helloworld-springmvc] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config] with root cause java.lang.

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

五月 04, 2018 11:53:24 上午 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() for servlet [jsp] threw exception java.lang.NullPointerException at org.apache.jsp.tag.web.partyRoleId_tag.doTag(partyRoleId_tag.java:125) at org.apac

index.jsp报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决办法

1.index.jsp报错The superclass "javax.servlet.http.HttpServlet" was not found on the   Java Build Path的解决办法 主要是Javaweb工程类中没有添加Web 容器Runtime相关类导致: 第一: 右击项目名称->propertise->java build path->libraries->add libraries->server runtime->选

Servlet.service() for servlet UserServlet threw exception java.lang.NullPointerException 空指针异常

错误付现: 严重: Servlet.service() for servlet UserServlet threw exceptionjava.lang.NullPointerException at com.liuyang.servlet.UserServlet.doGet(UserServlet.java:17) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.Http

Servlet.service() for servlet jsp threw exception

报错信息如下: 七月 17, 2017 4:02:10 下午 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() for servlet jsp threw exception     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)     at org.apache.catalina.

Spring Cloud ZooKeeper集成Feign的坑2,服务调用了一次后第二次调用就变成了500,错误:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.n

错误如下: 2017-09-19 15:05:24.659 INFO 9986 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]56528192: startup date [Tue Sep 19 15:05:24 CST 2017]; root of context hierarchy 2017-09-19 15:05:24.858 INFO 9986 --