A ServletException without details seems thrown when an action listed in
Struts.xml is not found, add details in the exception and log a fatal error
----------------------------------------------------------------------------------------------------------------------------------------------------
Key: WW-2866
URL: https://issues.apache.org/struts/browse/WW-2866
Project: Struts 2
Issue Type: Improvement
Components: XML Configuration
Affects Versions: 2.0.9
Environment: Windows XP SP2, Tomcat 5.5 JDK 1.5.0.12
Reporter: olivier dupuy
Priority: Minor
A ServletException without details seems thrown when an action listed in
Struts.xml is not found, add details in the exception and log a fatal error
Take your struts.xml which runs fine and having a line such as
<action name="home"
class="pwgsc.rpgis.struts.common.HomeAction">
<result type="tiles" name="success">home</result>
</action>
Now in your IDE, rename the class HomeAction to HomePageAction or move it in a
different package.
My RSA IDE knows nothing about Struts 2 so suddenly struts.xml is no more
accurate.
Start the server, on the initialization of the Struts2 filter, in init() the
file seems to be parsed and certainly instances of the actions created.
Whatever, the init() fails and all I get from the Tomcat output is "SEVERE:
Error filterStart."
I have tried to increase the logging, log4j being configured and initialized
before Struts2 with Struts2 and XWork both configured as DEBUG
I have struts.devMode = true in struts.properties
No way to figure out what it was. It took me some time to figure out what was
the issue.
The problem can be reproduced every time.
I strongly suggest to create a clear ServletException in your filter using the
constructor with the String specifying the offending class or the part of the
configuration file(s) which is bad (file + line)
In addition of that, I would suggest to use commons logging to display a clear
fatal message with details.
It's quite weird to see all the amount of logging when it is turned on when
processing a request while nothing is logged at the initialization of the
filter.
Thanks
Olivier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.