Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Command Line arguments for ZooKeeper Java example

$
0
0
Hi

I am first time ZooKeepe(ZK) user and trying my hands with the java example
that is provided.

If I understood the purpose of sample client application,
1. It subscribes to (Watches) server notifications
2. Writes to file if notification received
3. Starts/Stops executing the 'exec' commands given as 4th command line
argument

However I fail to test use it as I don't understand what should be the 3rd
run time argument to run this.

I used this - 127.0.0.1 test1 sample.txt ls -la commands line arguments and
I am getting following error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at org.apache.zookeeper.ZooKeeper.<clinit>(ZooKeeper.java:94)
at Executor.<init>(Executor.java:38)
at Executor.main(Executor.java:59)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more

P.S. Codes for Executor and DataMonitor remains as it is given

Can someone help me run it using correct cmd line arguments ?

Thanks,
Yogesh Patil

Viewing all articles
Browse latest Browse all 5648

Trending Articles