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?
Thanks in advance!
E. SABAN
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.
Found the solution to my problem
I found out the problem. I had changed the path of Cassandra to „Apache Cassandra“. That’s the reason for the problems. I solved the self-made problem by removing the quotation marks around the JAVA_HOME definition. The space inbetween „Program Files“ seems not to be a problem. I renamed „Apache Cassandra“ back to „Apache-Cassandra-0.7.4“. Now, it runs properly.
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?
Seems that the start script can’t handle spaces in the path. Either correct the script by applying „“ around the path or move the installation to a path without spaces.
Regards,
Heinz
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