In my python code, I have written an Ice.ObjectFactory subclass to create instances of an ICE class I am using. I stuffed up and returned the wrong type, and got this exception:
Ice.UnexpectedObjectException: exception ::Ice::UnexpectedObjectException
{
reason = unmarshaled object is not an instance of ::Basket::Entities::Entity
GroupData
type = ::Basket::Entities::EntityGroupData
expectedType = ::Basket::Entities::EntityGroupData
}
Obviously I need to fix my class factory :-)
However, I also suspect that the `type' parameter of the Ice.UnexpectedObjectException is wrong. Shouldn't it be "::Basket::Entities::BaseEntityData" (ie. the type of the object I actually returned from my class factory) rather than "::Basket::Entities::EntityGroupData" (ie. the type of the object I should have returned)? Or is there some other subtlety here that I am not aware of?
Cheers,
garyD!

Reply With Quote
