Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] getting started with ECF

Scott,
Again my thanks!  Now I am getting
java.lang.NullPointerException
on this line
serviceRegistration = containerAdapter.registerRemoteService(
				new String[] { IHello.class.getName() }, new Hello(), null);

My code below.
public void start(BundleContext context) throws Exception {
		this.context = context;
		// Create ECF Container
		IContainerManager containerManager = getContainerManagerService();
		ID serviceId = IDFactory.getDefault().createStringID(HOST_ID);
		IContainer container =
containerManager.getContainerFactory().createContainer(serviceId);
		// Get remote service container adapter
		IRemoteServiceContainerAdapter containerAdapter =
(IRemoteServiceContainerAdapter) container
				.getAdapter(IRemoteServiceContainerAdapter.class);
		// Register remote service
		serviceRegistration = containerAdapter.registerRemoteService(
				new String[] { IHello.class.getName() }, new Hello(), null);
		System.out.println("IHello RemoteService registered");
	}

Dave Donohue


Back to the top