Running Cassandra 1.2

Setting up Cassandra 1.2’s third beta release set out to be simple but because of the error messages given when something does go wrong, it was confusing to work out.

I started out by cloning and building the latest Cassandra available using git and Ant. That’s where the first problem came along. I didn’t specify the correct location to my JDK and ant complained that it was missing tools.jar, so I just dumped the jar into the JRE location.

After that the build succeeded and I was ready to run cassandra, except when trying to do so i got the following error:

Exception in thread ‘main’ java.lang.NoSuchMethodError: main Exception in thread “main”

Turns out that Cassandra 1.2 did not like java 6, so after changing the jdk to 1.7 I have it another shot which came up with this error:

Error: Main method not found in class org.apache.cassandra.service.CassandraDaemon, please define the main method as:    public static void main(String[] args)

This turned out to be a environment variable problem. My CASSANDRA_HOME variable was pointing to my old installation of cassandra. Changing this variable to the correct path fixed the problem.

They say third time’s the charm, and it certainly was in this case. On my third run I finally got the “Listening for thrift clients…” message meaning the server is running!

Leave a comment