struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4262) TextParseUtil.translateVariables throws NPE when called from Interceptor Init() method
Date Fri, 20 Dec 2013 07:53:07 GMT

    [ https://issues.apache.org/jira/browse/WW-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13853764#comment-13853764
] 

Lukasz Lenart commented on WW-4262:
-----------------------------------

I'm sitting at home with cup of coffee right now, so it wasn't me in Berlin ;-)

I have assigned this issue to the next release to keep eye on it - but it can be postponed
at some point - NPE is a bug so I want to have bugs fixed asap ;-)

> TextParseUtil.translateVariables throws NPE when called from Interceptor Init() method
> --------------------------------------------------------------------------------------
>
>                 Key: WW-4262
>                 URL: https://issues.apache.org/jira/browse/WW-4262
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.3.15.1, 2.3.15.3, 2.3.16
>         Environment: Mac OSX - JDK 1.7_0_25 and 45
>            Reporter: Andrew Carr
>             Fix For: 2.3.17
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
>  The key thing to remember is this problem does
> not occur using Struts 2.3.4.1.  There are a couple of false
> indicators that I have worked through and I do believe this is due to
> a recent change in the code.  I have debugged it thoroughly and would
> appreciate any pointers in the right direction.
> I have tested this on MAC/OSX with Java 7u25 and 7u45, and tomcat
> 7047, 800rc5, 800rc9 as well.
> Call to TextParseUtil.translateVariable throws Null Pointer exception.
> This happens when I call
> TextProviderFactory.createInstance(Class,LocaleProvider).getText(String)
> from an "init()" method of an interceptor.
> This works fine in struts 2.3.4.1.  After upgrading to 2.3.15.1,
> 2.3.15.3 and 2.3.16, the server fails to deploy the application with
> the following exception:
> {noformat}
> Caused by: java.lang.NullPointerException
> at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:170)
> at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:127)
> at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(TextParseUtil.java:49)
> at com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTextUtil.java:683)
> at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:467)
> at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:362)
> at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:208)
> at com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:123)
> at example.TextUtil.getText(TextUtil.java:59)
> at example.HitachiTestInterceptor.init(HitachiTestInterceptor.java:29)
> at org.apache.struts2.impl.StrutsObjectFactory.buildInterceptor(StrutsObjectFactory.java:57)
> {noformat}
> The full stack trace is available here:
> http://pastebin.com/Us7AFxWT
> I have debugged the code update.  It appears this is happening when
> calling  ValueStack#findValue(java.lang.String) from the interceptor.
> I have time to work on a patch, if this issue is valid.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message