struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jogep <jo...@web.de>
Subject Re: Result Annotations and parameters
Date Tue, 11 Dec 2007 14:58:31 GMT

no, it does no effect.

my error page displays following error:
Message: null

javax.servlet.ServletException
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:490)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:458)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


and in the log i found only this message:

ERROR (com.opensymphony.xwork2.DefaultActionInvocation:28) - There was an
exception while instantiating the result of type
org.apache.struts2.dispatcher.ServletActionRedirectResult
Caught OgnlException while setting property 'id' 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:400)
at com.opensymphony.xwork2.ognl.OgnlUtil.setProperties(OgnlUtil.java:87)
at
com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperties(OgnlReflectionProvider.java:55)
at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:222)
at
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:201)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:349)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:259)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:141)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:85)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:248)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:85)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:124)

Caused by: ognl.NoSuchPropertyException:
org.apache.struts2.dispatcher.ServletActionRedirectResult.id
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
at
com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)
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:197)
at
com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:393)
... 117 more
ERROR
(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp].[default]:253)
- Servlet.service() for servlet default threw exception
Caught OgnlException while setting property 'id' on type
'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
at
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:205)

This is my Result Configuration:
@Result(value = "myresult.action", type = ServletActionRedirectResult.class,
params={"id","${id}"})



newton.dave wrote:
> 
> Just out of curiosity, does it work if you make the ID getter conformant
> to
> the JavaBean spec, getId() (with appropriate corrections to your
> annotations)?
> 
> d.
> 
> --- Johannes Geppert <jogep@web.de> wrote:
> 
>> Hello Ted,
>> 
>> thank you for reply.
>> 
>> > Is the property actually "ID", as in "String getID()" ?
>> > 
>> > Or is it getId() ?
>> 
>> It's getID(), with XML-Configuration it works perfectly.
>> So there can not be an error with misspelling.
>> 
>> > In the JPA MailReader code (see the sandbox), @Results like this one
>> > are working:
>> > 
>> > @Result(name = Index.SUCCESS, value = Index.INDEX, type
>> > =ServletActionRedirectResult.class, params = {Index.USER,
>> > Index.USER_USERNAME })
>> > 
>> > where
>> > 
>> >     public static final String USER = "user";
>> >     public static final String USER_USERNAME = "${user.username}";
>> 
>> This looks similar to my code, why I become an Error Message, 
>> Is there a Bug with 2.1.0 and 2.0.11 ? Where I can get 2.1.1?
>> 
>> Bye
>> Johannes
>> 
>> 
>> ---------------------------------------------------------------------
>> 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/Result-Annotations-and-parameters-tp14189762p14275442.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


Mime
View raw message