You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Craig Dickson <cd...@aol.com> on 2004/08/31 01:17:05 UTC
Action class not found when using error-page redirect from web.xml
I am attempting to set up an error handling framework for our
application. I am aware that we could register an exception handler in
the struts config, but we are attempting to achieve a similar result
using the basic functionality provided by the web.xml file.
We have the following declaration in our web.xml file :
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/do/error</location>
</error-page>
And in our struts-config.xml we have:
<action
path="/error"
type="com.aol.ygp.wia.admin.ErrorAction"
name="error"
scope="request"
unknown="false"
validate="true"
>
<forward
name="success"
path=".error"
redirect="false"
/>
</action>
So when a checked exception is thrown from one of our Action classes, we
simply want to fo to our ErrorAction class and then use a forward to a
tile definition. However when this executes and an exception is thrown,
the following exception occurs:
Aug 30, 2004 3:24:16 PM org.apache.struts.util.RequestUtils createActionForm
WARNING: No FormBeanConfig found under 'error'
Aug 30, 2004 3:24:16 PM org.apache.struts.action.RequestProcessor
processActionCreate
SEVERE: No action instance for path /error could be created
java.lang.ClassNotFoundException: com.aol.ygp.wia.admin.ErrorAction
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:119)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:145)
at
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:282)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:220)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
com.aol.ygp.wia.servlet.RequestParameterFilter.doFilter(RequestParameterFilter.java:104)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
com.aol.ygp.webcommons.filter.SnsFilter.doFilter(SnsFilter.java:182)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:305)
at
weblogic.servlet.internal.ForwardAction.run(ForwardAction.java:23)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3861)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Anyone know why the class cannot be loaded? When I go to that page
direcly from the browser (e.g. http://myserver/do/error), the page
renders just fine.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org