« »
9/19/2013

How to fix "Could not find or load main class org.apache.cassandra.tools.NodeCmd"

After upgrading Cassandra from 1.2.9 to 2.0 and Java from 1.6 to 1.7 (because Cassandra 2.0 does not work with Java 1.6 anymore), I got the following error while running nodetool: Could not find or load main class org.apache.cassandra.tools.NodeCmd
I could not find anything so here is a quick fix: nano `which nodetool`
/* replace */
for include in "`dirname "$0"`/cassandra.in.sh" \
/* with */
for include in "$HOME/.cassandra.in.sh" \

And then nodetool should work like a charm.

Update: The same trick works when cassandra-cli throws Error: Could not find or load main class org.apache.cassandra.cli.CliMain
« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.