Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
4.5.1
-
Untriaged
-
Unknown
Description
Hi Johan
As we discussed, adding jdbc-json dependency to ycsb pom.xml as:
<dependency>
<groupId>com.couchbase.jdbc</groupId>
<artifactId>jdbc-n1ql</artifactId>
<version>0.4.5</version>
</dependency>
does not include the jar in its classpath when ycsb code is built with mvn.I think this is causing the run ycsb to fail too.
Here are the steps followed:
bin/ycsb run jdbc -P workloads/workloada -P db.properties -cp /tmp/jdbc-n1ql-1.0-BETA.jar
Command is taken from:
https://github.com/brianfrankcooper/YCSB/tree/master/jdbc
I changed db.properties as:
b.driver=com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
db.url=jdbc:couchbase://172.23.100.207:8093 # The Database connection URL.
db.user=Administrator # User name for the connection.
db.passwd=password # Password for the connection.
jdbc.autocommit=true # The JDBC connection auto-commit property for the driver.
jdbc.batchupdateapi=false
Error reported:
[DEBUG] Running 'mvn -pl com.yahoo.ycsb:jdbc-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
java -cp /tmp/jdbc-n1ql-1.0-BETA.jar:/root/CASSANDRA-YCSB/YCSB_3/jdbc/conf:/root/CASSANDRA-YCSB/YCSB_3/jdbc/target/jdbc-binding-0.13.0-SNAPSHOT.jar:/root/CASSANDRA-YCSB/YCSB_3/core/target/core-0.13.0-SNAPSHOT.jar:/root/.m2/repository/org/apache/htrace/htrace-core4/4.1.0-incubating/htrace-core4-4.1.0-incubating.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar:/root/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.4/jackson-core-asl-1.9.4.jar:/root/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.4/HdrHistogram-2.1.4.jar:/root/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.4/jackson-mapper-asl-1.9.4.jar:/root/.m2/repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar:/root/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/org/apache/openjpa/openjpa-kernel/2.1.1/openjpa-kernel-2.1.1.jar:/root/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar:/root/.m2/repository/org/apache/openjpa/openjpa-lib/2.1.1/openjpa-lib-2.1.1.jar:/root/.m2/repository/org/apache/openjpa/openjpa-jdbc/2.1.1/openjpa-jdbc-2.1.1.jar com.yahoo.ycsb.Client -db com.yahoo.ycsb.db.JdbcDBClient -P workloads/workloada -P db.properties -t
YCSB Client 0.13.0-SNAPSHOT
Command line: -db com.yahoo.ycsb.db.JdbcDBClient -P workloads/workloada -P db.properties -t
Loading workload...
Starting test.
Error in initializing the JDBS driver: java.lang.ClassNotFoundException: com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
com.yahoo.ycsb.DBException: java.lang.ClassNotFoundException: com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
at com.yahoo.ycsb.db.JdbcDBClient.init(JdbcDBClient.java:223)
at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:99)
at com.yahoo.ycsb.ClientThread.run(Client.java:418)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.yahoo.ycsb.db.JdbcDBClient.init(JdbcDBClient.java:196)
... 3 more
com.yahoo.ycsb.DBException: java.lang.ClassNotFoundException: com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
at com.yahoo.ycsb.db.JdbcDBClient.init(JdbcDBClient.java:223)
at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:99)
at com.yahoo.ycsb.ClientThread.run(Client.java:418)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.couchbase.jdbc.CBDriver # The JDBC driver class to use.
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.yahoo.ycsb.db.JdbcDBClient.init(JdbcDBClient.java:196)
... 3 more