java.lang.NullPointerException at com.pp.controller.PPUserController.updateDetail(PPUserController.java:34)

问题原因:忘记写@Resource;

由此而知:可能是service没有引进去。

全部错误代码:

22:33:17,883 DEBUG SessionImpl:243 - Opened session at timestamp: 14308363978
22:34:11,470 ERROR AdminController:39 - 用户User [id=11, name=caowenyan, pwd=null, mail=null, photo=null, createdate=null, logindate=null, ip=本地, status=null, score=null, chinaname=曹文艳, phone=15022781770, addr=河南省济源市轵城镇, sex=1, qq=284804814, description=null, edu=本科, school=天津农学院, skill=java,c++]添加异常
java.lang.NullPointerException
	at com.pp.controller.PPUserController.updateDetail(PPUserController.java:33)
	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.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	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:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
时间: 2024-12-26 04:44:46

java.lang.NullPointerException at com.pp.controller.PPUserController.updateDetail(PPUserController.java:34)的相关文章

java.lang.NullPointerException at org.apache.jsp.**_jsp.jspInit(**_jsp.java)tomcat启动异常解决方法

今天遇到的其他一个问题就是,启动tomcat时,报:java.lang.NullPointerException at org.apache.jsp.**_jsp.jspInit(index_jsp.java)异常,因为我刚刚配置服务器,以为JSP页面出现了问题,不过写了一个空的JSP页面依旧是,后来才知道,jar包冲突导致的,我在tomcat的lib目录下放了jsp-api.jar的jar包,而项目中最初也一直有一个这个jar包,方法产生了冲突.解决办法就是删除掉项目里WEB-INF/lib下

java.lang.NullPointerException at org.hibernate.type.LongType.next(LongType.java

1.为了初步解决并发造成的问题,我们通常会在实体类上声明一个版本管理字段,并且引入的@version注解,这就就简单实现了乐观锁功能: Java代码   @Version private Long    version; 2.在操作表单提交时,hibernate会根据操作类型进行(如果是新增,默认会生成一个版本为0的版本号, 后面每次修改都会在现有版本后的基础上加1)对版本号进行维护. 应用场景: 如果两个人(甲,乙)同时对同实体进行修改,甲先提交,乙后提交,那么乙提交是会报错的.(因为甲已修改

?--Porg.springframework.beans.MethodInvocationException: Property 'username' threw exception; nested exception is java.lang.NullPointerException

使用BoneCP作为连接池,在启动Tomcat报出以下异常: 一月 02, 2016 2:12:17 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mynewdpi' did not find a

web 环境项目(intellj部署的tomcat) 重启时报 Exception in thread "HouseKeeper" java.lang.NullPointerException (转)

Exception in thread "HouseKeeper" java.lang.NullPointerException at org.logicalcobwebs.proxool.HouseKeeperController.getHouseKeeperToRun(HouseKeeperController.java:52) at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:33

solr定时更新索引遇到的问题(SolrDataImportProperties Error loading DataImportScheduler properties java.lang.NullPointerException)

问题描述 报如下错误,很显然,问题原因:空指针异常: ERROR (localhost-startStop-1) [   ] o.a.s.h.d.s.SolrDataImportProperties Error loading DataImportScheduler propertiesjava.lang.NullPointerException        at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)        at

HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException

type Exception report message Request processing failed; nested exception is java.lang.NullPointerException description The server encountered an internal error that prevented it from fulfilling this request. exception org.springframework.web.util.Ne

解决tomcat6部署spring4+mybatisJSP页面产生的500错误,控制台报java.lang.NullPointerException的问题

搭建spring4+mybatis+springMVC访问项目时产生异常: 严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.index_jsp._jspInit(index_jsp.java:22) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) at o

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 [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.se