Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314507

Summary: [Discovery] [Zookeeper] Tempfile does not include slash
Product: [RT] ECF Reporter: Wim Jongman <wim.jongman>
Component: ecf.discoveryAssignee: Wim Jongman <wim.jongman>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Wim Jongman CLA 2010-05-26 12:37:33 EDT
Thank you for working on the hello world examples.

I had problems when running them, though.
Whichever product file I started, an exception like the following was always thrown:

java.lang.NullPointerException
at org.eclipse.ecf.provider.zookeeper.core.internal.Configuration.clean(Configuration.java:220)
at org.eclipse.ecf.provider.zookeeper.core.internal.Configuration.configure(Configuration.java:64)
at org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer.init(ZooDiscoveryContainer.java:119)
at org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer.connect(ZooDiscoveryContainer.java:339)
at org.eclipse.ecf.provider.zookeeper.DiscoveryActivator$3.run(DiscoveryActivator.java:136)
at java.lang.Thread.run(Thread.java:619)

Digging a bit through the code I found out that the problem is the setZookeeperData call in Configuration.java:57. It always tried to create the path "/tmpzookeeperData". Of course, it has rights to create a directory in my root.

Adding a "+ File.separatorChar" and thus changing the call to

setZookeeperData(new File(getConfigProperties().get(
ZOOKEEPER_TEMPDIR).toString() + File.separatorChar
+ getConfigProperties().get(ZOOKEEPER_DATADIR)));

fixed the problem.
Forgive me if this is not the right way to inform you of the bug and fix. ;)

Thanks and Regards,
Patrick
Comment 1 Wim Jongman CLA 2010-05-26 12:38:33 EDT
Fixed and Released to HEAD.