0

尝试保存Employee对象时出现以下错误。请帮忙。

[标准输出] (http-localhost-127.0.0.1-8082-1​​)

20:26:06,296 信息 [stdout] (http-localhost-127.0.0.1-8082-1​​) com.javapapers.spring.Employee@1ee17a5

20:26:06,315 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) java.lang.NullPointerException

20:26:06,317 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 com.javapapers.spring.EmployeeDAOImpl.saveEmployee(EmployeeDAOImpl.java:17)

20:26:06,319 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 com.javapapers.spring.EmployeeController.employee(EmployeeController.java:41)

20:26:06,321 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)

20:26:06,323 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)

20:26:06,324 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)

20:26:06,325 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 java.lang.reflect.Method.invoke(未知来源)

20:26:06,326 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:185)

20:26:06,326 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)

20:26:06,327 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)

20:26:06,328 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:502)

20:26:06,328 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:465)

20:26:06,329 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)

20:26:06,330 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863)

20:26:06,330 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)

20:26:06,331 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851)

20:26:06,332 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756)

20:26:06,333 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

20:26:06,333 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

20:26:06,334 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

20:26:06,334 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

20:26:06,335 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

20:26:06,335 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

20:26:06,336 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

20:26:06,337 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

20:26:06,337 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

20:26:06,338 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

20:26:06,338 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

20:26:06,339 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

20:26:06,339 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

20:26:06,340 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

20:26:06,341 错误 [stderr] (http-localhost-127.0.0.1-8082-1​​) 在 java.lang.Thread.run(未知来源)

4

0 回答 0