RE: Missing WOExceptionPage
RE: Missing WOExceptionPage
- Subject: RE: Missing WOExceptionPage
- From: "Erlandsson Martin" <email@hidden>
- Date: Mon, 1 Dec 2003 12:06:23 +0100
- Thread-topic: Missing WOExceptionPage
Too bad it is a bug! I'll try to work around it though, thanks for the suggestions.
However, I still have not managed to get a good-enough exception page from my designed null-pointer exception. Using pageWithName, I get the correct page, but no stack traces because of "NA : Non applicable, JIT activated".
I have tried all the tricks I know to turn off the Just-in-time compiler and display the stack trace on the exception page:
- setting java startup parameters: -Xdebug -Xnoagent -Djava.compiler=NONE
- setting WODebugEnabled=YES in the "Properties" file.
- compiling with debug flag
But no luck so far. I feel I have to get this exception handling sorted out before I make any major code changes! Any suggestions?
Thanks,
/Martin
> -----Original Message-----
> From: Chuck Hill [mailto:email@hidden]
> Sent: den 28 november 2003 22:00
> To: Erlandsson Martin
> Cc: email@hidden
> Subject: Re: Missing WOExceptionPage
>
> You are seeing a new bug in WO 5.2.1. If an exception is raised
> calling generateResponse() on the result of a direct action method it
> is not caught and bubbles way, way up in the frameworks and this
> message gets returned.
>
> The best solution is to avoid having exceptions thrown from
> appendToResponse() in pages returned from direct actions. You could
> trap them in appendToResponse and return a different response.
> Calling new on WOExceptionPage may be the cause of your exception.
> Use pageWithName as Kaj said.
>
> Failing that, override dispatchRequest() in Application to trap these
> exceptions.
>
> This can also produce application or session deadlock. See an earlier
> posting by Lenny Marks on this:
> http://www.omnigroup.com/mailman/archive/webobjects-dev/2003-November/037140.html
>
>
> HTH
> Chuck
>
>
> Erlandsson Martin wrote:
>
> >
> > Hi list,
> >
> > WO 5.2.2 is giving me a really hard time, hiding exceptions thrown in
> > direct actions. I managed to isolate the problem to the following
> > provoking code:
> >
> > public final WOComponent testWOExceptionPageAction() {
> > try {
> > throw new NullPointerException();
> > } catch (NullPointerException ex) {
> > logger.log(Level.WARNING, "about to return WOExceptionPage",
> > ex);
> > return new WOExceptionPage(context());
> > }
> > }
> >
> >
> > Instead of the Exception Page, I get the following response:
> >
> > <html><head><title>Error</title></head><body>Your request produced an
> > error.</body></html>
> >
> >
> > This response is generated in WODirectActionRequestHandler (according to
> > a decompiler).
> > In this case, I get a stack trace in the log, but in many other cases I
> > don't.
> >
> > Can anyone tell me why I can't get a sensible Exception page?
> >
> > Details:
> > WO 5.2.2
> > Java 1.4.1
> > Deploying on Tomcat 4.1.27
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > WebObjects-dev mailing list
> > email@hidden
> > http://www.omnigroup.com/mailman/listinfo/webobjects-dev
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
>
> Progress is the mother of all problems.
> - G. K. Chesterton
A
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.