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