Search code examples
javagwtosgigwt-rpcequinox

Trying to integrate GWT into an OSGi bundle


I am trying to integrate GWT with OSGi (Equinox) to provide a web based UI for the rest of my modular system. So far I've managed to embed the GWT servlet in the OSGi module.

I am using the GWT sample code project generated by the Eclipse GWT plugin, which consists of 3 packages: client, server and shared. The class in the server package (ui.server.GreetingServiceImpl) implements the interface in the client package (ui.client.GreetingService), and all of them are in the same bundle.

When I try to make a Remote Procedure Call from the client side web page I get the error:

IncompatibleRemoteServiceException: Could not locate requested interface 'ui.client.GreetingService' in default classloader

I gather that the class was not found by the classloader, but I don't know how to fix this. I can access classes in other bundles by requiring or importing them, but not the interface that is in the same bundle as the implementing class. Could anyone point me in the right direction? I've been googling for hours.


Solution

  • IncompatibleRemoteServiceException means that the RPC call from the GUI didn't found the interface specified by the @RemoteService annotation.

    Can you post your project with source codes ?

    BTW you can also have a look at this project: http://code.google.com/p/gwt-in-osgi/