There isn't enough information here to know if it is a bug in the platform... off-hand, I would guess not, since most of the logic in marshalling/unmarshalling such things needs to be written by the developer and doesn't come from the platform. Plus there isn't a Parcel.readFromParcel() method so it is even harder to tell... if this is actually Parcel.readParcelable(), you need to make sure you are using the class loader for -your- app, which is the one that knows about your class loader. The system class loader only knows about the core framework classes.
That all side, a possibly larger question is... do you need to do this at all? If the service is not explicitly running in its own process but just in the normal same process as the rest of the app, there is no reason to use aidl at all. If it has been set up to run in another process, is there really a good reason to do this instead of just using the much simpler (and usually more efficient) approach of running locally? On Tue, Jul 21, 2009 at 1:48 AM, Bart van Wissen <[email protected]>wrote: > > So should I submit this as a bug? > > > On 20 jul, 13:07, Bart van Wissen <[email protected]> wrote: > > I'm using a tree structure in my application, which has to be passed > > to a service. All nodes in the tree are of the type ExpressionTree, > > which is an interface. > > All nodes are also Parcelable. > > > > Now in my setup I have these types (all implement ExpressionTree and > > Parcelable): > > - ExpressionTreeRoot, a class with a reference to an ExpressionTree. > > - AndTree, a class with two ExpressionTree references. > > - StringCondition, a leafnode in the tree > > > > Now I'm passing a tree with an ExpressionTreeRoot referencing an > > AndTree referencing two StringConditions to a service, running in > > another process. > > > > ExpressionTreeRoot -> AndTree -> 2 StringConditions > > The parcel that is sent to the service is thus a flattened version of > > this tree, containing 3 parcels. > > > > When unmarshalling, the service process throws a > > ClassNotFoundException: > > > > 07-20 10:44:16.431: ERROR/Parcel(1355): Class not found when > > unmarshalling: nl.vu.contextframework.conditions.AndTree, e: > > java.lang.ClassNotFoundException: > > nl.vu.contextframework.conditions.AndTree > > > > I can see in my log output that ExpressionTreeRoot.readFromParcel() is > > called, which in its turn calls parcel.readFromParcel to read the > > included parcel, which is in this case a parceled AndTree. This is > > where the ClassNotFoundException is thrown. > > The parcel seems to be reading the class type correctly from the > > parcel, otherwise it wouldn't be printing the name > > "nl.vu.contextframework.conditions.AndTree". But somehow it is unable > > to find this class, even though I'm sure it exists. > > > > Can anyone tell me what's going on, or give me some tips on how to > > investigate further? > > I'm using the default classloader by the way. > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

