Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Interface not visible from class loader!

That sounds strange to me. Just to recap:
In your common bundle:
- is the interface ITestService
- in it´s activator it references ITestService the first time with Class<?> servIntf = ITestService.class; (does not fail here!)
- and than fails with an exception when creating the proxy

Can you please provide a stacktrace, the activator and the ITestService?

Tschüß,
Stefan

yau wrote:
Hi,

I have 2 plugin in my project,

the one is common plugin, it defines a Interface ITestService (the package is exported), and in the plugin's Activator.start(), I do this:

  RemoteServiceFactory rsf = new RemoteServiceFactory();
  Class<?> servIntf = ITestService.class;
  String url = "http://127.0.0.1:8080/dwserver/test/testService";;
  String protocol = "hessian";

  remoteServReg = rsf.createAndRegisterProxy(servIntf, url, protocol, context);

The second plugin, is the client application plugin, this plugin require the common plugin, when I try to get the service references by:

  BundleContext ctx = plugin.getBundle().getBundleContext();

  ServiceReference ref = ctx.getServiceReference(ITestService.class.getName());
  ...

eclipse try load the common plugin, and invoke the Actiator.start(), and then, an exception "Interface ....ITestService is not visible from class loader" was raised at rsf.createAndRegisterProxy(servIntf, url, protocol, context);

What's wrong?


Thanks,
Yau



Back to the top