Skip to main content

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

Hi Remy,

Remy Chi Jian Suen wrote:
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(
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	at java.lang.ClassLoader.loadClassInternal(
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(

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?

1) Use Buddy Classloading (with appropriate one...e.g. dependents, etc).
2) Use OSGi's Dynamic-ImportPackage  (with wildcard I expect)

In bundle B.

So what are you using to implement datashare in this case? Is it nio? Note that we've already got a signs of life provider based upon CDO (which is in in turn based upon nio)...but the more the merrier, of course.


Back to the top