Struts FileNotFoundException with no stack trace

B

Brian J. Sayatovic

I was testing a new ActionForm and Action in Struts 1.1 under
WebSphere 4.0 when I encountered an exception. There was nos tack
trace in the client output, nor in the server output -- just a single
line:

WARN org.apache.struts.action.RequestProcessor - Unhandled Exception
thrown: class java.io.FileNotFoundException

I turnedon Struts debugging via log4j and got a bit more info:

DEBUG org.apache.struts.action.RequestProcessor - Processing a 'POST'
for path '/test'
DEBUG org.apache.struts.action.RequestProcessor - Setting user locale
'en_US'
DEBUG org.apache.struts.action.RequestProcessor - Storing ActionForm
bean instance in scope 'request' under attribute key 'testForm'
DEBUG org.apache.struts.action.RequestProcessor - Populating bean
properties from this request
DEBUG org.apache.struts.action.RequestProcessor - Validating input
form properties
DEBUG org.apache.struts.action.RequestProcessor - No errors
detected, accepting input
DEBUG org.apache.struts.action.RequestProcessor - Looking for Action
instance for class com.testwar.TestAction
DEBUG org.apache.struts.action.RequestProcessor - Creating new
Action instance
WARN org.apache.struts.action.RequestProcessor - Unhandled Exception
thrown: class java.io.FileNotFoundException

I'm not sure what's causing this. Has anyone else ever encountered
this with Struts? How abotu some diagnostic suggestions?

Regards,
Brian.
 
B

Brian J. Sayatovic

I found the problem. My Action class's execute method was marked as
throwing Exception, and an underlyign FileNotFoundException was being
thrown. Unfortunately, Struts' RequestProcessor seems to only print
the .toString() of the Exception and not its stack trace, so it can be
quite confusing.

Regards,
Brian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top