Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] problems with XMPPContainer and IRemoteServiceContainerAdapter

Hi Scott, hi Markus, 

I just realized that the bundle you both mentioned is in the new Git Repo but not in CVS. I just imported from Git: compendium, framework, protocols and providers (btw. is there an easier way to do this e.g. something comparable to projects sets a la releng/org.eclipse.ecf.releng?). 

When I launch my application and try to retrieve a remote service I get the following exception:

[log;+0200 2010.10.14 18:05:48:46;ERROR;org.eclipse.ecf.provider.remoteservice;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.provider.remoteservice;code=210;message=Exception sending response;severity4;exception=java.io.IOException: receiver cannot be null for xmpp instant messaging;children=[]]]
java.io.IOException: receiver cannot be null for xmpp instant messaging
at org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.sendMessage(ECFConnection.java:372)
at org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.sendAsynch(ECFConnection.java:363)
at org.eclipse.ecf.provider.generic.ClientSOContainer.queueContainerMessage(ClientSOContainer.java:310)
at org.eclipse.ecf.provider.generic.SOContainer.sendMessage(SOContainer.java:961)
at org.eclipse.ecf.provider.generic.ClientSOContainer.sendMessage(ClientSOContainer.java:362)
at org.eclipse.ecf.provider.generic.SOContainer.sendSharedObjectMessage(SOContainer.java:1037)
at org.eclipse.ecf.provider.generic.ClientSOContainer.sendSharedObjectMessage(ClientSOContainer.java:434)
at org.eclipse.ecf.provider.generic.SOContainer.sendMessage(SOContainer.java:1033)
at org.eclipse.ecf.provider.generic.ClientSOContainer.sendMessage(ClientSOContainer.java:426)
at org.eclipse.ecf.provider.generic.SOContext.sendMessage(SOContext.java:230)
at org.eclipse.ecf.core.sharedobject.BaseSharedObject.sendSharedObjectMsgTo(BaseSharedObject.java:358)
at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.sendRegistryUpdateRequest(RegistrySharedObject.java:819)
at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject$1.processEvent(RegistrySharedObject.java:408)
at org.eclipse.ecf.core.sharedobject.BaseSharedObject.fireEventProcessors(BaseSharedObject.java:190)
at org.eclipse.ecf.core.sharedobject.BaseSharedObject.handleEvent(BaseSharedObject.java:126)
at org.eclipse.ecf.provider.generic.SOWrapper.svc(SOWrapper.java:185)
at org.eclipse.ecf.provider.generic.SOWrapper$2.run(SOWrapper.java:138)
at java.lang.Thread.run(Thread.java:637)

Eugen


Am 14.10.2010 um 17:35 schrieb Scott Lewis:

On 10/14/2010 8:25 AM, Markus Alexander Kuppe wrote:
On 10/14/2010 05:17 PM, Eugen Reiswich wrote:
Hi folks,

I'm trying to use remote services over ECF with the XMPP provider. In
order to register and retriever remote services I need to get the
IRemoteServiceContainerAdapter:
IPresenceContainerAdapter adapter = (IPresenceContainerAdapter)
this.container
.getAdapter(IPresenceContainerAdapter.class);

I'm running in a NPE. Debugging the ECF-Code I found out that
the XMPPContainer returns null
providing org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter as clazz
parameter.


public Object getAdapter(Class clazz) {
if (clazz.equals(IPresenceContainerAdapter.class))
return this;
if (clazz.equals(ISendFileTransferContainerAdapter.class))
return outgoingFileTransferContainerAdapter;
else
return super.getAdapter(clazz);
}

Btw. the IPresenceContainerAdapter works fine. Any idea?
Has the org.eclipse.ecf.provider.xmpp.remoteservice bundle been deployed
and registered?

Just to follow up with an explanation of why this fragment is necessary:  the xmpp.remoteservice bundle re-uses the ECF generic implementation of the IRemoteServiceContainerAdapter...it does this by creating an IAdapterFactory extension (specifically, XMPPRemoteServiceAdapterFactory).

This extension is then processed and used to respond with non-null IRemoteServiceContainerAdapter in the return super.getAdapter(clazz); in the XMPPContainer impl of getAdapter(Class clazz).

So that fragment is now necessary (along with it's dependency on org.eclipse.ecf.provider.remoteservice) to get/use the IRemoteServiceContainerAdapter for xmpp.

Scott



Markus
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev


Back to the top