You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jonny Cavell <jo...@gmail.com> on 2008/03/06 18:04:04 UTC

Being driven mad by the ParametersInterceptor

Fed up with messages such as Error setting expression 'xxx' with value
'[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my default
stack.

However, I wanted to use it for a particular action, so I added it there. It
took me a while to work out that it needed to go before the default
interceptor stack (got loads of misleading error messages).

When I did add it, I found that I got lots of checkbox related warnings:
 Error setting expression '__checkbox_xxx' with value
'[Ljava.lang.String;@891a0'

Am I doing anything wrong, or does this interceptor suck big time?

Thanks

Jonny

-- 
View this message in context: http://www.nabble.com/Being-driven-mad-by-the-ParametersInterceptor-tp15878320p15878320.html
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: [struts] Being driven mad by the ParametersInterceptor

Posted by Jonny Cavell <jo...@gmail.com>.
Yes, you're right that they are just warnings and I could eliminate them with
logging config; also yes I'm running in devMode.

Looking at the source, the exception will always be thrown and logged
though, even when not in devMode.

I've noticed there's a NoParameters marker interface which actions can
implement to specify there should be no automatic setting of params.

Cheers

Jonny 


Kropp, Henning wrote:
> 
> Dale Newfield schrieb:
>> Jonny Cavell wrote:
>>> So that brings me back to the original problem - getting all these Error
>>> setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' 
>>> messages
>>> for every single parameter that doesn't have an associated setter 
>>> method on
>>> the action. How do I stop these errors?
>>
>> Unless I'm mistaken, those are not errors, just WARNings.  You are 
>> free to change your logging levels so they don't make it into your log 
>> files.
> As I am experiencing the same problems by now. I have checked and those 
> messages are not logged if devMode is turned off.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Being-driven-mad-by-the-ParametersInterceptor-tp15878320p15891101.html
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: [struts] Being driven mad by the ParametersInterceptor

Posted by "Kropp, Henning" <hk...@microlution.de>.
Dale Newfield schrieb:
> Jonny Cavell wrote:
>> So that brings me back to the original problem - getting all these Error
>> setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' 
>> messages
>> for every single parameter that doesn't have an associated setter 
>> method on
>> the action. How do I stop these errors?
>
> Unless I'm mistaken, those are not errors, just WARNings.  You are 
> free to change your logging levels so they don't make it into your log 
> files.
As I am experiencing the same problems by now. I have checked and those 
messages are not logged if devMode is turned off.
>
> -Dale
>
> ---------------------------------------------------------------------
> 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


Re: [struts] Being driven mad by the ParametersInterceptor

Posted by Dale Newfield <Da...@Newfield.org>.
Jonny Cavell wrote:
> So that brings me back to the original problem - getting all these Error
> setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages
> for every single parameter that doesn't have an associated setter method on
> the action. How do I stop these errors?

Unless I'm mistaken, those are not errors, just WARNings.  You are free 
to change your logging levels so they don't make it into your log files.

-Dale

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


Re: Being driven mad by the ParametersInterceptor

Posted by Dave Newton <ne...@yahoo.com>.
--- Jonny Cavell <jo...@gmail.com> wrote:
> This highlights a problem in the way that interceptors are configured. If I
> want to remove one from the default stack, I can't then easily put it back
> in the same place for a specific action.

On the rare occasions where I've needed this functionality I've created
"before" and "after" stacks: the default stack simply uses the "before" and
"after" stacks in order; any actions that require different behavior specify
them manually, including whatever is necessary between them. I've only done
that twice, and I mean to eliminate those as well.

I've experimented with various ways of making an interceptor stack more
dynamic, but haven't come up with anything that isn't particularly fragile.
Patches and suggestions will always be considered; please start a new thread
with your ideas.

> So that brings me back to the original problem - getting all these Error
> setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages
> for every single parameter that doesn't have an associated setter method on
> the action. How do I stop these errors?

IIRC if devMode is turned on these messages will be logged; if devMode is off
they won't. I may be remembering that incorrectly, and can't check at the
moment.

Dave


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


Re: Being driven mad by the ParametersInterceptor

Posted by Jonny Cavell <jo...@gmail.com>.
I haven't moved the checkbox interceptor, but of course the order has changed
- in the default stack the checkbox interceptor comes before the params
interceptor.

This highlights a problem in the way that interceptors are configured. If I
want to remove one from the default stack, I can't then easily put it back
in the same place for a specific action.

So that brings me back to the original problem - getting all these Error
setting expression 'xxx' with value '[Ljava.lang.String;@19a82ee' messages
for every single parameter that doesn't have an associated setter method on
the action. How do I stop these errors?

Cheers

Jonny


newton.dave wrote:
> 
> --- Jonny Cavell <jo...@gmail.com> wrote:
>> Fed up with messages such as Error setting expression 'xxx' with value
>> '[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my
>> default stack.
>> 
>> However, I wanted to use it for a particular action, so I added it there.
>> It took me a while to work out that it needed to go before the default
>> interceptor stack (got loads of misleading error messages).
> 
> That depends on how you've defined your custom interceptor stack. In the
> supplied defaultStack it's 14th out of 17 interceptors, which isn't a lot
> like it being first.
> 
>> When I did add it, I found that I got lots of checkbox related warnings:
>>  Error setting expression '__checkbox_xxx' with value
>> '[Ljava.lang.String;@891a0'
>> 
>> Am I doing anything wrong, or does this interceptor suck big time?
> 
> Most likely you're doing something wrong.
> 
> I would be cautious with the in/exclusion and order of parameter-oriented
> interceptors without understanding how they work. For example the
> "checkbox"
> interceptor modifies the parameter list passed on to the next interceptor.
> The error message above, at first glance, would lead me to believe you
> have
> removed the checkbox interceptor from your custom stack.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Being-driven-mad-by-the-ParametersInterceptor-tp15878320p15879264.html
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: Being driven mad by the ParametersInterceptor

Posted by Dave Newton <ne...@yahoo.com>.
--- Jonny Cavell <jo...@gmail.com> wrote:
> Fed up with messages such as Error setting expression 'xxx' with value
> '[Ljava.lang.String;@19a82ee', I got rid of this Interceptor from my
> default stack.
> 
> However, I wanted to use it for a particular action, so I added it there.
> It took me a while to work out that it needed to go before the default
> interceptor stack (got loads of misleading error messages).

That depends on how you've defined your custom interceptor stack. In the
supplied defaultStack it's 14th out of 17 interceptors, which isn't a lot
like it being first.

> When I did add it, I found that I got lots of checkbox related warnings:
>  Error setting expression '__checkbox_xxx' with value
> '[Ljava.lang.String;@891a0'
> 
> Am I doing anything wrong, or does this interceptor suck big time?

Most likely you're doing something wrong.

I would be cautious with the in/exclusion and order of parameter-oriented
interceptors without understanding how they work. For example the "checkbox"
interceptor modifies the parameter list passed on to the next interceptor.
The error message above, at first glance, would lead me to believe you have
removed the checkbox interceptor from your custom stack.

Dave


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