tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Le Bas <m...@nlebas.net>
Subject Re: Problem with interaction between i18nInterceptor and ExecuteAndWaitInterceptor
Date Wed, 03 Oct 2012 16:30:14 GMT
Hi,

According to the stack trace you provide, Tiles is not even called... can't help you there.
Perhaps try the struts users list?

Ryan Beckes <rbeckes@gmail.com> wrote:

>Hello,
>
>I'm using the struts2 tiles plugin (v2.2.3) and I'm having a problem
>using the I18nInterceptor with the ExecuteAndWaitInterceptor.
>Essentially when I add the execAndWait interceptor (see xml below) for
>some reason the localization no longer works and when I try to get
>localized text (e.g. TextProviderSupport.hasKey) I get a
>NullPointerException (see error) that I narrowed down to this code in
>LocalizedTextUtil...
>
>    358:public static String findText(Class aClass, String aTextName,
>Locale locale, String defaultMessage, Object[] args) {
>    359:    ValueStack valueStack = ActionContext.getContext().getValueStack();
>    360:    return findText(aClass, aTextName, locale, defaultMessage,
>args, valueStack);
>    361:
>    362:}
>
>... I'm assuming my valuestack is null for some reason, but I cannot
>figure out why. Any ideas?
>
>Thanks,
>Ryan
>
>java.lang.NullPointerException
>  at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:359)
>  at com.opensymphony.xwork2.TextProviderSupport.hasKey(TextProviderSupport.java:98)
>  at com.opensymphony.xwork2.ActionSupport.hasKey(ActionSupport.java:96)
>  at com.test.plus.PlusSupport.getCurrentLocale(PlusSupport.java:213)
>  at com.test.plus.import.Test.action.TestAction.testMethod(TestAction.java:801)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>  at java.lang.reflect.Method.invoke(Unknown Source)
>  at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
>  at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
>  at org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57)
>  at java.lang.Thread.run(Unknown Source)
>
>
>        <action name="Test/m/testMethod" method="testMethod"
>class="com.test.plus.import.Test.action.TestAction">
>            <result
>type="tiles">/WEB-INF/jsp/import/Test/testMethod.jsp</result>
>            <result name="success"
>type="tiles">/WEB-INF/jsp/import/Test/testMethod.jsp</result>
>            <result name="input"
>type="tiles">/WEB-INF/jsp/import/Test/testMethod.jsp</result>
>            <result name="error"
>type="tiles">/WEB-INF/jsp/import/Test/testMethod.jsp</result>
>            <result name="wait"
>type="tiles">/WEB-INF/jsp/import/execAndWait.jsp</result>
>            <interceptor-ref name="plusStack"/>
>            <interceptor-ref name="defaultStack"/>
>            <interceptor-ref name="execAndWait">
>              <param name="excludeMethods">input,back,cancel</param>
>            </interceptor-ref>
>        </action>
>
>
>-- 
>Ryan Beckes
>Inftropy
>Phone: (504) 564-7456
>Fax: (866) 405-3865
>
>
>Disclaimer: This message (and any attachments) is confidential and is
>intended only for the addressee(s). This message may contain information
>that is protected by one or more legally recognized privileges. If the
>reader of this message is not the intended recipient, I did not intend to
>waive, and I do not waive, any legal privilege or the confidentiality of
>the message. If you receive this message in error, please notify me
>immediately by return e-mail and delete this message from your computer and
>network without saving it in any manner. The unauthorized use,
>dissemination, distribution, or reproduction of this message, including
>attachments, is prohibited and may be unlawful.
Mime
View raw message