java.lang.NullPointerException at org.apache.struts2.ServletActionContex

问题描述

不知道这到底什么问题,各位大神,求助攻!!先谢过啦!!java.lang.NullPointerExceptionatorg.apache.struts2.ServletActionContext.getServletContext(ServletActionContext.java:139)atcom.yeepay.app.offlinepos.agent.action.AgentRelationAction.batchReleaseRelation(AgentRelationAction.java:53atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)atorg.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57)atjava.lang.Thread.run(Thread.java:662)

解决方案

解决方案二:
atcom.yeepay.app.offlinepos.agent.action.AgentRelationAction.batchReleaseRelation(AgentRelationAction.java:53第53行空指针啊
解决方案三:
struts2控件没有
解决方案四:
什么控件啊,能详细说一下吗?
解决方案五:
java.lang.NullPointerExceptionatorg.apache.struts2.ServletActionContext.getServletContext(ServletActionContext.java:139)atcom.yeepay.app.offlinepos.agent.action.AgentRelationAction.batchReleaseRelation(AgentRelationAction.java:53第52行空指针异常点击AgentRelationAction.java:53这里可以定位到你抛异常的地方
解决方案六:
Stringdirectory="/upload/agentrelation";targetDirectory=ServletActionContext.getServletContext().getRealPath(directory);//报的是这行代码nullpointexception哪位大神给看一下?
解决方案七:
/upload/agentrelation是存在的,虽然报以上错误,但也能执行成功,貌似这块代码没啥影响,但是到其他地方就有问题了。

时间: 2016-05-25

java.lang.NullPointerException at org.apache.struts2.ServletActionContex的相关文章

axis-AxisFault 错误 java.lang.NullPointerException

问题描述 AxisFault 错误 java.lang.NullPointerException 报错行是UserInfo userinfo = (UserInfo) call.invoke(new Object[] {sid,sysno,ip }); AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.N

JSP页面中出现的一个异常:org.apache.jasper.JasperException: java.lang.NullPointerException

先把出现的异常情况贴出来吧: type Exception report messagejava.lang.NullPointerException descriptionThe server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException

java.lang.NullPointerException at java.lang.ProcessBuilder.start(Unknown Source) at org.apache.hadoop.util.Shell.runCommand(Shell.java:482)

1:问题出现的原因,部署好的hadoop-2.6.4进行window10操作hadoop api出现的错误,具体错误是我向hdfs上传文件,还好点,之前解决过,这里不叙述,这里说一下从hdfs下载文件出现的错误: 详细错误如下所示: java.lang.NullPointerException at java.lang.ProcessBuilder.start(Unknown Source) at org.apache.hadoop.util.Shell.runCommand(Shell.jav

java web java.lang.NullPointerException

问题描述 java web java.lang.NullPointerException 严重: Servlet.service() for servlet [selectServlet] in context with path [/Exercise] threw exceptionjava.lang.NullPointerException at DB.DataBaseConnection.selectOperation1(DataBaseConnection.java:45) at Ser

servlet-关于java.lang.NullPointerException的问题

问题描述 关于java.lang.NullPointerException的问题 提示的错误是:严重: Servlet.service() for servlet Shopping threw exceptionjava.lang.NullPointerException at cn.itcast.Shopping.doGet(Shopping.java:45) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at

java.lang.NullPointerException[http-8080-1] DEBUG commands.ActionCommandBase

问题描述 这个问题困扰我很久了求救呀~~~~~~~~~~~~~ssh+myeclipse6.6+tomcat+mysqljava.lang.NullPointerException[http-8080-1]DEBUGcommands.ActionCommandBase-Executingorg.apache.struts.chain.commands.ExecuteForwardCommand[http-8080-1]DEBUGcommands.ActionCommandBase-Executi

mybatis-myBatis中的莫名其妙的java.lang.NullPointerException,求指教

问题描述 myBatis中的莫名其妙的java.lang.NullPointerException,求指教 xml: <!-- ognl访问静态方法的表达式 为@[email protected](args),以下为调用Ognl.isNotEmpty()方法,还有其它方法如isNotBlank()可以使用,具体请查看Ognl类 --> AND SRLNO = '${h_srlno}' AND URGEDATE = '${h_date}' </where> </sql> <s

JsonMappingException: (was java.lang.NullPointerException)

使用jackson 序列化Java对象的时候报异常: Java代码   com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: com.chanjet.gov.Student["age"])       at com.fasterxml.jackson.databind.JsonMappingException.

java.lang.NullPointerException: Expected timestamp

java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null 使用flume的时候出现的问题. sink是hdfs,然后使用目录自动生成功能.出现如题的错误,看官网文档说的是需要在每