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

I'm one step ahead. I've been experiencing class loading problems when managing the plug-in dependencies using "Imported-Packages" (as recommended by OSGi) rather than "Required Plug-ins". I just changed the imports to "Required Plug-ins" and the class loading issue is gone. 

Well I wasn't happy for a long time as a few seconds later I got the next exception trying to register remote services:

adapter.registerRemoteService(new String[] { serviceName }, impl, props);
 
This method caused the following exception:

org.eclipse.ecf.core.identity.IDCreateException: Exception creating remoteID
at org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceNamespace.createInstance(RemoteServiceNamespace.java:39)
at org.eclipse.ecf.core.identity.IDFactory.createID(IDFactory.java:211)
at org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistryImpl.createRemoteServiceID(RemoteServiceRegistryImpl.java:207)
at org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceRegistrationImpl.publish(RemoteServiceRegistrationImpl.java:81)
at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.registerRemoteService(RegistrySharedObject.java:347)
at org.remotercp.ecf.session.impl.SessionServiceImpl.registerRemoteService(SessionServiceImpl.java:218)
at org.remotercp.ecf.session.impl.SessionServiceImpl.publishRemoteServicesToUser(SessionServiceImpl.java:331)
at org.remotercp.ecf.session.impl.SessionServiceImpl.access$2(SessionServiceImpl.java:321)
at org.remotercp.ecf.session.impl.SessionServiceImpl$1.handlePresence(SessionServiceImpl.java:298)
at org.eclipse.ecf.internal.provider.xmpp.XMPPContainerPresenceHelper.firePresenceListeners(XMPPContainerPresenceHelper.java:568)
at org.eclipse.ecf.internal.provider.xmpp.XMPPContainerPresenceHelper.handlePresenceEvent(XMPPContainerPresenceHelper.java:557)
at org.eclipse.ecf.internal.provider.xmpp.XMPPContainerPresenceHelper.handleEvent(XMPPContainerPresenceHelper.java:135)
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)

Hunting down the problem I realized that the class RemoteServiceRegistryImpl  apparently  caused the exception within the method:

public IRemoteServiceID createRemoteServiceID(long serviceid) {
return (IRemoteServiceID) IDFactory.getDefault().createID(IDFactory.getDefault().getNamespaceByName(RemoteServiceNamespace.NAME), new Object[] {containerID, new Long(serviceid)});
}

The parameter containerID is null. 

Diving in the ECF code the problem seems to be within the class ClientSOContainer. The method: 
public ID getConnectedID() {
return remoteServerID;
}
returns null. 

Eugen

Am 15.10.2010 um 16:20 schrieb Scott Lewis:

I'm currently at a loss to understand this...it's pretty clearly a classload failure of AbstractExecutor, and that class is in the org.eclipse.equinox.concurrent bundle.  Unfortunately, I've never seen this occur previously in any ECF code (or elsewhere).  Anyone else recognize anything?

Just in case something is going on at Java and/or Equinox level...what versions of Java, Eclipse and ECF are you running on the system that shows this exception?

Also...do you have (or could you generate) the entire stack trace...i.e. the stuff below the '...59 more' line at the bottom?

Scott


On 10/15/2010 2:30 AM, Eugen Reiswich wrote:
Hi Markus, 

here is the stack trace... The problem with the AbstractExecutor is not gone but the bundle  is definitely in my target platform.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:360)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:413)
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)
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/equinox/concurrent/future/AbstractExecutor
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.ecf.internal.provider.xmpp.XMPPRemoteServiceAdapterFactory.createAdapter(XMPPRemoteServiceAdapterFactory.java:47)
at org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory.getSharedObjectAdapter(AbstractSharedObjectContainerAdapterFactory.java:93)
at org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory.getContainerAdapter(AbstractSharedObjectContainerAdapterFactory.java:51)
at org.eclipse.ecf.core.AbstractContainerAdapterFactory.getAdapter(AbstractContainerAdapterFactory.java:32)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:326)
at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:356)
at org.eclipse.ecf.provider.generic.SOContainer.getAdapter(SOContainer.java:298)
at org.eclipse.ecf.provider.xmpp.XMPPContainer.getAdapter(XMPPContainer.java:265)
at org.remotercp.ecf.session.impl.SessionServiceImpl.connect(SessionServiceImpl.java:68)
at org.remotercp.ecf.producer.test.ServiceProducer.bindSessionService(ServiceProducer.java:33)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.equinox.concurrent.future.AbstractExecutor
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 59 more

Eugen

Am 15.10.2010 um 11:01 schrieb Markus Alexander Kuppe:

On 10/15/2010 10:10 AM, Eugen Reiswich wrote:

Now  XMPPContainer container.getAdapter(...) causes
an InvocationTargetException.

What's the stack trace?

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

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