Serialize io exception

Dear all,

Most of the time serialization of webclient and page works, but
sometimes it bombs out with an io exception
This is one case where I am getting the execption - any ideas on how get
serialization working for this case?.

One interesting observation is that i get the following warning on
getPage

Dec 12, 2009 10:13:51 AM
com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter warning
WARNING: warning: message=[Calling eval() with anything other than a
primitive string value will simply return the value. Is this what you
intended?]
sourceName=[http://service.krone.at/inc/enlargeit.js#47(eval)] line=[1]
lineSource=[null] lineOffset=[0]

I wonder if this has anything to do with serialization throwing an
exception?

===== jruby code =====

include_class ‘org.apache.commons.lang.SerializationUtils’

uri = “http://www.kroneabo.at

webclient = ::HtmlUnit::WebClient.new
controller = ::HtmlUnit::NicelyResynchronizingAjaxController.new
webclient.setAjaxController controller

request =
HtmlUnit::WebRequestSettings.new(::Java::JavaNet::URL.new(uri))
page = webclient.getPage(request)
webclient.waitForBackgroundJavaScript(10000);

SerializationUtils.serialize(page)

NativeException: org.apache.commons.lang.SerializationException: java.io.NotSerializableException: java.lang.Object


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Sat, Dec 12, 2009 at 3:20 AM, jason franklin-stokes
[email protected] wrote:

I wonder if this has anything to do with serialization throwing an exception?
I’m not familiar with HTMLUnit. Is that all you get for errors? It
doesn’t seem to have enough for us to investigate. Is it possible for
you to run in JRuby with -w and/or -d to try to get more verbose
output of what’s happening? (warning: you will get some error traces
that are expected when running with -d)

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email