The reason is that when using the DataHandler, the object is not
really serialized.
You need to make sure the object is serialized, or use a single copy
(which will prove to be difficult if using the JBI packaging).
To serialize the object, you could use a ObjectOutputStream /
ObjectInputStream pair.


On Wed, Dec 10, 2008 at 1:26 PM, Martin Kuhn <[EMAIL PROTECTED]> wrote:
>
>
> gnodet wrote:
>>
>> THis is certainly a classloader issue.
>> Do you have two copies of the object in two different bundles ?
>> If yes, that would explain the problem.  The solution is to create a
>> bundle that contain this shared class and import the package from your
>> two other bundles.
>>
>
> What do you mean with "two copies of the object in two different bundles".
>
> The two smx-beans are defined in two different Serviceassemblies. At
> deployment time, every assembly contains an archive which contains the class
> I want to pass from one bean to another. (The object I want to pass from one
> bean to another is defined in a common project)
>
> So from my point of view the class should be usable in the receiver bean.
>
> When I debug I see that the received object is the same as the sent.
>
> --
> View this message in context: 
> http://www.nabble.com/Strange-ClassCastException-on-sending-an-object-as-attachment-from-one-smx-bean-to-another-tp20933798p20934328.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to