[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [ecf-dev] Getting the hello examples to work with Zoodiscovery | 
Hi Patrick and all,
First, I've opened a bug/enhancement to add zookeeper-based discovery to 
the existing 'hello world' examples
https://bugs.eclipse.org/bugs/show_bug.cgi?id=310643
This would/will make adoption of the zookeeper discovery provider for 
osgi remote services much easier.  Inline comments about the technical 
specifics of these problems below.
Patrick D. wrote:
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
For these examples, the -containerType and -containerId command line 
parameters are not intended for defining the discovery provider.  Rather 
they are for defining the distribution provider (i.e. the ecf container 
type and id of the host container for the remote service). 
So...I would not expect the above to work...as it's basically saying to 
the hello world app:  use zookeeper container type for the distribution 
provider...and the zookeeper container is not a distribution provider. 
I believe Ahmed commented already in response to your posting about the 
configuration of the zookeeper provider...and perhaps if it's not 
already available (I don't know whether it is or isn't currently) there 
could be some additional wiki documentation added for using the 
zookeeper discovery provider with the hello world example (as well as 
creating a product configuration for using zookeeper-based discovery as 
per 310643.  I suspect, btw that likely all that's needed is to create a 
new product configuration with the proper zookeeper bundles, setting 
start levels, and specifying system parameters for configuration...which 
can all be done in the product configuration file). 
Naturally, I will help with this if desired, but I think in this case we 
need the help of the zookeeper discovery folks:  Ahmed, Markus, and Wim.
Thanks for patience...we'll get this worked out...the zookeeper 
discovery is brand new and there's always an integration period with 
some early bumps.
Scott
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.
------------------------------------------------------------------------
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev