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

HTraceConfiguration Class Not Found Exception #865

Closed
Francis-Liu opened this issue Oct 25, 2016 · 9 comments
Closed

HTraceConfiguration Class Not Found Exception #865

Francis-Liu opened this issue Oct 25, 2016 · 9 comments
Labels

Comments

@Francis-Liu
Copy link

Francis-Liu commented Oct 25, 2016

I want to run YCSB with Cassandra, "ycsb load" command failed immediately with the following error:

bin/ycsb.sh load cassandra-cql -p hosts="10.40.1.167" -P workloads/workloada
/usr/lib/jvm/jre-1.8.0-openjdk/bin/java  -classpath /home/cc/YCSB/conf:/home/cc/YCSB/core/target/core-0.12.0-SNAPSHOT.jar:/home/cc/YCSB/cassandra/target/cassandra-binding-0.12.0-SNAPSHOT.jar:/home/cc/YCSB/cassandra/target/dependency/cassandra-driver-core-3.0.0.jar:/home/cc/YCSB/cassandra/target/dependency/guava-16.0.1.jar:/home/cc/YCSB/cassandra/target/dependency/metrics-core-3.1.2.jar:/home/cc/YCSB/cassandra/target/dependency/netty-buffer-4.0.33.Final.jar:/home/cc/YCSB/cassandra/target/dependency/netty-codec-4.0.33.Final.jar:/home/cc/YCSB/cassandra/target/dependency/netty-common-4.0.33.Final.jar:/home/cc/YCSB/cassandra/target/dependency/netty-handler-4.0.33.Final.jar:/home/cc/YCSB/cassandra/target/dependency/netty-transport-4.0.33.Final.jar:/home/cc/YCSB/cassandra/target/dependency/slf4j-api-1.6.4.jar com.yahoo.ycsb.Client -load -db com.yahoo.ycsb.db.CassandraCQLClient -p hosts=10.40.1.167 -P workloads/workloada
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/htrace/core/HTraceConfiguration
        at com.yahoo.ycsb.Client.main(Client.java:947)
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.core.HTraceConfiguration
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more

I did not install htrace on my computer. In the latest version of YCSB, is htrace turned on by default? If so, is there a way to turn it off?

Also, I am curious how 'deeply' is htrace integrated with YCSB, only at the 'global' YCSB client level? Or is the htrase code implemented in every individual database interfaces?

@busbey
Copy link
Collaborator

busbey commented Oct 25, 2016

This looks like an error in the classpath generation for maven source runs. Can you try one of more of the following:

  • run from the 0.11.0 release's binary artifact
  • build a binary artifact from a git checkout and run from that artifact
  • run from source checkout using the old 'ycsb' python script rather than the newer bash

I did not install htrace on my computer. In the latest version of YCSB, is htrace turned on by default? If so, is there a way to turn it off?

By default HTrace is set to no tracing. However, like log levels in e.g. slf4j this still requires a call into the htrace library (to check if tracing is on, for example).

Also, I am curious how 'deeply' is htrace integrated with YCSB, only at the 'global' YCSB client level? Or is the htrase code implemented in every individual database interfaces?

AFAIK it's currently implemented around the wrapper we layer on top of the storage interfaces. That means we trace each kind of operation we do in YCSB. However, tracing through the individual storage engines would depend on if the client libraries of a given storage system.

@Francis-Liu
Copy link
Author

@busbey Your answer is very helpful. Now I can run YCSB successfully. I think this issue should be closed.

Thank you so much!

@busbey
Copy link
Collaborator

busbey commented Oct 26, 2016

I'm glad things helped. I'm going to reopen this issue so we can figure out where the failure is on using the bash script with a source build.

Let me know if you can't unsubscribe from updates and I'll switch to a new issue instead.

@mkaurin
Copy link

mkaurin commented Dec 23, 2016

0.13.0-SNAPSHOT works by just invoking the python script instead of the bash script

@risdenk
Copy link
Collaborator

risdenk commented Jan 19, 2017

Closing this since #877 has some details related to the 0.12.0 release.

@risdenk risdenk closed this as completed Jan 19, 2017
@KhanhCon
Copy link

I'm having this issue. Using the old python script doesn't help me.
Do I need to install Htrace on my computer?

@busbey
Copy link
Collaborator

busbey commented Mar 25, 2017

Please open a new issue @KhanhCon

@KhanhCon
Copy link

@busbey Oh. I'm using 'bin\ycsb' command on Windows and this seems to run the ycsb.bat file.
I'm new to Github so is it appropriate to ask how run the python script on Windows here?
Thank you

@busbey
Copy link
Collaborator

busbey commented Mar 25, 2017

In a new issue, sure. Go to "issues" for the project and then click on "new issue".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants