Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code doesn't run after compiled from source #6

Closed
fruch opened this issue Jul 31, 2024 · 1 comment · Fixed by #17
Closed

code doesn't run after compiled from source #6

fruch opened this issue Jul 31, 2024 · 1 comment · Fixed by #17
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@fruch
Copy link

fruch commented Jul 31, 2024

I've tried building the codebase locally, and I could get it to run:

❯ git clone [email protected]:CodeLieutenant/cassandra-stress.git
❯ cd cassandra-stress
❯ rm -rf build/
❯ ant -Drelease=true artifacts
...

❯ ./tools/bin/cassandra-stress write
ls: cannot access './tools/bin/../../../scylla/build/apache-cassandra*.jar': No such file or directory
grep: ./tools/bin/../../../scylla/conf/jvm11-clients.options: No such file or directory
Error: Could not find or load main class org.apache.cassandra.stress.Stress
Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.stress.Stress

❯ cd ./tools/bin/
❯ cassandra-stress write
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/scylladb/share/cassandra/lib/logback-classic-1.2.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/scylladb/share/cassandra/lib/logback-classic-1.2.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
java.lang.NoSuchMethodError: 'void com.google.common.base.Verify.verify(boolean, java.lang.String, java.lang.Object)'
        at org.apache.cassandra.db.marshal.TypeParser.parse(TypeParser.java:91)
        at org.apache.cassandra.stress.settings.SettingsColumn.<init>(SettingsColumn.java:73)
        at org.apache.cassandra.stress.settings.SettingsColumn.<init>(SettingsColumn.java:57)
        at org.apache.cassandra.stress.settings.SettingsColumn.get(SettingsColumn.java:202)
        at org.apache.cassandra.stress.settings.StressSettings.get(StressSettings.java:287)
        at org.apache.cassandra.stress.settings.StressSettings.parse(StressSettings.java:243)
        at org.apache.cassandra.stress.Stress.run(Stress.java:80)
        at org.apache.cassandra.stress.Stress.main(Stress.java:62)
❯ java --version
openjdk 11.0.23 2024-04-16
OpenJDK Runtime Environment (build 11.0.23+9-post-Ubuntu-1ubuntu122.04.1)
OpenJDK 64-Bit Server VM (build 11.0.23+9-post-Ubuntu-1ubuntu122.04.1, mixed mode, sharing)
@CodeLieutenant CodeLieutenant self-assigned this Jul 31, 2024
@CodeLieutenant CodeLieutenant added bug Something isn't working good first issue Good for newcomers labels Jul 31, 2024
@Daniel-Boll
Copy link
Contributor

With the changes introduced on #17 I managed to run it following this steps:

Steps

Steps to compile from source

  1. Clone the repository from ScyllaDB's github.
gh repo clone daniel-boll/cassandra-stress -- --branch fix/scripts-path # currently the fork by having the solution
  1. Get a version of Apache Ant. (I'm going to use asdf for this)
asdf plugin add ant
asdf install ant 1.10.14
asdf local ant 1.10.14
ant -version # Apache Ant(TM) version 1.10.14 compiled on August 16 2023
  1. Setup the java version.
asdf plugin add java
asdf install java adoptopenjdk-11.0.24+8
asdf local java adoptopenjdk-11.0.24+8
java -version # openjdk version "11.0.24" 2024-07-16
  1. Build using ant.
ant -Drelease=true artifacts
  1. Copy a configuration file.
cp ./tools/cqlstress-example.yaml conf/scylla.yaml
  1. Run it
./tools/bin/cassandra-stress help write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants