If your action is located with the help of a prefix rather than the whole class name(the PrefixActionFactoryProxy does this) then it is very difficult to track down exceptions thrown in the constructor or during class initialisation. This is because the PrefixActionFactoryProxy just swallows the exception and tries to find an action with another prefix, so you will never know what went wrong. I solved this by changing the JavaActionFactory to throw InstantiationException if the newInstance called failed. The prefix factory then catches that exception separately and re-throws it rather than looking for another action. This takes care of constructor exceptions at least.
Cheers, Dick Zetterberg [EMAIL PROTECTED] ----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 26, 2003 6:19 AM Subject: RE: [OS-webwork] Suggested change to the JavaActionFactory exception reporting > I applied this change, but changed the "instantiation" part of the error > message to "initialization", since that's really where it could throw an > exception. The instantiation is done further down. > > Jason > > > -----Original Message----- > > From: Jordan Harrison [mailto:[EMAIL PROTECTED] > > > > Hey Guys, > > > > I have a suggested change to the JavaActionFactory if > > possible. I have been pulling my hair out trying to work out > > why Webwork cannot load my class only to find it WAS being > > found, just not instantiated due to an error. > > > > The JavaActionFactory currently only catches a generic > > Exception while trying to load the Action class. So if there > > is (for example) an exception being thrown in the Action's > > constructor all that is reported is the Action not being found. ------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork