Hey Ben, Pretty sure you need to implement Serializable in the objects
in the collection. Don't think there's a way around it as serialized
objects is how the Hessian protocol works...
Ben Hood wrote:
Hi,
This is probably a newbie question but I couldn't google the solution.
If I try to serialize a List<WhateverType> using the writeObject()
method in the HessianOutput class, it throws an IllegalStateException
complaining that my WhateverType should be serializable (I've attached
a stack trace at the bottom).
By stepping through the code, it is apparent why this occurs, but I
find this a little bit counterintuitive - if Hessian defines the
binary encoding of arbitrary types, why do I need to use the Java
built in Serialization mechanism?
Surely this makes the List useless for cross-language purposes?
Or am I missing the point here?
Any help is appreciated,
Ben
----------------------
java.lang.IllegalStateException: Serialized class
org.mule.providers.hessian.MySummable does not implement
java.io.Serializable
at com.caucho.hessian.io.JavaSerializer.<init>(JavaSerializer.java)
at
com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:200)
at
com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java)
at
com.caucho.hessian.io.HessianOutput.writeObject(HessianOutput.java:315)
at
com.caucho.hessian.io.CollectionSerializer.writeObject(CollectionSerializer.java)
at
com.caucho.hessian.io.HessianOutput.writeObject(HessianOutput.java:317)
at com.caucho.hessian.io.HessianOutput.call(HessianOutput.java:131)
at
com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:225)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java)
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest
--
*David Borgeest
/Director Technology & Development/
Web Alive Pty Ltd*
Level 1, Innovation Building
Digital Harbour
1010 La Trobe Street
Melbourne VIC 3000
*P:* +61 3 9934 0888
*F:* +61 3 9934 0899
*E:* [EMAIL PROTECTED]
*W:* www.webalive.biz
*/"Your Business, Your Web, Your Control"/*
This email (including all attachments) is intended solely for the named
addressee. It is confidential and may contain legally privileged
information. If you receive it in error, please let us know by reply
email, delete it from your system and destroy any copies. This email is
also subject to copyright. No part of it should be reproduced, adapted
or transmitted without the written consent of the copyright owner.
Emails may be interfered with, may contain computer viruses or other
defects and may not be successfully replicated on other systems. We give
no warranties in relation to these matters. If you have any doubts about
the authenticity of an email purportedly sent by us, please contact us
immediately.
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest