[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] Problem regarding hello.ds examples.
- From: Jeff Hamm <Jeff.Hamm@xxxxxxx>
- Date: Wed, 8 Sep 2010 12:01:08 +0000
- Accept-language: en-US
- Delivered-to: firstname.lastname@example.org
- Thread-index: AQHLTrat0ita/zewfkmegjfmR1HP+5MG0PFQgABKkID//71ZIA==
- Thread-topic: [ecf-dev] Problem regarding hello.ds examples.
Hey Scott --
Thanks for the reply. I think I know what I did that's causing the problem.
In hello.xml, I had added the following:
I did this thinking that I would need a service to the host and that that you could obtain it through the implemented interface. My thinking was wrong.
Thanks for helping me work through this.
From: ecf-dev-bounces@xxxxxxxxxxx [mailto:ecf-dev-bounces@xxxxxxxxxxx] On Behalf Of Scott Lewis
Sent: Tuesday, September 07, 2010 2:32 PM
Subject: Re: [ecf-dev] Problem regarding hello.ds examples.
On 9/7/2010 11:12 AM, Jeff Hamm wrote:
> Hi Scott --
> Here is the email thread that I found when researching this problem -
> The code is the same code as in the example hello.ds example for the client and the host.
Given that the exception/stack trace indicates something quite
different, I don't think this mailing list post is the same issue.
Actually, for this old issue, I now suspect that Ali's problem was due to not including the org.eclipse.ecf.provider.remoteservices bundle in his product specification. For the generic provider, this bundle
(org.eclipse.ecf.provider.remoteservices) is needed to implement remote services.
> Could there be a timing issue where the host has not been able to register before the client makes the request?
This doesn't seem likely to me...as if you are using DS on the consumer as well...it should wait until discovery takes place (which is triggered by the host registration).
But it doesn't appear to me that the exception you are reporting is due to a client request...it seems to be occurring because of the cast to IRemoteServiceProxy in the bindHello method on the host. At least that's what it seems to me.
> Thanks --
> -----Original Message-----
> From: ecf-dev-bounces@xxxxxxxxxxx [mailto:ecf-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Scott Lewis
> Sent: Tuesday, September 07, 2010 2:01 PM
> To: ecf-dev@xxxxxxxxxxx
> Subject: Re: [ecf-dev] Problem regarding hello.ds examples.
> On 9/7/2010 8:16 AM, Jeff Hamm wrote:
>> I have been working with the ECF examples that use ds in order to grow out this functionality within our application. I am running Eclipse 3.6 with the latest ECF framework plugins.
>> Essentially, I have the host.ds and the client.ds plugins enabled into our autostart bundle and launch them in conjunction with the other osgi bundles instead of the .product files they come with in the example.
>> The code has changed only to allow the host.ds to be activated via the activate and deactivate methods so that this service is available.
>> When I start the application, I see the following:
>> d leRegisteredServiceEvent(WARNING:No remote service containers found
>> service.exported.interfaces=*, service.id=89}. Service NOT EXPORTED)
>> [log;-0400 2010.09.07
>> i on.EventHookImpl:handleRegisteredServiceEvent:No remote service
>> containers found for
>> service.exported.interfaces=*, service.id=89}. Service NOT
>> And then subsequently, the client fails to start because it cannot
>> cast the IHello
>> Got proxy IHello=xxx.xxx.HelloComponent@4bd173
>> STARTING remote call via proxy...
>> received hello from=helloclientcomponent via proxy COMPLETED remote
>> call via proxy
>> ERROR 43 [SCR] Error while trying to bind reference Reference[name = IHello, interface = service.IHello, policy = dynamic, cardinality = 0..n, target = null, bind = bindHello, unbind = null]
>> Problematic reference = Reference[name = IHello, interface = service.IHello, policy = dynamic, cardinality = 0..n, target = null, bind = bindHello, unbind = null]
>> of service component = service.advisor
>> component implementation class = service.advisor.HelloClientComponent
>> located in bundle with symbolic name = service.advisor
>> bundle location =
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:360)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:424)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bind(ServiceComponentProp.java:209)
>> at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:327)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:580)
>> at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
>> at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:431)
>> at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:213)
>> at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:800)
>> at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:767)
>> at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
>> cutor.java:70) Caused by: java.lang.ClassCastException:
>> service.host.HelloComponent cannot be cast to org.eclipse.ecf.remoteservice.IRemoteServiceProxy
>> at service.advisor.HelloClientComponent.bindHello(HelloClientComponent.java:80)
>> ... 16 more
>> I saw on a different thread that this sort of error had been reported before but there was no resolution listed. Is this a known bug?
> Not that I'm aware of, no. This error doesn't resemble any existing thread that I'm aware of...if I missed some thread that does bear resemblance to this then please point it out to me.
> From the stack trace, this looks like some of your code is trying to
> cast the service.host.HelloComponent to
> Caused by: java.lang.ClassCastException: service.host.HelloComponent cannot be cast to org.eclipse.ecf.remoteservice.IRemoteServiceProxy
> This cast (i.e. from service.host.HelloComponent to
> org.eclipse.ecf.remoteservice.IRemoteServiceProxy) definitely *should*
> throw an exception on the host. It is used internally to ECF remote
> services on the consumer/client side (i.e. the proxy)...not the host.
> ecf-dev mailing list
> ecf-dev mailing list
ecf-dev mailing list