You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Burton Rhodes <bu...@gmail.com> on 2009/08/01 23:28:31 UTC

Re: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Not trying to hijack this thread, but I am from the latter camp Wes
described.  I tried removing the logged errors as you suggested, but
it doesn't seem to work.  If I move up to the broad
"com.opensymphony.xwork2" package it works, but this will remove too
much I fear.  When I drill down to the "....xwork2.ogln" package the
error is logged.  What am I missing?

<!-- This successfully removes the logged errors, but is too broad! -->
<category name="com.opensymphony.xwork2" additivity="true">
   <priority value="FATAL"/>
</category>

<!-- This DOES NOT remove the logged errors, one package down -->
<category name="com.opensymphony.xwork2.ogln" additivity="true">
   <priority value="FATAL"/>
</category>

<!-- This DOES NOT seem to work either?? -->
<category name="com.opensymphony.xwork2.util" additivity="true">
   <priority value="FATAL"/>
</category>

The actual error is:

ERROR: Unable to set parameter [contactId] in result of type
[org.apache.struts2.dispatcher.ServletActionRedirectResult]
Caught OgnlException while setting property 'contactId' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class:
ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: setProperty
Line: 132 - ognl/ObjectPropertyAccessor.java:132:-1
        at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392)
        at com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:143)
        at com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlReflectionProvider.java:91)
        at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221)
        at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:208)
        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:355)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at com.agentsymphony.web.interceptor.LoginInterceptor.intercept(LoginInterceptor.java:24)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
        at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: ognl.NoSuchPropertyException:
org.apache.struts2.dispatcher.ServletActionRedirectResult.contactId
        at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
        at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28)
        at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
        at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
        at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
        at ognl.SimpleNode.setValue(SimpleNode.java:246)
        at ognl.Ognl.setValue(Ognl.java:476)
        at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192)
        at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:385)
        ... 75 more


On Fri, Jul 31, 2009 at 10:01 AM, Peter
Phillips<pe...@googlemail.com> wrote:
> Thanks for your help.  I guess everyone has their own opinions on when
> warnings etc. should appear in the logs and trying to keep everyone
> happy is an impossible task.
>
> After a bit more digging I think I can just implement my own version
> of OgnlValueStackFactory (by setting the struts.valueStackFactory
> property) and then my own version of OgnlValueStack with the warnings
> changed to debug and vica versa!
>
> ---------------------------------------------------------------------
> 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: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Posted by Burton Rhodes <bu...@gmail.com>.
Well... I ended up limiting log level on the object
"com.opensymphony.xwork2.ObjectFactory".  This seemed to do the trick.
 Not sure if that's the "right" solution though.

On Sun, Aug 2, 2009 at 10:40 AM, Dave Newton<ne...@yahoo.com> wrote:
> Martin Gainty wrote:
>>
>> a genuine bug..the prob is trying to hunt down the file as it seems to
>> have disappeared
>>
>> notice the disconnect between com.opensymphony.xwork2.ognl classes and
>> ognl.ObjectPropertyAccessor;
>>
>> here is 2.1.4 xwork class that actually references the non-existent base
>> class
>> /*** @author Gabe */
>> public class XWorkObjectPropertyAccessor extends ObjectPropertyAccessor {
>> }
>>
>> we need to get patrick involved as that file has been deleted from source
>> a while ago.. http://fisheye5.cenqua.com/browse/ognl/java/ognl
>
> The file is there: you are looking in the wrong place, and the commit
> comment for the "deletion" spells out exactly what happened.
>
> If it was a "non-existent base class" XWork wouldn't compile.
>
> Dave
>
> ---------------------------------------------------------------------
> 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: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Posted by Dave Newton <ne...@yahoo.com>.
Martin Gainty wrote:
> a genuine bug..the prob is trying to hunt down the file as it seems to have disappeared
> 
> notice the disconnect between com.opensymphony.xwork2.ognl classes and ognl.ObjectPropertyAccessor;
> 
> here is 2.1.4 xwork class that actually references the non-existent base class
> /*** @author Gabe */
> public class XWorkObjectPropertyAccessor extends ObjectPropertyAccessor {
> }
> 
> we need to get patrick involved as that file has been deleted from source a while ago.. 
> http://fisheye5.cenqua.com/browse/ognl/java/ognl

The file is there: you are looking in the wrong place, and the commit 
comment for the "deletion" spells out exactly what happened.

If it was a "non-existent base class" XWork wouldn't compile.

Dave

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


RE: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Posted by Martin Gainty <mg...@hotmail.com>.
a genuine bug..the prob is trying to hunt down the file as it seems to have disappeared

notice the disconnect between com.opensymphony.xwork2.ognl classes and ognl.ObjectPropertyAccessor;

here is 2.1.4 xwork class that actually references the non-existent base class
/*** @author Gabe */
public class XWorkObjectPropertyAccessor extends ObjectPropertyAccessor {
}

we need to get patrick involved as that file has been deleted from source a while ago.. 
http://fisheye5.cenqua.com/browse/ognl/java/ognl
 
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sun, 2 Aug 2009 09:26:36 -0500
> Subject: Re: [S2] OgnlValueStack Error setting expression warnings after 	upgrade from struts 2 to struts 2.1.7
> From: burtonrhodes@gmail.com
> To: user@struts.apache.org
> 
> Good eye (damn you drunk fingers).... however, even with correct
> spelling the errors are still logged.  Could a different package/class
> be throwing the error?
> 
> On Sat, Aug 1, 2009 at 8:57 PM, Dave Newton<ne...@yahoo.com> wrote:
> > Burton Rhodes wrote:
> >>
> >> Not trying to hijack this thread, but I am from the latter camp Wes
> >> described.  I tried removing the logged errors as you suggested, but
> >> it doesn't seem to work.  If I move up to the broad
> >> "com.opensymphony.xwork2" package it works, but this will remove too
> >> much I fear.  When I drill down to the "....xwork2.ogln" package the
> >> error is logged.  What am I missing?
> >>
> >> <!-- This successfully removes the logged errors, but is too broad! -->
> >> <category name="com.opensymphony.xwork2" additivity="true">
> >>   <priority value="FATAL"/>
> >> </category>
> >>
> >> <!-- This DOES NOT remove the logged errors, one package down -->
> >> <category name="com.opensymphony.xwork2.ogln" additivity="true">
> >>   <priority value="FATAL"/>
> >> </category>
> >
> > What happen when you spell "ognl" correctly?
> >
> > Dave
> >
> > ---------------------------------------------------------------------
> > 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
> 

_________________________________________________________________
Get your vacation photos on your phone!
http://windowsliveformobile.com/en-us/photos/default.aspx?&OCID=0809TL-HM

Re: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Posted by Burton Rhodes <bu...@gmail.com>.
Good eye (damn you drunk fingers).... however, even with correct
spelling the errors are still logged.  Could a different package/class
be throwing the error?

On Sat, Aug 1, 2009 at 8:57 PM, Dave Newton<ne...@yahoo.com> wrote:
> Burton Rhodes wrote:
>>
>> Not trying to hijack this thread, but I am from the latter camp Wes
>> described.  I tried removing the logged errors as you suggested, but
>> it doesn't seem to work.  If I move up to the broad
>> "com.opensymphony.xwork2" package it works, but this will remove too
>> much I fear.  When I drill down to the "....xwork2.ogln" package the
>> error is logged.  What am I missing?
>>
>> <!-- This successfully removes the logged errors, but is too broad! -->
>> <category name="com.opensymphony.xwork2" additivity="true">
>>   <priority value="FATAL"/>
>> </category>
>>
>> <!-- This DOES NOT remove the logged errors, one package down -->
>> <category name="com.opensymphony.xwork2.ogln" additivity="true">
>>   <priority value="FATAL"/>
>> </category>
>
> What happen when you spell "ognl" correctly?
>
> Dave
>
> ---------------------------------------------------------------------
> 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: [S2] OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7

Posted by Dave Newton <ne...@yahoo.com>.
Burton Rhodes wrote:
> Not trying to hijack this thread, but I am from the latter camp Wes
> described.  I tried removing the logged errors as you suggested, but
> it doesn't seem to work.  If I move up to the broad
> "com.opensymphony.xwork2" package it works, but this will remove too
> much I fear.  When I drill down to the "....xwork2.ogln" package the
> error is logged.  What am I missing?
> 
> <!-- This successfully removes the logged errors, but is too broad! -->
> <category name="com.opensymphony.xwork2" additivity="true">
>    <priority value="FATAL"/>
> </category>
> 
> <!-- This DOES NOT remove the logged errors, one package down -->
> <category name="com.opensymphony.xwork2.ogln" additivity="true">
>    <priority value="FATAL"/>
> </category>

What happen when you spell "ognl" correctly?

Dave

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