Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314507 - [Discovery] [Zookeeper] Tempfile does not include slash
Summary: [Discovery] [Zookeeper] Tempfile does not include slash
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.discovery (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Wim Jongman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 12:37 EDT by Wim Jongman CLA
Modified: 2010-05-26 12:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.