Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] Getting the hello examples to work with Zoodiscovery

Hello,

I'm trying to get the hello examples from the cvs to work with Zoodiscovery. After basically trying out all combinations of flavors, properties, ServiceInfos, DiscoveryAdvertisvers and DiscoveryLocators from http://wiki.eclipse.org/Zookeeper_Based_ECF_Discovery, I just can't get it work.

I already tried to create a container and connecting to a Zookeeper server manually, different flavors and other things but everything failed in one way or another.
I'm guessing you just can't Zoodiscovery in the same way as the other discovery methods and you have to do all things manually.

In one of my last tries I got the servers to connect to each other, but it still didn't discover any service that I registered.

So I just started over (again) and trying to make very small steps towards a Zoodiscovery integration.
The first thing I did was downloading Zookeeper and the Zoodiscovery bundle from :pserver:anonymous@xxxxxxxxxxxxxxx:/ecf and log4j from Orbit. No problems here yet.
I then proceed to download the hello examples from :pserver:anonymous@xxxxxxxxxxxxxxx:/cvsroot/rt.

Starting the generic hello host and the generic, zeroconf hello consumer work fine. Everything works just as expected.
These products were used as a starting point. I added a dependency to zookeeper, zoodiscovery and log4j and modified the launching parameters to:

-console -consoleLog
-containerType ecf.discovery.zoodiscovery
-containerId zoodiscovery.flavor.standalone=127.0.01

Starting any of the two products now results in the following output:

osgi> [log;+0200 2010.04.27 11:48:48:796;WARNING;org.eclipse.ecf.identity;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.identity;code=2;message=Namespace collision for name=ecf.namespace.jmdns;severity2;exception=null;children=[]]]
[log;+0200 2010.04.27 11:48:48:797;WARNING;org.eclipse.ecf.identity;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.identity;code=2;message=Namespace collision for name=ecf.namespace.generic.remoteservice;severity2;exception=null;children=[]]]
!SESSION 2010-04-27 11:48:47.533 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
Framework arguments: -application org.eclipse.ecf.examples.remoteservices.hello.consumer.HelloConsumer -containerType ecf.discovery.zoodiscovery -containerId zoodiscovery.flavor.standalone=127.0.01
Command-line arguments: -application org.eclipse.ecf.examples.remoteservices.hello.consumer.HelloConsumer -data /import/users/users/p_deuste/ecf/workspace/../runtime-HelloServiceConsumer(generic,zeroconfdiscovery).product -dev file:/import/users/users/p_deuste/ecf/workspace/.metadata/.plugins/org.eclipse.pde.core/Hello Service Consumer (generic, zeroconf discovery).product/dev.properties -os linux -ws gtk -arch x86 -console -consoleLog -containerType ecf.discovery.zoodiscovery -containerId zoodiscovery.flavor.standalone=127.0.01

!ENTRY org.eclipse.osgi 2 0 2010-04-27 11:48:53.861
!MESSAGE While loading class "org.eclipse.ecf.provider.zookeeper.core.IDiscoveryConfig", thread "Thread[pool-2-thread-1,5,main]" timed out waiting (5000ms) for thread "Thread[app thread - org.eclipse.ecf.examples.remoteservices.hello.consumer.HelloConsumer.0,5,main]" to finish starting bundle "org.eclipse.ecf.provider.zookeeper_1.0.0.qualifier [30]". To avoid deadlock, thread "Thread[pool-2-thread-1,5,main]" is proceeding but "org.eclipse.ecf.provider.zookeeper.core.IDiscoveryConfig" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "initial@reference:file:../workspace/org.eclipse.ecf.provider.zookeeper/" by thread "app thread - org.eclipse.ecf.examples.remoteservices.hello.consumer.HelloConsumer.0".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1073)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:278)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.eclipse.ecf.provider.zookeeper.DiscoveryActivator$1.run(DiscoveryActivator.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 17 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1073)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:278)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.eclipse.ecf.provider.zookeeper.DiscoveryActivator$1.run(DiscoveryActivator.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
ZooDiscovery> Discovery Service Activated. 27.04.2010 11:48:53.
[log;+0200 2010.04.27 11:48:53:869;WARNING;org.eclipse.ecf.identity;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.identity;code=2;message=Namespace collision for name=ecf.namespace.zoodiscovery;severity2;exception=null;children=[]]]

Any hint in the right direction is greatly appreciated!
Thanks in advance,
Patrick D.

Back to the top