[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Datashare channels...

On Sun, Mar 22, 2009 at 1:18 PM, Scott Lewis <slewis@xxxxxxxxxxxxxxxxx> wrote:
> The channelIDs have to match.

Thanks. I've hacked on the implementation with that in mind and after
fighting with serialization, sockets, and NIO for the past couple of
days, I've gotten close to a half-working and ugly blob but am now hit
with a class loading problem (at least, I think it's a class loading
problem anyway).

There is a bundle A with container and datashare implementations along
with ID and namespace definition and implementations. Then there's an
external bundle B that interfaces with ECF APIs directly and sends
messages around with the IChannel. I can send messages using TestID
(although of course, bundle B only knows them as ID), but when I
receive a response and try to deserialize them in bundle B's code, I
get a CNFE out of it.

java.lang.ClassNotFoundException: TestID
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:88)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

It works if I add bundle A to bundle B's list of Require-Bundle but I
sure don't want to do that as that would remove the point of
interfacing with the ECF interfaces. Anyone got any tips?

Regards,
Remy