You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Kingdon <sc...@kingdon.net> on 2007/07/03 16:10:20 UTC

Validation dies because of request param array?

I am using Struts 2. I get this error whenever I turn on validation. The
struts automatically returns the input page.

07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error
setting expression 'name' with value '[Ljava.lang.String;@188e507'

There are several parameters that are being passed in to the action. It is
only failing in this one. I have changed the name of the parameter. But the
problem persists with that name.

struts.xml action config includes this interceptor:
<interceptor-ref name="paramsPrepareParamsStack"/>

If I remove the validation xml the problem goes away. But then I have lost
validation. If I remove 'name' from the validation in the xml the problem is
still there. That is, even if there is no mention of the 'name' parameter in
the validation xml, I still get the error.

I have other Actions that are configured the exact same way and work just
fine.

I have tried rebuilding from scratch. No fix there.

It looks like somehow there is are two 'name' parameters being sent in. So
struts is handling it with an array. To ensure this is struts I have sent
requests to the server by pasting the url in the browser with only one name
paramater. I still get the error.

I feel like I have done everything but the one thing that will work. grrrr!

Any ideas?

Re: [S2] How can I get system validation message modified?

Posted by Don Brown <do...@gmail.com>.
Take a look at the localization section in our documentation, and
override the messages for those validation error keys.

Don

On 7/6/07, Wei Xu <ta...@hotmail.com> wrote:
> In my scenario, I didn't use any Struts validation frame.
>
> <s:textfield name="field1" />
>
> Here, "field1" is a numeric field in Java bean. If I input a validate
> numeric, for instance, a random string, there is an error validation message
> appearing automatially by Struts.
>
> >>Invalid field value for field "field1"
>
> My question is how I could generate a self-defined string instead of this
> system validation message.
>
> Thanks.
>
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar - get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[S2] How can I get system validation message modified?

Posted by Wei Xu <ta...@hotmail.com>.
In my scenario, I didn't use any Struts validation frame.

<s:textfield name="field1" />

Here, "field1" is a numeric field in Java bean. If I input a validate 
numeric, for instance, a random string, there is an error validation message 
appearing automatially by Struts.

>>Invalid field value for field "field1"

My question is how I could generate a self-defined string instead of this 
system validation message.

Thanks.

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Validation dies because of request param array?

Posted by Scott Kingdon <sc...@kingdon.net>.
Ah. Yes. And it was. I have gone on and found a work around using dynamic
methods, so it got changed. Dynamic methods is actually working. But the old
version using ProfileAddress did not.

Here is the form part of editProfile.jsp:

<s:iterator value="account.locations" status="status" >
                            <div class="address">
                                <div id="text<s:property
value="#status.index"/>">
                                    <p><span class="uni-bold"><s:property
value="name"/></span> <a href="javascript:showAddressForm('<s:property
value="#status.index"/>')">edit</a></p>
                                    <p><s:property value="street1"/></p>
                                    <p><s:property value="street2"/></p>
                                    <p><s:property value="city"/>,
<s:property value="state"/> <s:property value="zip" /></p>
                                    <p><s:property value="phone"/></p>
                                </div>
                                <div id="form<s:property
value="#status.index"/>" class="uni-hidden">
                                    <s:form action="SaveProfileAddress"
id="addressForm${status.index}" cssClass="cssform" theme="simple">
                                        <p><label
for="name">Name:</label><s:textfield key="name"/></p>
                                        <p><label for="street1">Street Line
1:</label><s:textfield key="street1"/></p>
                                        <p><label for="street2">Stree Line
2:</label><s:textfield key="street2"/></p>
                                        <p><label
for="street1">City:</label><s:textfield key="city"/></p>
                                        <p><label
for="state">State:</label><s:textfield key="state" size="2"/></p>
                                        <p><label
for="zip">Zip:</label><s:textfield key="zip"/></p>
                                        <p><label
for="phone">Phone:</label><s:textfield key="phone"/></p>
                                        <p>
                                            <input type="hidden"
name="addressIndex" value="<s:property value="#status.index"/>" />
                                            <input type="button"
value="Save" onclick="UserProfile.saveAddress(<s:property
value="#status.index"/>)"/>
                                            <input type="button"
value="Cancel" onclick="hideAddressForm('<s:property
value="#status.index"/>')"/>
                                        </p>
                                    </s:form>
                                </div>
                            </div>
                        </s:iterator>

================================================

On 7/3/07, Crocker, Patrick <Pa...@bear.com> wrote:
>
> Shouldn't your action class be set to
> "com.ourcompany.struts.action.profile.ProfileAddress"?
>
> Aside from that, can you share the editProfile.jsp file?
>
> - Patrick.
>
> -----Original Message-----
> From: scott.kingdon@gmail.com [mailto:scott.kingdon@gmail.com] On Behalf
> Of Scott Kingdon
> Sent: Tuesday, July 03, 2007 3:15 PM
> To: Struts Users Mailing List
> Subject: Re: Validation dies because of request param array?
>
> I am thinking that this did not solve the problem, but rather squelched
> the only message that gave me a clue as to what might be happening.
>
> So back to the original problem. Here is the struts config:
>
> <action name="Profile" class="
> com.ourcompany.struts.action.profile.Profile
> ">
>        <result
> name="input">/WEB-INF/pages/profile/editProfile.jsp</result>
>        <result name="error">/WEB-INF/pages/error.jsp</result>
> </action>
>
> Here is the class:
>
> public class ProfileAddress extends Profile {
>
>     private static final long serialVersionUID = 1L;
>
>     private String street1;
>     private String street2;
>     private String city;
>     private String state;
>     private String zip;
>     private String phone;
>     private String securityQuestion;
>     private String securityQuestionAnswer;
>     private Integer addressIndex;
>
>     public String doSave() throws Exception {
>
>         log.info("save address!");
>
>         return SUCCESS;
>     }
>
>     public String getCity() {
>         return city;
>     }
>
>     public void setCity(String city) {
>         this.city = city;
>     }
>
>     public String getPhone() {
>         return phone;
>     }
>
>     public void setPhone(String phone) {
>         this.phone = phone;
>     }
>
>     public String getSecurityQuestion() {
>         return securityQuestion;
>     }
>
>     public void setSecurityQuestion(String securityQuestion) {
>         this.securityQuestion = securityQuestion;
>     }
>
>     public String getSecurityQuestionAnswer() {
>         return securityQuestionAnswer;
>     }
>
>     public void setSecurityQuestionAnswer(String securityQuestionAnswer)
> {
>         this.securityQuestionAnswer = securityQuestionAnswer;
>     }
>
>     public String getState() {
>         return state;
>     }
>
>     public void setState(String state) {
>         this.state = state;
>     }
>
>     public String getStreet1() {
>         return street1;
>     }
>
>     public void setStreet1(String street1) {
>         this.street1 = street1;
>     }
>
>     public String getStreet2() {
>         return street2;
>     }
>
>     public void setStreet2(String street2) {
>         this.street2 = street2;
>     }
>
>     public String getZip() {
>         return zip;
>     }
>
>     public void setZip(String zip) {
>         this.zip = zip;
>     }
>
>     public Integer getAddressIndex() {
>         return addressIndex;
>     }
>
>     public void setAddressIndex(Integer addressIndex) {
>         this.addressIndex = addressIndex;
>     }
> }
>
>
> As much as I like Struts 2, I am having a hard time debugging why some
> interceptors fail. There is no error message. Nothing. It just returns
> the input page.
>
> ==========================================
>
> On 7/3/07, Scott Kingdon <sc...@kingdon.net> wrote:
> >
> > By making that change the error has gone away. However it is now
> > silently dying for some other reason. I need to track that down. If I
> > have more problems I will post the code.
> >
> > ============================================
> >
> > On 7/3/07, cilquirm < aadi.deshpande@gmail.com> wrote:
> > >
> > >
> > >
> > > I should correct myself. My problem may not be related, since it was
>
> > > due to the CookieInterceptor's handling of setValue.
> > >
> > > Can you post your pojo and your query string?
> > >
> > >
> > >
> > > cilquirm wrote:
> > > >
> > > > Do you have struts.devMode = true?
> > > >
> > > > I had the same problem and I was forced to change struts.devMode =
> > > false
> > > >
> > > > I believe this is a change from 2.0.6  ( and in some regards, a
> > > > worse
> > > one
> > > > at that ).
> > > >
> > > > I'm still investigating it, but please try turning devMode off and
> > > seeing
> > > > if it helps.
> > > >
> > > >
> > > >
> > > > Scott Kingdon wrote:
> > > >>
> > > >> I am using Struts 2. I get this error whenever I turn on
> validation.
> > > The
> > > >> struts automatically returns the input page.
> > > >>
> > > >> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR
> > > [ParametersInterceptor]
> > > >> ParametersInterceptor - [setParameters]: Unexpected Exception
> > > catched:
> > > >> Error
> > > >> setting expression 'name' with value
> '[Ljava.lang.String;@188e507'
> > > >>
> > > >> There are several parameters that are being passed in to the
> action.
> > > It
> > > >> is
> > > >> only failing in this one. I have changed the name of the
> parameter.
> > > But
> > > >> the
> > > >> problem persists with that name.
> > > >>
> > > >> struts.xml action config includes this interceptor:
> > > >> <interceptor-ref name="paramsPrepareParamsStack"/>
> > > >>
> > > >> If I remove the validation xml the problem goes away. But then I
> > > >> have lost validation. If I remove 'name' from the validation in
> > > >> the xml the
> > > problem
> > > >> is
> > > >> still there. That is, even if there is no mention of the 'name'
> > > parameter
> > > >> in
> > > >> the validation xml, I still get the error.
> > > >>
> > > >> I have other Actions that are configured the exact same way and
> > > >> work
> > > just
> > > >> fine.
> > > >>
> > > >> I have tried rebuilding from scratch. No fix there.
> > > >>
> > > >> It looks like somehow there is are two 'name' parameters being
> > > >> sent
> > > in.
> > > >> So
> > > >> struts is handling it with an array. To ensure this is struts I
> > > >> have
> > > sent
> > > >> requests to the server by pasting the url in the browser with
> > > >> only
> > > one
> > > >> name
> > > >> paramater. I still get the error.
> > > >>
> > > >> I feel like I have done everything but the one thing that will
> work.
> > > >> grrrr!
> > > >>
> > > >> Any ideas?
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Validation-dies-because-of-request-param-array
> > > --tf4018521.html#a11413932 Sent from the Struts - User mailing list
> > > archive at Nabble.com.
> > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Validation dies because of request param array?

Posted by "Crocker, Patrick" <Pa...@bear.com>.
Shouldn't your action class be set to
"com.ourcompany.struts.action.profile.ProfileAddress"?

Aside from that, can you share the editProfile.jsp file?

- Patrick.

-----Original Message-----
From: scott.kingdon@gmail.com [mailto:scott.kingdon@gmail.com] On Behalf
Of Scott Kingdon
Sent: Tuesday, July 03, 2007 3:15 PM
To: Struts Users Mailing List
Subject: Re: Validation dies because of request param array?

I am thinking that this did not solve the problem, but rather squelched
the only message that gave me a clue as to what might be happening.

So back to the original problem. Here is the struts config:

<action name="Profile" class="
com.ourcompany.struts.action.profile.Profile
">
       <result
name="input">/WEB-INF/pages/profile/editProfile.jsp</result>
       <result name="error">/WEB-INF/pages/error.jsp</result>
</action>

Here is the class:

public class ProfileAddress extends Profile {

    private static final long serialVersionUID = 1L;

    private String street1;
    private String street2;
    private String city;
    private String state;
    private String zip;
    private String phone;
    private String securityQuestion;
    private String securityQuestionAnswer;
    private Integer addressIndex;

    public String doSave() throws Exception {

        log.info("save address!");

        return SUCCESS;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSecurityQuestion() {
        return securityQuestion;
    }

    public void setSecurityQuestion(String securityQuestion) {
        this.securityQuestion = securityQuestion;
    }

    public String getSecurityQuestionAnswer() {
        return securityQuestionAnswer;
    }

    public void setSecurityQuestionAnswer(String securityQuestionAnswer)
{
        this.securityQuestionAnswer = securityQuestionAnswer;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getStreet1() {
        return street1;
    }

    public void setStreet1(String street1) {
        this.street1 = street1;
    }

    public String getStreet2() {
        return street2;
    }

    public void setStreet2(String street2) {
        this.street2 = street2;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public Integer getAddressIndex() {
        return addressIndex;
    }

    public void setAddressIndex(Integer addressIndex) {
        this.addressIndex = addressIndex;
    }
}


As much as I like Struts 2, I am having a hard time debugging why some
interceptors fail. There is no error message. Nothing. It just returns
the input page.

==========================================

On 7/3/07, Scott Kingdon <sc...@kingdon.net> wrote:
>
> By making that change the error has gone away. However it is now 
> silently dying for some other reason. I need to track that down. If I 
> have more problems I will post the code.
>
> ============================================
>
> On 7/3/07, cilquirm < aadi.deshpande@gmail.com> wrote:
> >
> >
> >
> > I should correct myself. My problem may not be related, since it was

> > due to the CookieInterceptor's handling of setValue.
> >
> > Can you post your pojo and your query string?
> >
> >
> >
> > cilquirm wrote:
> > >
> > > Do you have struts.devMode = true?
> > >
> > > I had the same problem and I was forced to change struts.devMode =
> > false
> > >
> > > I believe this is a change from 2.0.6  ( and in some regards, a 
> > > worse
> > one
> > > at that ).
> > >
> > > I'm still investigating it, but please try turning devMode off and
> > seeing
> > > if it helps.
> > >
> > >
> > >
> > > Scott Kingdon wrote:
> > >>
> > >> I am using Struts 2. I get this error whenever I turn on
validation.
> > The
> > >> struts automatically returns the input page.
> > >>
> > >> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR
> > [ParametersInterceptor]
> > >> ParametersInterceptor - [setParameters]: Unexpected Exception
> > catched:
> > >> Error
> > >> setting expression 'name' with value
'[Ljava.lang.String;@188e507'
> > >>
> > >> There are several parameters that are being passed in to the
action.
> > It
> > >> is
> > >> only failing in this one. I have changed the name of the
parameter.
> > But
> > >> the
> > >> problem persists with that name.
> > >>
> > >> struts.xml action config includes this interceptor:
> > >> <interceptor-ref name="paramsPrepareParamsStack"/>
> > >>
> > >> If I remove the validation xml the problem goes away. But then I 
> > >> have lost validation. If I remove 'name' from the validation in 
> > >> the xml the
> > problem
> > >> is
> > >> still there. That is, even if there is no mention of the 'name'
> > parameter
> > >> in
> > >> the validation xml, I still get the error.
> > >>
> > >> I have other Actions that are configured the exact same way and 
> > >> work
> > just
> > >> fine.
> > >>
> > >> I have tried rebuilding from scratch. No fix there.
> > >>
> > >> It looks like somehow there is are two 'name' parameters being 
> > >> sent
> > in.
> > >> So
> > >> struts is handling it with an array. To ensure this is struts I 
> > >> have
> > sent
> > >> requests to the server by pasting the url in the browser with 
> > >> only
> > one
> > >> name
> > >> paramater. I still get the error.
> > >>
> > >> I feel like I have done everything but the one thing that will
work.
> > >> grrrr!
> > >>
> > >> Any ideas?
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Validation-dies-because-of-request-param-array
> > --tf4018521.html#a11413932 Sent from the Struts - User mailing list 
> > archive at Nabble.com.
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, 
offer or agreement or any information about any transaction, customer 
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Validation dies because of request param array?

Posted by Scott Kingdon <sc...@kingdon.net>.
I am thinking that this did not solve the problem, but rather squelched the
only message that gave me a clue as to what might be happening.

So back to the original problem. Here is the struts config:

<action name="Profile" class=" com.ourcompany.struts.action.profile.Profile
">
       <result name="input">/WEB-INF/pages/profile/editProfile.jsp</result>
       <result name="error">/WEB-INF/pages/error.jsp</result>
</action>

Here is the class:

public class ProfileAddress extends Profile {

    private static final long serialVersionUID = 1L;

    private String street1;
    private String street2;
    private String city;
    private String state;
    private String zip;
    private String phone;
    private String securityQuestion;
    private String securityQuestionAnswer;
    private Integer addressIndex;

    public String doSave() throws Exception {

        log.info("save address!");

        return SUCCESS;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSecurityQuestion() {
        return securityQuestion;
    }

    public void setSecurityQuestion(String securityQuestion) {
        this.securityQuestion = securityQuestion;
    }

    public String getSecurityQuestionAnswer() {
        return securityQuestionAnswer;
    }

    public void setSecurityQuestionAnswer(String securityQuestionAnswer) {
        this.securityQuestionAnswer = securityQuestionAnswer;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getStreet1() {
        return street1;
    }

    public void setStreet1(String street1) {
        this.street1 = street1;
    }

    public String getStreet2() {
        return street2;
    }

    public void setStreet2(String street2) {
        this.street2 = street2;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public Integer getAddressIndex() {
        return addressIndex;
    }

    public void setAddressIndex(Integer addressIndex) {
        this.addressIndex = addressIndex;
    }
}


As much as I like Struts 2, I am having a hard time debugging why some
interceptors fail. There is no error message. Nothing. It just returns the
input page.

==========================================

On 7/3/07, Scott Kingdon <sc...@kingdon.net> wrote:
>
> By making that change the error has gone away. However it is now silently
> dying for some other reason. I need to track that down. If I have more
> problems I will post the code.
>
> ============================================
>
> On 7/3/07, cilquirm < aadi.deshpande@gmail.com> wrote:
> >
> >
> >
> > I should correct myself. My problem may not be related, since it was due
> > to
> > the CookieInterceptor's handling of setValue.
> >
> > Can you post your pojo and your query string?
> >
> >
> >
> > cilquirm wrote:
> > >
> > > Do you have struts.devMode = true?
> > >
> > > I had the same problem and I was forced to change struts.devMode =
> > false
> > >
> > > I believe this is a change from 2.0.6  ( and in some regards, a worse
> > one
> > > at that ).
> > >
> > > I'm still investigating it, but please try turning devMode off and
> > seeing
> > > if it helps.
> > >
> > >
> > >
> > > Scott Kingdon wrote:
> > >>
> > >> I am using Struts 2. I get this error whenever I turn on validation.
> > The
> > >> struts automatically returns the input page.
> > >>
> > >> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR
> > [ParametersInterceptor]
> > >> ParametersInterceptor - [setParameters]: Unexpected Exception
> > catched:
> > >> Error
> > >> setting expression 'name' with value '[Ljava.lang.String;@188e507'
> > >>
> > >> There are several parameters that are being passed in to the action.
> > It
> > >> is
> > >> only failing in this one. I have changed the name of the parameter.
> > But
> > >> the
> > >> problem persists with that name.
> > >>
> > >> struts.xml action config includes this interceptor:
> > >> <interceptor-ref name="paramsPrepareParamsStack"/>
> > >>
> > >> If I remove the validation xml the problem goes away. But then I have
> > >> lost
> > >> validation. If I remove 'name' from the validation in the xml the
> > problem
> > >> is
> > >> still there. That is, even if there is no mention of the 'name'
> > parameter
> > >> in
> > >> the validation xml, I still get the error.
> > >>
> > >> I have other Actions that are configured the exact same way and work
> > just
> > >> fine.
> > >>
> > >> I have tried rebuilding from scratch. No fix there.
> > >>
> > >> It looks like somehow there is are two 'name' parameters being sent
> > in.
> > >> So
> > >> struts is handling it with an array. To ensure this is struts I have
> > sent
> > >> requests to the server by pasting the url in the browser with only
> > one
> > >> name
> > >> paramater. I still get the error.
> > >>
> > >> I feel like I have done everything but the one thing that will work.
> > >> grrrr!
> > >>
> > >> Any ideas?
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: Validation dies because of request param array?

Posted by Scott Kingdon <sc...@kingdon.net>.
By making that change the error has gone away. However it is now silently
dying for some other reason. I need to track that down. If I have more
problems I will post the code.

============================================

On 7/3/07, cilquirm <aa...@gmail.com> wrote:
>
>
>
> I should correct myself. My problem may not be related, since it was due
> to
> the CookieInterceptor's handling of setValue.
>
> Can you post your pojo and your query string?
>
>
>
> cilquirm wrote:
> >
> > Do you have struts.devMode = true?
> >
> > I had the same problem and I was forced to change struts.devMode = false
> >
> > I believe this is a change from 2.0.6  ( and in some regards, a worse
> one
> > at that ).
> >
> > I'm still investigating it, but please try turning devMode off and
> seeing
> > if it helps.
> >
> >
> >
> > Scott Kingdon wrote:
> >>
> >> I am using Struts 2. I get this error whenever I turn on validation.
> The
> >> struts automatically returns the input page.
> >>
> >> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
> >> ParametersInterceptor - [setParameters]: Unexpected Exception catched:
> >> Error
> >> setting expression 'name' with value '[Ljava.lang.String;@188e507'
> >>
> >> There are several parameters that are being passed in to the action. It
> >> is
> >> only failing in this one. I have changed the name of the parameter. But
> >> the
> >> problem persists with that name.
> >>
> >> struts.xml action config includes this interceptor:
> >> <interceptor-ref name="paramsPrepareParamsStack"/>
> >>
> >> If I remove the validation xml the problem goes away. But then I have
> >> lost
> >> validation. If I remove 'name' from the validation in the xml the
> problem
> >> is
> >> still there. That is, even if there is no mention of the 'name'
> parameter
> >> in
> >> the validation xml, I still get the error.
> >>
> >> I have other Actions that are configured the exact same way and work
> just
> >> fine.
> >>
> >> I have tried rebuilding from scratch. No fix there.
> >>
> >> It looks like somehow there is are two 'name' parameters being sent in.
> >> So
> >> struts is handling it with an array. To ensure this is struts I have
> sent
> >> requests to the server by pasting the url in the browser with only one
> >> name
> >> paramater. I still get the error.
> >>
> >> I feel like I have done everything but the one thing that will work.
> >> grrrr!
> >>
> >> Any ideas?
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Validation dies because of request param array?

Posted by cilquirm <aa...@gmail.com>.

I should correct myself. My problem may not be related, since it was due to
the CookieInterceptor's handling of setValue.

Can you post your pojo and your query string?



cilquirm wrote:
> 
> Do you have struts.devMode = true?
> 
> I had the same problem and I was forced to change struts.devMode = false
> 
> I believe this is a change from 2.0.6  ( and in some regards, a worse one
> at that ).
> 
> I'm still investigating it, but please try turning devMode off and seeing
> if it helps.
> 
> 
> 
> Scott Kingdon wrote:
>> 
>> I am using Struts 2. I get this error whenever I turn on validation. The
>> struts automatically returns the input page.
>> 
>> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
>> ParametersInterceptor - [setParameters]: Unexpected Exception catched:
>> Error
>> setting expression 'name' with value '[Ljava.lang.String;@188e507'
>> 
>> There are several parameters that are being passed in to the action. It
>> is
>> only failing in this one. I have changed the name of the parameter. But
>> the
>> problem persists with that name.
>> 
>> struts.xml action config includes this interceptor:
>> <interceptor-ref name="paramsPrepareParamsStack"/>
>> 
>> If I remove the validation xml the problem goes away. But then I have
>> lost
>> validation. If I remove 'name' from the validation in the xml the problem
>> is
>> still there. That is, even if there is no mention of the 'name' parameter
>> in
>> the validation xml, I still get the error.
>> 
>> I have other Actions that are configured the exact same way and work just
>> fine.
>> 
>> I have tried rebuilding from scratch. No fix there.
>> 
>> It looks like somehow there is are two 'name' parameters being sent in.
>> So
>> struts is handling it with an array. To ensure this is struts I have sent
>> requests to the server by pasting the url in the browser with only one
>> name
>> paramater. I still get the error.
>> 
>> I feel like I have done everything but the one thing that will work.
>> grrrr!
>> 
>> Any ideas?
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Validation dies because of request param array?

Posted by cilquirm <aa...@gmail.com>.
Do you have struts.devMode = true?

I had the same problem and I was forced to change struts.devMode = false

I believe this is a change from 2.0.6  ( and in some regards, a worse one at
that ).

I'm still investigating it, but please try turning devMode off and seeing if
it helps.



Scott Kingdon wrote:
> 
> I am using Struts 2. I get this error whenever I turn on validation. The
> struts automatically returns the input page.
> 
> 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
> ParametersInterceptor - [setParameters]: Unexpected Exception catched:
> Error
> setting expression 'name' with value '[Ljava.lang.String;@188e507'
> 
> There are several parameters that are being passed in to the action. It is
> only failing in this one. I have changed the name of the parameter. But
> the
> problem persists with that name.
> 
> struts.xml action config includes this interceptor:
> <interceptor-ref name="paramsPrepareParamsStack"/>
> 
> If I remove the validation xml the problem goes away. But then I have lost
> validation. If I remove 'name' from the validation in the xml the problem
> is
> still there. That is, even if there is no mention of the 'name' parameter
> in
> the validation xml, I still get the error.
> 
> I have other Actions that are configured the exact same way and work just
> fine.
> 
> I have tried rebuilding from scratch. No fix there.
> 
> It looks like somehow there is are two 'name' parameters being sent in. So
> struts is handling it with an array. To ensure this is struts I have sent
> requests to the server by pasting the url in the browser with only one
> name
> paramater. I still get the error.
> 
> I feel like I have done everything but the one thing that will work.
> grrrr!
> 
> Any ideas?
> 
> 

-- 
View this message in context: http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413408
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org