Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
- Subject: Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
- From: "Ricardo J. Parada" <email@hidden>
- Date: Fri, 26 Jun 2009 11:36:21 -0400
On Jun 26, 2009, at 11:23 AM, Mike Schrag wrote: My theory is that the performParentAction() changes the context's current component with the intention to restore it afterwards. But an exception may be occurring in a section of the code in performParentAction() which is not properly wrapped with an exception handler and so we end up with the wrong current component in the context.
So it is definitely the case that performParentAction doesn't reset the current component in a finally block (which it seems like it should). However, it seems to me the only way this can fail is by throwing an exception OUT of performParentAction (inside the action that was called), which should manifest in YOUR code. There's not way I can see that you don't get a reset of the component without you also getting an exception. Is your code that calls performParentAction wrapped in a swallowing catch?
I'm investigating to see if it's wrapped in a swallowing catch...
And I see performParentAction() seems to be pushing bindings to the parent and that is not wrapped in an exception handler I think.
It seems to me you're putting in a really weird hack and hiding the root cause of your problem which might just be hanging around to screw you again later in another weird way.
I would figure out WHERE and WHY you aren't getting an exception out of performParentAction. You should be able to override performParentAction in your base component or in ERXComponent and wrap it in an exception handler so you can always see when that dies and then you can possibly trace who's swallowing it.
You are right... Good idea... but it may be challenging as the performParentAction() calls an action in a parent component and then that component also calls performParentAction()... and it's a long chain. So I need to look at all of them to find out... Hey, I did not write those components hehehe... but it's clear to me it is overly complex from the way I usually do things in WebObjects. And it's one of legacy components which seems to be screaming for re-design. :-)
Thanks for the suggestions.. I'll try them to find out WHERE and WHY...
:-) |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden