[ 
https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Golder updated WW-2240:
------------------------------

    Attachment: DocAttach-Struts2Issue.doc

I am experiencing this issue with Struts2.1.6 and com.opensymphony.xwork 2.1.2.

I am performing a file upload.  Debugging the code, I see 
ActionContext.setContext(..) is called with null, and then 
com.opensymphony.xwork2.util.LocalizedTextUtil calls ActionContext.getContext() 
which results in a nullpointer.  Debug screenshots attached.

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.1.0
>         Environment: WebLogic 10, Win XP
>            Reporter: Benjamin McCann
>            Assignee: Rainer Hermanns
>             Fix For: 2.1.3
>
>         Attachments: DocAttach-Struts2Issue.doc, improvedLogging.patch, null 
> context.jpg, TestAction.java, webtest.war
>
>
> Using struts2-core-2.1.0-SNAPSHOT-20071003.jar, I received the following:
> java.lang.NullPointerException
>       at 
> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:277)
>       at 
> com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
>       at 
> com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:228)
>       at 
> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
>       at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:226)
> My action was able to access the File, so it must have been something in the 
> cleanup.  My action was very similar to the one found in this tutorial 
> http://www.roseindia.net/struts/struts2/struts-2-file-upload.shtml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to