Re: [PSS] quick question
"Matthew Ness" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Thanks Ramsey,
Yes, something funky is going on inside that ajax component. I'll pare
back the components and diagnose the problem.
Thanks again for your help and pointers.
--
Matt
http://logicsquad.net/
> Hi Matt,
>
> I didn't see the problem, but that doesn't mean it isn't happening. I'll
> copy the list in case others might have some feedback. In my testing on
> ERModern, I didn't have the problem and that uses Ajax and
> ERXResponseRewriter.
>
> The ContextObserver is not serializable. There's no reason it needs to be
> serialized. The ContextObserver is only there to reset the top index for
> Ajax calls. The reason it is stuffed into the context dictionary is to
> ensure it isn't garbage collected before it can do that. It removes
> itself from the dictionary and throws itself away after it completes the
> job. So it shouldn't be in the context dictionary anymore by the time the
> session is serializing.
>
> It sounds like it isn't getting called at the end of the request, or the
> session is being serialized before the notification is fired.
>
> If you can repeat the issue consistently, try removing the PSS framework
> and see if the notification is fired. If the notification isn't firing,
> then that's the problem :-)
>
> If it is firing, but after session check in, then the problem is that the
> notification isn't fired soon enough. Just glancing at
> ERXComponentRequestHandler, it looks like this is probably it. In that
> case, it needs to listen for a different notification that will be fired
> before the session is serialized. Probably session sleep notification.
>
> Ramsey
>
> On Jul 24, 2012, at 10:24 PM, Matthew Ness wrote:
>
>> G'day Ramsey,
>>
>> Sorry to bother you off list like this, I have a very quick question
>> about
>> your new PSS framework.
>>
>> Firstly, thank you very much for the talk at WOWODC, I appreciated it
>> very
>> much. I am trialling PSS in an app at my 9-5 job, and coming across a
>> few
>> small doozies.
>>
>> I have the latest PSS and ERExtensions frameworks from the Integration
>> build, and the rest are the latest from the master build. I'm getting a
>> java.io.NotSerializableException on
>> the inner class ContextObserver of the class
>> er.extensions.appserver.ERXResponseRewriter.
>>
>> So, sorry to bother you, but have you been down that particular road
>> before? If not, no dramas of course! I'm trying to get this running on a
>> component-based app, and the error is thrown during an Ajax request.
>>
>>
>> Start of stack trace :
>>
>> Jul 25 15:05:36 [Appname][33733] WARN NSLog -
>> <er.ajax.AjaxRequestHandler>: Exception occurred while handling request:
>> com.webobjects.foundation.NSForwardException
>> [java.io.NotSerializableException]
>> er.extensions.appserver.ERXResponseRewriter$ContextObserver
>> - element of array (index: 2)
>> - array (class "[Ljava.lang.Object;", size: 4)
>> - field (class "com.webobjects.foundation.NSDictionary", name:
>> "objects",
>> type: "class [Ljava.lang.Object;")
>> - custom writeObject data (class
>> "com.webobjects.foundation.NSDictionary")
>> - object (class "com.webobjects.foundation.NSMutableDictionary",
>> {ERXResponseRewriter.addedResources = ("Ajax.calendar.css",
>> "Ajax.date.js", "Ajax.prototype.js", "null.Appname.css",
>> "Ajax.effects.js", "null.Appname.js", "Ajax.calendar.js",
>> "null.chosen/chosen.css", "Ajax.wonder.js", "null.msg.css");
>> _originalContextID = "4"; ERXResponseRewriter.contextObserver =
>> er.extensions.appserver.ERXResponseRewriter$ContextObserver@7935c7b0;
>> ERXResponseRewriter.topIndex = 306; })
>>
>>
>> Thanks again,
>>
>> --
>> Matt
>>
>> http://logicsquad.net/
>>
>>
>>
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/