struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Parameter problem with names using '[' and ']'
Date Fri, 10 May 2013 12:54:26 GMT
Yes the issue exists in .14 since that is what we are testing under.
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Lukasz Lenart <>
Date: Fri, 10 May 2013 06:42:55 
To: Struts Users Mailing List<>
Reply-To: Struts Users Mailing List <>
Subject: Re: Parameter problem with names using '[' and ']'

Hi Chris,

Have you tried to use 2.3.14? For some reasons 2.3.12 was a bit impaired ;-)

+ 48 606 323 122

2013/5/9 CRANFORD, CHRIS <>:
> Up until 2.3.12, we've used forms that contained parameter names that used '[' and ']'
and those forms worked in both devMode=true and devMode=false.  It appears once 2.3.12 was
released, this is no longer the case when devMode=true.  When forms are submitted, I get the
following stack trace exception thrown:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>                 at java.lang.String.substring(
>                 at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(
>                 at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(
>                 at com.opensymphony.xwork2.TextProviderSupport.getText(
>                 at com.opensymphony.xwork2.TextProviderSupport.getText(
>                 at com.opensymphony.xwork2.ActionSupport.getText(
>                 at com.setech.dw.common.web.BaseAction.addActionMessage(
>                 at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
>                 at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
> If I remove our addActionMessage() override from the base action class, I no longer get
this error.   It doesn't make any sense to me because our addActionMessage() override is nothing
more than the following:
>                 public void addActionMessage(String message) {
>                                 // performs localization string translation and adds
the message to parent class
>                                 super.addActionMessage(getText(message));
>                 }
> I have yet to find anywhere that says getText() should throw a StringIndexOutOfBoundsException
for any reason.
> Furthermore, I've noticed that we're also getting tremendous dumps from OGNL's runtime
about its inability to find setters or being able to set values on the action, even though
when dumping the parameter list given to the action, the parameter list is identical to what
it always has been previously.
> For example:
> 2013-05-09 08:35:37,635 ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor]:
Developer Notification (set struts.devMode to false to disable this message):
> Unexpected Exception caught setting 'stockStatus' on 'class com.setech.dw.inventory.web.ItemSearchAction:
Error setting expression 'stockStatus' with value ['A', ]
> Error setting expression 'stockStatus' with value ['A', ] - [unknown location]
> Caused by: No object in the CompoundRoot has a publicly accessible property named 'stockStatus'
(no setter could be found). - [unknown location]
>        at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(
>        at ognl.OgnlRuntime.setProperty(
>        at ognl.ASTProperty.setValueBody(
>        at ognl.SimpleNode.evaluateSetValueBody(
>        at ognl.SimpleNode.setValue(
>        at ognl.Ognl.setValue(
>        at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(
>        at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(
>        at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(
> In fact, ItemSearchCriteria is exposed via the ModelDriven interface, stockStatus is
a private property with public getter/setters.
> I can disable devMode and of course these messages disappear, but they don't make any
valid sense to me because the values are being correctly set in the ItemSearchCriteria model
> I'm concerned that we are likely stuck at 2.3.4 or won't be capable of making use of
the devMode feature during development because of the side affects we are experiencing with
the latest two GA releases of the framework.
> ___________________________________________________________
> Chris Cranford
> SAP/Oracle/J2EE Applications Developer
> SETECH Inc & Companies
> 903 Industrial Drive, Murfreesboro TN 37129
> Phone: (615) 890-1755 x361, Fax: (615) 890-9057, Mobile: (704) 650-1042
> Email:<>

To unsubscribe, e-mail:
For additional commands, e-mail:

Email secured by Check Point
View raw message