Sae1962
Sae1962

Reputation: 1212

Apache Cassandra starting problem: Could not find the main class: Files\Apache

I am trying some Apache Cassandra examples and could run the server by calling the cassandra.bat file before. I didn't change anything deliberately, but now, Cassandra will not start.

I searched the Web for the error message "Could not find the main class: Files\Apache. Program will exit." and found out that there may be some space in a system variable called CATALINA_HOME, but I didn't set that variable ever. Do you know about a proper solution for this error?

C:\Program Files\Apache Cassandra\bin>cassandra
Starting Cassandra Server
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Apache
Caused by: java.lang.ClassNotFoundException: Files\Apache
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Files\Apache.  Program will exit.

Upvotes: 0

Views: 1519

Answers (1)

theomega
theomega

Reputation: 32031

Perhaps you got a space in your Cassandra-Installation-Dir? Where did you install it? Current Run-Scripts got problems on Windows if the Directory where you unzipped the file got a Space in it.

Perhaps your JAVA_HOME is set wrong? Open a console (Start -> Run -> cmd) and type

echo %JAVA_HOME%

Upvotes: 4

Related Questions