You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Benjamin McCann (JIRA)" <ji...@apache.org> on 2007/10/09 21:22:38 UTC

[jira] Created: (WW-2240) FileUploadInterceptor causes null pointer exception

FileUploadInterceptor causes null pointer exception
---------------------------------------------------

                 Key: WW-2240
                 URL: https://issues.apache.org/struts/browse/WW-2240
             Project: Struts 2
          Issue Type: Bug
          Components: Interceptors
    Affects Versions: 2.1.0
            Reporter: Benjamin McCann


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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43010#action_43010 ] 

Nils-Helge Garli commented on WW-2240:
--------------------------------------

I have not been able to reproduce it, so any information that could help reproduce it would be helpful.

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: improvedLogging.patch, null context.jpg
>
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43008#action_43008 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

Let me know if you cannot reproduce the issue.  I've had it happen to coworkers too, so I'm pretty confident it is reproducible.  

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: improvedLogging.patch, null context.jpg
>
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42999#action_42999 ] 

Nils-Helge Garli commented on WW-2240:
--------------------------------------

Has anyone been able to reproduce this issue? It does not make sense that the ActionContextCleanup filter should clean up the context before the action and interceptor is finished executing?

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: improvedLogging.patch, null context.jpg
>
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42422 ] 

Don Brown commented on WW-2240:
-------------------------------

What concerns me about this issue is that ActionContext.getContext() is returning NULL.  The context should be there throughout the request.  Do you any more information including more stacktrace info?

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42418 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

That line in the source is a logging call.  Simply add the following around the call:
if(LOG.isInfoEnabled()) {

}

That will solve the problem 90% of the time.  It's not the correct solution, which should still be investigated, but should be added regardless for performance reasons.  Info logs should always be checked in this manner and debug logs checked with isDebugEnabled().

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-2240:
---------------------------

    Fix Version/s:     (was: 2.1.4)
                   2.1.1

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: improvedLogging.patch, null context.jpg
>
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43035#action_43035 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

Yes.  It happens every single time, as long as I choose a file and do not submit an empty input.  I am running WebLogic 10 on Windows XP and the error is logged to C:\appServer\bea\user_projects\domains\base_domain\servers\AdminServer\logs\base_domain.log:
####<Jan 18, 2008 8:08:48 AM EST> <Error> <HTTP> <L3A3454> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1200661728011> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@1d75e80 - appName: '_appsdir_webtest_war', name: 'webtest.war', context-path: '/webtest'] Root cause of ServletException.
java.lang.NullPointerException
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:277)

It happens every single time I or a coworker try to use a FileUploadInterceptor at work as well.  There I am running WebLogic 9.2 on Windows XP.  WebLogic is a free download (http://commerce.bea.com/showproduct.jsp?family=WLS&major=10&minor=1) though I believe the file size is a bit large.

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Issue Comment Edited: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Robert Golder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47027#action_47027 ] 

Robert Golder edited comment on WW-2240 at 11/3/09 2:41 AM:
------------------------------------------------------------

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 in DocAttach-Struts2Issue.doc.

      was (Author: robert123):
    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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42420 ] 

Dave Newton commented on WW-2240:
---------------------------------

There's no compelling reason to guard *every* log statement with a log level check, particularly when no String concats are being done.

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin McCann updated WW-2240:
--------------------------------

    Attachment: webtest.war

Test .war file for reproducing the error.

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43116#action_43116 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

Any chance I could get the logging patch committed as it would provide a more desirable workaround?  Thanks.

> 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
>             Fix For: 2.1.x
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43125#action_43125 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

Thanks a million.  This will be hugely helpful to us.  I'll keep an eye on this issue and test any patches if needed.  I'm afraid I don't know enough about the Struts architecture to be able to patch the actual problem.

> 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
>             Fix For: 2.1.x
>
>         Attachments: 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.


[jira] Resolved: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Rainer Hermanns (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rainer Hermanns resolved WW-2240.
---------------------------------

    Resolution: Fixed
      Assignee: Rainer Hermanns

This should be fixed now in trunk.
It would be nice, if you could verify this is working properly now, thanks!

> 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: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42434 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

I stepped through with a debugger today and can confirm that ActionContext.getContext() is returning null.

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin McCann updated WW-2240:
--------------------------------

    Attachment: improvedLogging.patch

Please at least wrap the log call so that the file upload interceptor can be used on most logging levels before 2.1.4.  I'd commit the fix myself if I had svn access.  I know this patch does not fix the root issue, but it's not a bad thing to do anyway for performance reasons.  And more importantly, this is a pretty serious bug and a 2.1.1 release should include a fix at the very least for the logging issue which would at least provide a workaround of downgrading the log level for this interceptor.

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.4
>
>         Attachments: improvedLogging.patch, null context.jpg
>
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin McCann updated WW-2240:
--------------------------------

    Attachment: null context.jpg

The context is null because setContext(null) is called before getting to the FileUploadInterceptor cleanup.  The attached screenshot should give a much better idea of what's going on.  I'm not sure why the action context is being cleaned up, but I'm assuming it shouldn't be.  The line in there regarding the RSAClearTrustAuthFilter is our company's single sign on authentication filter.  I have confirmed that this happens without the filter, so this should be reproducible.  

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>         Attachments: null context.jpg
>
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2240:
--------------------------

    Fix Version/s:     (was: 2.1.1)
                   2.1.x

Moving to 2.1.x as there is a workaround and no final solution

> 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
>             Fix For: 2.1.x
>
>         Attachments: 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Robert Golder (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils-Helge Garli updated WW-2240:
---------------------------------

    Environment: WebLogic 10, Win XP  (was: WebLogic 20, Win XP)

> 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
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43049#action_43049 ] 

Nils-Helge Garli commented on WW-2240:
--------------------------------------

I have successfully reproduced the error with WebLogic. The problem is that a nested FiterDispatcher invocation clears the ActionContext. I believe a short term work-around would be to add the ActionContextCleanUp filter:

<filter>
    <filter-name>struts-cleanup</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>

<filter-mapping>
    <filter-name>struts-cleanup</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Add this first filter before the FilterDispatcher.

> 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
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils-Helge Garli updated WW-2240:
---------------------------------

    Environment: WebLogic 20, Win XP  (was: WebLogic)

> 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 20, Win XP
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43123#action_43123 ] 

Nils-Helge Garli commented on WW-2240:
--------------------------------------

Patch applied. Thanks. Ticket left open since the actual issue is not solved.

> 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
>             Fix For: 2.1.x
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43034#action_43034 ] 

Nils-Helge Garli commented on WW-2240:
--------------------------------------

Can you consistently reproduce the error with this example? I have tried and tried with the example war, but I can't see any NPE in my logs...

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin McCann updated WW-2240:
--------------------------------

    Attachment: TestAction.java

Source code for test .war.

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42429 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

Sorry it took me a little while to figure out what log file Weblogic was hiding the rest of the stacktrace in.  Here's the whole thing.  Let me know if there's anything else I can do to help.

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)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:163)
	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)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
	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)
	at com.sherwin.sos.auth.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:21)
	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)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:51)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:496)
	at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:427)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at com.sherwin.sos.auth.UserLoginFilter.doFilter(UserLoginFilter.java:55)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at com.sherwin.sd.rsa.filter.RSAClearTrustAuthFilter.doFilter(RSAClearTrustAuthFilter.java:270)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Commented: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Benjamin McCann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42421 ] 

Benjamin McCann commented on WW-2240:
-------------------------------------

True enough, but it should still be done in this instance.  The log call in the FileUploadInterceptor does do a bit of work (not mention causing the NullPointerException so that cleanup isn't finished)

> FileUploadInterceptor causes null pointer exception
> ---------------------------------------------------
>
>                 Key: WW-2240
>                 URL: https://issues.apache.org/struts/browse/WW-2240
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.1.0
>            Reporter: Benjamin McCann
>
> 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2240:
--------------------------

    Fix Version/s:     (was: 2.1.x)
                   2.1.3

> 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
>             Fix For: 2.1.3
>
>         Attachments: 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.


[jira] Updated: (WW-2240) FileUploadInterceptor causes null pointer exception

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils-Helge Garli updated WW-2240:
---------------------------------

    Environment: WebLogic

> 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
>            Reporter: Benjamin McCann
>             Fix For: 2.1.1
>
>         Attachments: 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.