You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Xavier Poinsard (JIRA)" <ji...@apache.org> on 2008/12/15 13:52:37 UTC

[jira] Created: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
--------------------------------------------------------------------------------------------------------

                 Key: STR-3173
                 URL: https://issues.apache.org/struts/browse/STR-3173
             Project: Struts 1
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.3.10
            Reporter: Xavier Poinsard
            Priority: Blocker


With version 1.3.10 we got the following error but not with previous stable version.
We are using a Form with fileUpload.
Here is the stack trace : 
java.lang.NullPointerException
   at java.lang.Class.isAssignableFrom(Native Method)
   at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
   at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
   at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
   at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
   at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
   at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
   at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
   at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
   at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Resolved: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

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

Niall Pemberton resolved STR-3173.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.10.1
         Assignee: Niall Pemberton

I re-created this problem in the Struts examples webapp and verified that a null check resolves this issue - fixed in 1.3 Branch:
   http://svn.apache.org/viewvc?view=rev&revision=727179

And ported to trunk:

    http://svn.apache.org/viewvc?view=rev&revision=727180

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Assignee: Niall Pemberton
>            Priority: Blocker
>             Fix For: 1.3.10.1
>
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45261#action_45261 ] 

Paul Benedict commented on STR-3173:
------------------------------------

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#isAssignableFrom(java.lang.Class)

Class#isAssignableFrom throws a documented NPE if the parameter is null. So that means getPropertyType is returning null.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45260#action_45260 ] 

Niall Pemberton commented on STR-3173:
--------------------------------------


STR-487 added the rationalizeMultipleFileProperty() in Struts 1.3.9 [1]
STR-3081 fix a bug in that method in Struts 1.3.10 [2]

So I guess the question is "Which version did Xavier upgrade from?"

The other possibility is that the BeanUtils version has been changed and PropertyUtils's getPropertyType() is now returning something different (i.e. null) from a previous BeanUtils version - can you say what BeanUtils version you were using previously and what version now?

[1] http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java?r1=505116&r2=524895
[2] http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java?r1=560652&r2=560654

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Xavier Poinsard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45272#action_45272 ] 

Xavier Poinsard commented on STR-3173:
--------------------------------------

1/ Same problem with struts 1.3.9. 1.3.8 doesn't exhibit the problem.
2/ getPropertyType return nulls because the specified property doesn't exist on the bean/Form object.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Xavier Poinsard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45279#action_45279 ] 

Xavier Poinsard commented on STR-3173:
--------------------------------------

In this particular case we are using the following code to retrieve the file content :
FormFile fileInfo = (FormFile) form.getMultipartRequestHandler().getFileElements().get(name_of_the_field);

But I don't think it's mandatory to declare all form properties not handled by standard struts methods.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45250#action_45250 ] 

Paul Benedict commented on STR-3173:
------------------------------------

With the latest release, I don't think anything was changed with file uploading. Can you help diagnose it a little more?

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Xavier Poinsard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45265#action_45265 ] 

Xavier Poinsard commented on STR-3173:
--------------------------------------

I upgraded from 1.3.8.
BeanUtils is now 1.8.0 but just reverting to Struts 1.3.8 fixes the problem.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45266#action_45266 ] 

Paul Benedict commented on STR-3173:
------------------------------------

Xaiver, would you be kind enough to try these 2 steps:

1) Try Struts 1.3.9: http://www.apache.org/dist/struts/binaries/
2) With the broken version, step into the debugger and determine why getPropertyType() returns null?

You may also upload an example for us to replicate the bug with.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Xavier Poinsard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45290#action_45290 ] 

Xavier Poinsard commented on STR-3173:
--------------------------------------

The problem is fixed with this build.
Thanks.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Assignee: Niall Pemberton
>            Priority: Blocker
>             Fix For: 1.3.11, 1.4.0
>
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45274#action_45274 ] 

Paul Benedict commented on STR-3173:
------------------------------------

Isn't the property supposed to be there? I thought the property was the name of the FormFile on the form.

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45283#action_45283 ] 

Niall Pemberton commented on STR-3173:
--------------------------------------

Xavier is correct the Map of properties that is built from the request parameters and passed to the BeanUtils populate method (which delegates to BeanUtils setProperty() method[1]) to populate the form ignores properties that don't exist - so this method should do as well. We just need to add a null check to that method.

[1] http://commons.apache.org/beanutils/v1.8.0/apidocs/org/apache/commons/beanutils/BeanUtilsBean.html#setProperty(java.lang.Object,%20java.lang.String,%20java.lang.Object)

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Updated: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

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

Paul Benedict updated STR-3173:
-------------------------------

    Fix Version/s: 1.4.0

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Assignee: Niall Pemberton
>            Priority: Blocker
>             Fix For: 1.3.11, 1.4.0
>
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45288#action_45288 ] 

Paul Benedict commented on STR-3173:
------------------------------------

Xavier, please try 1.3.11-SNAPSHOT and report on your findings:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts-core/

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Assignee: Niall Pemberton
>            Priority: Blocker
>             Fix For: 1.3.11, 1.4.0
>
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

-- 
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: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45281#action_45281 ] 

paul4christ79 edited comment on STR-3173 at 12/16/08 10:14 AM:
---------------------------------------------------------------

I a bit confused, so please bear with me :-) So you upload a file but it's not a property on the form?

      was (Author: paul4christ79):
    I a bit confused, so please bear with me :-) So you upload a file but it's a property on the form?
  
> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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


[jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45281#action_45281 ] 

Paul Benedict commented on STR-3173:
------------------------------------

I a bit confused, so please bear with me :-) So you upload a file but it's a property on the form?

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

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