I don't have permission to re-open it unfortunately.

Musachy Barroso on 02/06/08 23:46, wrote:
This should probably be re-opened as a bug. Just thinking out loud
here, there should be some interface that results must implement if
they want to use params this way, so the ReflectionProvider will just
pass the params thru the interface method, instead of trying to set
them as properties.

musachy

On Mon, Jun 2, 2008 at 6:20 PM, Adam Hardy
<[EMAIL PROTECTED]> wrote:
That's a lucid explanation alright, but there are still a few unanswered
questions:

 - it's marked as resolved for 2.0.8, presumably the resolution is the
change of the logging from WARN to DEBUG. However in OgnlUtil line 369 in
v2.0.9, it's still logged at WARN.

 - perhaps this log level change should be requested and the issue should be
re-opened as an enhancement?

 - the real enhancement is as Don says, to refactor the code so that no
exception is thrown.

Musachy Barroso on 02/06/08 18:52, wrote:
Don had a better explanation on the issue :)

"The actual problem here is the way that results are created. Result
parameters are supposed to correspond to properties on the Result
object, however the action redirect result uses them as parameters for
its URL. When building the result, ognl will throw an exception, which
is logged as a warn, if it can't set the property on the result
object, which in this case, is ok. I've modified XWork to log them as
debug since warn is too harsh. This has the sideeffect of possibly
hiding issues with result parameters when they really are result
properties, but I think it is the lesser of the two evils. The whole
thing needs to be re-evaluated as there shouldn't be any case when
exceptions thrown are "ok"."

musachy

On Mon, Jun 2, 2008 at 1:51 PM, Musachy Barroso <[EMAIL PROTECTED]> wrote:
If I don't remember wrong, the problem is that the value of params are
set as properties in the Result object. In the case of the
action-redirect result, these params are used as params to the target
action. The params are indeed passed, but when struts tries to set
them as properties in the result, it fails (hence the logged
exception).

musachy

On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
<[EMAIL PROTECTED]> wrote:
Only solution is a code change where it is logged.

As I said earlier in the thread, I think that closed bug report should
be
re-opened or cloned and set to Enhancement.

Mark Lester on 02/06/08 17:42, wrote:
Yeah it sets the parameter for me too it just throws the exception
which I a bit of an annoyance and wondering how to make it not throw
that exception

-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent:
Monday,
June 02, 2008 8:43 AM
To: Struts Users Mailing List
Subject: Re: Action-Redirect Parameter Problem

I had a look at the code and I can see why it throws an exception at
that point, but despite that, my experience is that it works - it does
set
the
parameter on my Result.

Mark Lester on 02/06/08 13:08, wrote:
Yeah I am still having problems with it.

-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent:
Sunday,
June 01, 2008 2:52 PM
To: Struts Users Mailing List
Subject: Re: Action-Redirect Parameter Problem

That issue is closed, although there is a comment left after it was
closed suggesting that the issue is still a problem and that the bug
should
be re-opened.

I see this 'warning' from OGNL wherever I use Action-Redirect
results
with the latest struts2 version, and it's true that the stacktrace in
the
webserver log is distracting, but I don't find any problems with it
like
the last
comment suggests.

It's not clear why the poster of that comment didn't re-open the bug
or create a new one if there is a real problem there.

Do you find problems with it still?

It seems to me that the issue should not have been changed from
status
open to resolved, rather it should have been changed from priority
major
to
enhancement.

Also the poster of the last comment should have left more details
with
perhaps a patch or unit-test displaying his/her bug.


Adam


Mark Lester on 30/05/08 14:31, wrote:
Thanks for the quick response. I don't think that is the problem
because that directory is already clear plus I have only used the
current version of struts2
 -----Original Message-----
From: Owen Berry [mailto:[EMAIL PROTECTED] Sent: Friday, May 30,
2008 9:24 AM
To: Struts Users Mailing List
Subject: Re: Action-Redirect Parameter Problem

If you're using Maven, you should try clearing out your local Maven
repository (rm -rf ~/.m2/repository) and try again ... I've had a
few
cases where I seemed to be using old versions of jars until I did
this.

On Fri, May 30, 2008 at 9:18 AM, Mark Lester
<[EMAIL PROTECTED]>
wrote:
I followed the
http://struts.apache.org/2.x/docs/redirect-action-result.html To
pass
parameters to an action

And it generates the exception

Caught OgnlException while setting property 'navigation' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'.



I looked the Exception up and I found a bug report for struts 2 at

http://issues.apache.org/struts/browse/WW-1714



The problem is that it says the issue is resolved as of version
2.08
but I am using 2.11 and I am still getting the warning.

Information regarding this issue would be very helpful.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to