0

Im working with my own database cluster with cassandra. I want to try some stress tests with my database, thats why i downloaded DataStax Java-driver for Cassandra.

https://github.com/datastax/java-driver

After I downloaded it, I got to know, that I need Maven to install it. So I downloaded Maven from here and added all necessary paths to the environment.

http://maven.apache.org/download.cgi

Using windows command line I went into the java-driver directory and called

mvn install

The build was successfull and afterwards I tried to execute the stress jar file in driver-examples/stress/target using command line with

 java -jar theJarFile.jar

I got the Error:

Failed to load Main-Class manifest attribute from cassandra-driver-examples-stress-1.0.1-SNAPSHOT.jar

How can I run this program?

Background: I worked the first time with maven in this.

Thank you.

Scott Mermelstein
  • 15,174
  • 4
  • 48
  • 76
tellob
  • 1,220
  • 3
  • 16
  • 32

2 Answers2

1

Better idea will create a maven build project, then import the dependency, configure the cluster details in your project and then run whatever test you want.

Else you can check try this considering the fact that artifactId maven-assembly-plugin is not properly done

  • Open the stress pom file

  • Edit the file

    <build>
      <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
            <!--  <artifactId>maven-assembly-plugin</artifactId>-->
              <configuration>
                  .
                  .
                  .
              </configuration>
          </plugin>
      </plugins>
    

  • mvn clean install -e

  • java -jar target/cassandra-driver-examples-stress-1.0.1-SNAPSHOT.jar

abhi
  • 4,762
  • 4
  • 29
  • 49
  • Do you mean creating an eclipse project for that? I never did that before and why shouldnt I use the command line thing? Should work with this aswell or? Some further description on how to do it would be great. – tellob May 20 '13 at 08:35
  • Since cassandra-driver-examples-stress-1.0.1-SNAPSHOT.jar is not an executable jar file, that's why you are getting that error. Either you set the Main-Class in your from POM file, else use any IDE to run your program. – abhi May 20 '13 at 08:42
  • Could you give me a description on how to do this in eclipse for example? I would only like to use the stress client, to check the performance of my cluster. – tellob May 20 '13 at 08:50
  • And if you want to built it via IDE, then simply create a project and then import the modules in your project and run accordingly. SIMPLE!!!!!!!!! – abhi May 20 '13 at 09:33
0

Did you try following the instructions here for running it?
https://github.com/datastax/java-driver/tree/master/driver-examples/stress

The scripts in bin should work from a cygwin shell, or you could just read the commands in them to run in cmd.exe

Zanson
  • 3,991
  • 25
  • 31