The problem is solved. I copied cassandra and cassandra.in to my bin folder.
Then used "ant release " to generate my customized cassandra.jar in dist folder.
To Aaron: I tried "ant artefacts", but it failed. is it because I am using Cassandra 0.7?
What's the difference between "ant artefacts" and "ant release"?
Have a look at this file in the source repo https://github.com/apache/cassandra/blob/trunk/bin/cassandratry using "ant artefacts" and look in the build/dist dir.cheersOn 7 Aug 2011, at 03:58, Alvin UW wrote:
I am a beginner.
I checked bin folder under myCassandra. There are only some classes without executable file.
after "ant release", I got the jar file from build folder.
2011/8/6 Jonathan Ellis <firstname.lastname@example.org>look at bin/cassandra, you can't just run it with "java -jar"
On Sat, Aug 6, 2011 at 10:43 AM, Alvin UW <email@example.com> wrote:
> I set up a Cassandra project in Eclipse following
> Then, I made a few modifications on it to form a customised Cassandra.
> But I don't know how can I release this new Cassandra from Eclipse as a jar
> file to use in EC2.
> I tried "ant release" command in command line. It can successful build .jar
> Then I typed java -jar apache-cassandra-0.7.0-beta1-SNAPSHOT.jar
> "Error: Failed to load Main-Class manifest attribute from "
> I edited a MANIFEST.MF like:
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.7.1
> Created-By: 16.3-b01 (Sun Microsystems Inc.)
> Implementation-Title: Cassandra
> Implementation-Version: 0.7.0-beta1-SNAPSHOT
> Implementation-Vendor: Apache
> Main-Class: org.apache.cassandra.thrift.CassandraDaemon
> and tried again. the error is like below:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> Caused by: java.lang.ClassNotFoundException:
> at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
> Could not find the main class: org.apache.cassandra.thrift.CassandraDaemon.
> Program will exit.
> So what's the problem?
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support