tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Beckes <rbec...@gmail.com>
Subject Problem with interaction between i18nInterceptor and ExecuteAndWaitInterceptor
Date Tue, 02 Oct 2012 00:52:55 GMT

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

    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);

... I'm assuming my valuestack is null for some reason, but I cannot
figure out why. Any ideas?


  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"
            <result name="success"
            <result name="input"
            <result name="error"
            <result name="wait"
            <interceptor-ref name="plusStack"/>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="execAndWait">
              <param name="excludeMethods">input,back,cancel</param>

Ryan Beckes
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.

View raw message