> -----Original Message-----
> From: Jeromy Evans [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 05, 2008 4:53 PM
> To: Struts Users Mailing List
> Subject: Re: Simple helloworld test fails with "Could not
> find action or result"
>
> I can't see anything wrong. My guess is still that it still
> hasn't deployed correctly.
>
> Time to use the source... Put a breakpoint in your action
> and trace what happens after you return "success".
> Immediately you'll have access to the ActionInvocation and
> ActionConfig. The latter will specify which results are
> defined and their types. You won't have to step far to find
> out whether it found the result and whether the result had an error.
I see DefaultActionInvocation in the stack trace. When it finally
fails, the following is the entire stack trace:
SEVERE: Could not find action or result
No result defined for action com.wamu.struts.helloworld.MainAction and
result success
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:350)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:253)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Vali
dationInterceptor.java:150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationIntercepto
r.doIntercept(AnnotationValidationInterceptor.java:48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept
(ConversionErrorInterceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:167)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercep
t(StaticParametersInterceptor.java:105)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInt
erceptor.java:83)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploa
dInterceptor.java:207)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(Mod
elDrivenInterceptor.java:74)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.interce
pt(ScopedModelDrivenInterceptor.java:127)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(
ProfilingActivationInterceptor.java:107)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(
DebuggingInterceptor.java:206)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(Chaini
ngInterceptor.java:115)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterc
eptor.java:143)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(Prepa
reInterceptor.java:121)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInte
rceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
04)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContex
tCleanUp.java:99)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
>
> Karr, David wrote:
> >> -----Original Message-----
> >> From: Jeromy Evans [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, March 05, 2008 3:11 PM
> >> To: Struts Users Mailing List
> >> Subject: Re: Simple helloworld test fails with "Could not
> find action
> >> or result"
> >>
> >> I don't see anything wrong with it, provided MainAction returns
> >> "success" (MainAction.java wasn't attached).
> >>
> >
> > Cute. I guess my company decided that java is unsafe, so
> they removed
> > it from the attachments :) . I'll reattach it with a fake extent.
> > I'll also attach my JSP. Perhaps that's relevant.
> >
> > The Action implementation extends ActionSupport, and it's using the
> > SUCCESS constant.
> >
> >
> >> Is it possible you have a conflicting struts.xml deployed in the
> >> webapp, or any plugin jars deployed? The only other time
> I've seen
> >> the response you're returning the correct result code is when the
> >> Result implementation has encountered an error (not using the
> >> CodeBehind plugin are you?)
> >>
> >
> > I have the following jars in WEB-INF/lib:
> >
> > spring-context-2.0.5.jar
> > spring-core-2.0.5.jar
> > commons-logging-1.0.4.jar
> > spring-web-2.0.5.jar
> > freemarker-2.3.8.jar
> > struts2-core-2.0.11.jar
> > ognl-2.6.11.jar
> > struts2-spring-plugin-2.0.11.jar
> > spring-beans-2.0.5.jar
> > xwork-2.0.4.jar
> >
> > I do have the Spring plugin in there. Could that be an issue? I'm
> > going to want to use that soon, but I'm not really using it yet.
> >
> > I tried exporting my WAR and verifying I only have my single
> > struts.xml in it.
> >
> >
> >> What happen if your go directly to /main.action and /main2.action?
> >>
> >
> > That's what I've been doing. When I go to "/main.action",
> I get the
> > error I described.
> >
> >
> >> You have setup two actions:
> >> main - implemented by MainAction, with a forward for "success" to
> >> /main.jsp
> >> main2 - implemented by ActionSupport, with a forward for
> "success"
> >> to /main.jsp and you're using the default interceptors. It is
> >> configured correctly.
> >>
> >> Karr, David wrote:
> >>
> >>> I'm sure I have a simple error here, but I don't see it.
> >>>
> >>> I'm trying to construct a simple "hello, world" app with
> >>>
> >> v2.0.11. I
> >>
> >>> have an "index.jsp" that redirects to "main.action". I
> started out
> >>> with the "main" action just having a result
> >>>
> >> (name="success") going to
> >>
> >>> "/main.jsp". That appears to work. I then cloned the
> action (and
> >>> changing the name), adding a "class" attribute referring to
> >>>
> >> a simple
> >>
> >>> Action class. The Action class' execute method just
> >>>
> >> returns SUCCESS.
> >>
> >>> I would have thought this would do the same thing as the action
> >>> without the Action class, but it instead fails with "No
> >>>
> >> result defined
> >>
> >>> for action com.wamu.struts.helloworld.MainAction and result
> >>>
> >> success".
> >>
> >>> I'll attach my struts.xml, web.xml, and MainAction.java files.
> >>>
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >> -
> >>
> >>> --
> >>>
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >>
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >> -
> >>
> >>> --
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG Free Edition.
> >>> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
> >>> 5/03/2008 6:38 PM
> >>>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> ----------------------------------------------------------------------
> > --
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date:
> > 5/03/2008 6:38 PM
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]