Re: WOResponse HandleException problem
Re: WOResponse HandleException problem
- Subject: Re: WOResponse HandleException problem
- From: Calven Eggert <email@hidden>
- Date: Thu, 20 Dec 2012 16:58:54 -0500
i understand.
In the meantime, something here has broke and I haven't a clue how to fix it. This area of the code hasn't been touched in years and I suspect that the change in the java version might have done it. I don't know why, but that's the only major thing that has happened since we moved all of our WO apps to new mac mini servers last year. like i mentioned before, it's possible that this bug I'm fixing was there a year ago but none of the hundreds of users has said anything until now. very strange.
On 2012-12-20, at 4:54 PM, Ramsey Gurley wrote:
> In my experience, more work is required by not converting a project to use Wonder. WO is just so broken without it. How much work it will take to make the conversion is dependent on the app.
>
> Ramsey
>
> On Dec 20, 2012, at 2:46 PM, Calven Eggert wrote:
>
>> this is an old WO application that doesn't use Wonder. (yah, I know)
>>
>> Should I convert this app to use Wonder? would that take a lot of work?
>>
>> On 2012-12-20, at 4:44 PM, Ramsey Gurley wrote:
>>
>>> Maybe try ERXApplication.instantiatePage(String pageName) instead?
>>>
>>> On Dec 20, 2012, at 2:24 PM, Calven Eggert wrote:
>>>
>>>> I tried it that way and also like this:
>>>>
>>>> WOContext newContext = new WOContext(null);
>>>>
>>>> both give the same result. :-(
>>>>
>>>> On 2012-12-20, at 4:18 PM, Chuck Hill wrote:
>>>>
>>>>> How did you create the new context? Like this:
>>>>>
>>>>> WOContext newContext = new WOContext(originalContext.request());
>>>>>
>>>>> If not, try that.
>>>>>
>>>>>
>>>>> Chuck
>>>>>
>>>>> On 2012-12-20, at 1:14 PM, Calven Eggert wrote:
>>>>>
>>>>>> Even though I've created a new context it only appears to have solved the problem. clicking the button to take me to my login page is not working properly because the link it goes to is invalid.
>>>>>>
>>>>>> I've just found this in the html of my error page :
>>>>>>
>>>>>> <form method="post" name="firstform" action="/cgi-bin/WebObjects/.woa/wo/bV82atO1hU5cqnWZgbj7U0/0.1">
>>>>>>
>>>>>> The action has a different ID and the missing app name before the .woa
>>>>>>
>>>>>> What would cause this?
>>>>>>
>>>>>>
>>>>>> On 2012-12-19, at 4:02 PM, Chuck Hill wrote:
>>>>>>
>>>>>>> The old context stores the previous page. When the request comes in, that page has takeValues and invoke action run on it. One of those must have been causing the exception to happen again. Creating a new context removes the history.
>>>>>>>
>>>>>>> Chuck
>>>>>>>
>>>>>>>
>>>>>>> On 2012-12-19, at 12:54 PM, Calven Eggert wrote:
>>>>>>>
>>>>>>>> YES! it works! Thank you, thank you, thank you!
>>>>>>>>
>>>>>>>> Can you explain why?
>>>>>>>>
>>>>>>>> On 2012-12-19, at 3:46 PM, Chuck Hill wrote:
>>>>>>>>
>>>>>>>>> Try creating a new context here instead of using aContext:
>>>>>>>>>
>>>>>>>>>>>> COREErrorPage errorPage = (COREErrorPage) pageWithName("COREErrorPage", aContext);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2012-12-19, at 12:45 PM, Calven Eggert wrote:
>>>>>>>>>
>>>>>>>>>> I've set a breakpoint in the dispatchRequest. it gets there.
>>>>>>>>>>
>>>>>>>>>> The exception that I'm getting in the first place fires again.
>>>>>>>>>>
>>>>>>>>>> recap:
>>>>>>>>>> page one, click to activate exception
>>>>>>>>>> page two (error page), click button to go to login page
>>>>>>>>>> exception on page one fires again. It's as if the first page is active although the error page is being displayed.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 2012-12-19, at 3:02 PM, Chuck Hill wrote:
>>>>>>>>>>
>>>>>>>>>>> Override dispatchRequest() to see if the first click even gets to the app. If not, check the HTML in the page. If it does get there, is it causing a new exception?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Chuck
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 2012-12-19, at 5:14 AM, Calven Eggert wrote:
>>>>>>>>>>>
>>>>>>>>>>>> *bump*
>>>>>>>>>>>>
>>>>>>>>>>>> anyone have any ideas?
>>>>>>>>>>>>
>>>>>>>>>>>> Begin forwarded message:
>>>>>>>>>>>>
>>>>>>>>>>>>> From: Calven Eggert <email@hidden>
>>>>>>>>>>>>> Subject: WOResponse HandleException problem
>>>>>>>>>>>>> Date: 17 December, 2012 4:04:00 PM EST
>>>>>>>>>>>>> To: email@hidden
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have a framework that has overridden WOResponse HandleException for many years.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Today I have discovered that there is a problem with the page I display to the user. The page shows text and a button at the bottom of the page is labelled "Go to Login Page". It used to go to the login page of the application but now when clicked on it seems to do nothing. When clicked on a second time it then correctly goes to the login page.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I can't seem to figure out why it's no longer working. I can confirm that it was working properly in May of 2011. I haven't a clue when it stopped working. Some kind of upgrade may have caused it to stop. Java version, Eclipse.... no idea.
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is how it is handled:
>>>>>>>>>>>>>
>>>>>>>>>>>>> public WOResponse handleException(Exception anException, WOContext aContext)
>>>>>>>>>>>>> {
>>>>>>>>>>>>> super.handleException(anException, aContext);
>>>>>>>>>>>>> COREErrorPage errorPage = (COREErrorPage) pageWithName("COREErrorPage", aContext);
>>>>>>>>>>>>> errorPage.initialize(true, anException, theUser, "", "", null);
>>>>>>>>>>>>> return errorPage.generateResponse();
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> My error page does this when the user clicks on the button, but only the second time it is clicked:
>>>>>>>>>>>>>
>>>>>>>>>>>>> public WOComponent loginPage() {
>>>>>>>>>>>>> WORedirect redirect = new WORedirect(context());
>>>>>>>>>>>>> try {
>>>>>>>>>>>>> redirect.setUrl(((COREApplication)application()).logoutLink());
>>>>>>>>>>>>> } catch (Exception e) {
>>>>>>>>>>>>> e.printStackTrace();
>>>>>>>>>>>>> e = null;
>>>>>>>>>>>>> redirect.setUrl(((COREApplication)application()).logoutLink());
>>>>>>>>>>>>> }
>>>>>>>>>>>>> ((CORESession)session()).terminate();
>>>>>>>>>>>>> return redirect;
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Any help in solving this mystery is appreciated.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Calven
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> 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
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Chuck Hill Senior Consultant / VP Development
>>>>>>>>>>>
>>>>>>>>>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>>>>>>>>>> http://www.global-village.net/gvc/practical_webobjects
>>>>>>>>>>>
>>>>>>>>>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>>>>>>>>>>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Chuck Hill Senior Consultant / VP Development
>>>>>>>>>
>>>>>>>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>>>>>>>> http://www.global-village.net/gvc/practical_webobjects
>>>>>>>>>
>>>>>>>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>>>>>>>>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Chuck Hill Senior Consultant / VP Development
>>>>>>>
>>>>>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>>>>>> http://www.global-village.net/gvc/practical_webobjects
>>>>>>>
>>>>>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>>>>>>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Chuck Hill Senior Consultant / VP Development
>>>>>
>>>>> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
>>>>> http://www.global-village.net/gvc/practical_webobjects
>>>>>
>>>>> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
>>>>> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>>
>>
>>
>
>
>
_______________________________________________
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