Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] ECF-RFC119 with R-OSGi and SLP discovery: ClassCastException

Hi,

I'm currently experimenting with your RFC119 implementation which we want to use in SMILA soon. 
I have it working now when using the JMDNS discovery but not with the jSLP discovery. I'm quite
sure the reason is this stacktrace:

java.lang.ClassCastException: java.lang.Integer
	at org.eclipse.ecf.osgi.services.discovery.RemoteServiceEndpointDescription.getRemoteServiceId(RemoteServiceEndpointDescription.java:181)
	at org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl.containsDiscoveredServiceID(DiscoveredServiceTrackerImpl.java:654)
	at org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl.isValidService(DiscoveredServiceTrackerImpl.java:170)
	at org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl.serviceChanged(DiscoveredServiceTrackerImpl.java:102)
	at org.eclipse.ecf.internal.osgi.services.discovery.ServicePublicationHandler.notifyDiscoveredServiceTrackers(ServicePublicationHandler.java:105)
	at org.eclipse.ecf.internal.osgi.services.discovery.ServicePublicationHandler.serviceDiscovered(ServicePublicationHandler.java:74)
	at org.eclipse.ecf.discovery.AbstractDiscoveryContainerAdapter.fireServiceDiscovered(AbstractDiscoveryContainerAdapter.java:120)
	at org.eclipse.ecf.provider.jslp.container.JSLPDiscoveryContainer.fireServiceDiscovered(JSLPDiscoveryContainer.java:78)
	at org.eclipse.ecf.internal.provider.jslp.JSLPDiscoveryJob.run(JSLPDiscoveryJob.java:57)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

When I changed the cast in this method to (Number), the discovery succeeds. I've not found the place yet,
where the Integer is added instead of a Long. I'm using Declarative Services both to start the service that
is to be distributed, and to start a client service that is bound to the remote service using DS references.
Is this a bug or am I doing something wrong?

Regards,
Jürgen 
-- 
Committer on Eclipse RT SMILA project.


Back to the top