[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] ECF-RFC119 with R-OSGi and SLP discovery: ClassCastException
|
Hi Juergen,
Some questions about the below (BTW, would you please open as a bug and
even if it turns out not to be a bug...or something in slp, we'll deal
with that). Thanks!
Questions:
What distribution provider are you using (i.e. r-osgi, or some other?)
JmDNS does not show this error using the same provider, right?
Just for everyone's reference, the Long is added to the discovery
metadata in this method:
org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.getServicePublicationProperties(IRemoteServiceContainer,
ServiceReference, String[], IRemoteServiceRegistration)
on line 182
Markus...is there some possibility that jSLP is changing a Long into an
Integer somewhere along the discovery way?
In any case, we'll check this out.
Scott
Juergen.Schumacher@xxxxxxxxxxx wrote:
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