|
List Info
Thread: Created: (WW-1662) NullPointerException in ServletRedirectResult
|
|
| Created: (WW-1662) NullPointerException
in ServletRedirectResult |

|
2007-01-19 22:26:16 |
NullPointerException in ServletRedirectResult
---------------------------------------------
Key: WW-1662
URL: https
://issues.apache.org/struts/browse/WW-1662
Project: Struts 2
Issue Type: Bug
Components: Dispatch
Affects Versions: 2.0.3
Reporter: Nate Drake
I've found a case where actionMapper can be null in
ServletRedirectResult.
We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
Login is setup like this:
o Login.jsp submits to LoginAction
o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
o HomeAction redirects to different actions based on the
logged in users role.
An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
ServletRedirectResult's actionMapper protected instead of
private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: https://issues.apache.org/struts/secure/Administrator
s.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
|
|
| Updated: (WW-1662) NullPointerException
in ServletRedirectResult |

|
2007-01-19 22:28:16 |
[ https://issues.apache.org/struts/browse/WW-1662?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nate Drake updated WW-1662:
---------------------------
Attachment: struts2-blank.war
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Attachments: struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: https://issues.apache.org/struts/secure/Administrator
s.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
|
|
| Updated: (WW-1662) NullPointerException
in ServletRedirectResult |

|
2007-01-20 08:06:18 |
[ https://issues.apache.org/struts/browse/WW-1662?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Husted updated WW-1662:
---------------------------
Fix Version/s: (was: 2.0.4)
2.0.3
WW1580 - Update fix version for 2.0.3
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Assigned To: Don Brown
> Fix For: 2.0.3
>
> Attachments: struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: https://issues.apache.org/struts/secure/Administrator
s.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira
|
|
| Commented: (WW-1662)
NullPointerException in
ServletRedirectResult |

|
2007-01-22 08:19:16 |
[ https://issues.apache.org/struts/browse/WW
-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:c
omment-tabpanel#action_39861 ]
Nate Drake commented on WW-1662:
--------------------------------
I'm still seeing the NPE in ServletRedirectResult when using
this fix. actionMapper is null on line 128.
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Assigned To: Don Brown
> Fix For: 2.0.3
>
> Attachments: struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|
|
| Updated: (WW-1662) NullPointerException
in ServletRedirectResult |

|
2007-01-25 09:11:17 |
|
|
[ https://issues.apache.org/struts/browse/WW-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nate Drake updated WW-1662:
---------------------------
Attachment: struts2-blank-204.war
Updated version of blank app built against the trunk this morning. It is still displaying the same NPE issue when using the fix.
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Assigned To: Don Brown
> Fix For: 2.0.3
>
> Attachments: struts2-blank-204.war, struts2-blank.war
>
>
> I've found a case where actionMapper can be null in ServletRedirectResult.
> We have a custom ActionMapper, which is based on DefaultActionMapper. One of the differences
> between the two is that our implementation of getUriFromActionMapping() sometimes returns values without a / on the front. This results in an NPE during our login process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a "redirect-action" result in struts.xml) to HomeAction.
> o HomeAction redirects to different actions based on the logged in users role.
> An NPE is thrown when trying to redirect after HomeAction.execute() returns. The NPE occurs in ServletRedirectResult.java at line 127. It is thrown because actionMapper is null. The ActionMapper isn't being injected into ServletRedirectResult via setActionMapper(). I'm guessing this is because ServletRedirectResult.doExecute() is being called from ServletActionRedirectResult (via super.execute()), as opposed to the framework creating a new instance. I was able to fix it by removing the actionMapper instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead of private. I not sure if this is really a valid fix. Our custom mapper includes the changes made in DefaultActionMapper to fix WW-1571, so I think this may be a separate issue.
> I've created an updated version of the Struts 2 blank application which demonstrates the problem. This includes a version of the struts2-core jar which includes some debug, as well as a tweak to DefaultActionMapper that removes the leading / from URIs returned by getUriFromActionMapping(). This is to simulate what our custom ActionMapper does. To cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|
| Reopened: (WW-1662)
NullPointerException in
ServletRedirectResult |

|
2007-01-28 21:02:16 |
[ https://issues.apache.org/struts/browse/WW-1662?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Husted reopened WW-1662:
----------------------------
Assignee: (was: Don Brown)
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Fix For: 2.0.5
>
> Attachments: struts2-blank-204.war,
struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|
|
| Updated: (WW-1662) NullPointerException
in ServletRedirectResult |

|
2007-01-28 21:02:16 |
[ https://issues.apache.org/struts/browse/WW-1662?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Husted updated WW-1662:
---------------------------
Fix Version/s: (was: 2.0.3)
2.0.5
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Fix For: 2.0.5
>
> Attachments: struts2-blank-204.war,
struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|
|
| Resolved: (WW-1662)
NullPointerException in
ServletRedirectResult |

|
2007-01-30 23:38:16 |
[ https://issues.apache.org/struts/browse/WW-1662?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Don Brown resolved WW-1662.
---------------------------
Resolution: Fixed
Assignee: Don Brown
Ok, fixed for real this time
> NullPointerException in ServletRedirectResult
> ---------------------------------------------
>
> Key: WW-1662
> URL: https
://issues.apache.org/struts/browse/WW-1662
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch
> Affects Versions: 2.0.3
> Reporter: Nate Drake
> Assigned To: Don Brown
> Fix For: 2.0.5
>
> Attachments: struts2-blank-204.war,
struts2-blank.war
>
>
> I've found a case where actionMapper can be null in
ServletRedirectResult.
> We have a custom ActionMapper, which is based on
DefaultActionMapper. One of the differences
> between the two is that our implementation of
getUriFromActionMapping() sometimes returns values without a
/ on the front. This results in an NPE during our login
process.
> Login is setup like this:
> o Login.jsp submits to LoginAction
> o On a successful login, LoginAction redirects (via a
"redirect-action" result in struts.xml) to
HomeAction.
> o HomeAction redirects to different actions based on
the logged in users role.
> An NPE is thrown when trying to redirect after
HomeAction.execute() returns. The NPE occurs in
ServletRedirectResult.java at line 127. It is thrown because
actionMapper is null. The ActionMapper isn't being injected
into ServletRedirectResult via setActionMapper(). I'm
guessing this is because ServletRedirectResult.doExecute()
is being called from ServletActionRedirectResult (via
super.execute()), as opposed to the framework creating a new
instance. I was able to fix it by removing the actionMapper
instance from ServletActionRedirectResult.java, and making
> ServletRedirectResult's actionMapper protected instead
of private. I not sure if this is really a valid fix. Our
custom mapper includes the changes made in
DefaultActionMapper to fix WW-1571, so I think this may be a
separate issue.
> I've created an updated version of the Struts 2 blank
application which demonstrates the problem. This includes a
version of the struts2-core jar which includes some debug,
as well as a tweak to DefaultActionMapper that removes the
leading / from URIs returned by getUriFromActionMapping().
This is to simulate what our custom ActionMapper does. To
cause the NPE, all you need to do is attempt to login.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|
|
[1-8]
|
|