Skip to content

MySQL Failed to initialize JDBC driver 'com.mysql.cj.jdbc.Driver' #613

@wblangdon

Description

@wblangdon

Following issue #612 we have Java 23 ok (thanks again).

I do not know if this is a Benchbase, MySQL, JDBC or CLASSPATH problem but...

When I try (with Java 23.0.2)
java -jar benchbase.jar -b tpcc -c config/mysql/sample_tpcc_config.xml --create=true --load=true --execute=true
it immediately fails with exit status 1
and output:

[INFO ] 2025-03-20 11:26:40,004 [main] com.oltpbenchmark.DBWorkload main - ======================================================================

Benchmark: TPCC {com.oltpbenchmark.benchmarks.tpcc.TPCCBenchmark}
Configuration: config/mysql/sample_tpcc_config.xml
Type: MYSQL
Driver: com.mysql.cj.jdbc.Driver
URL: jdbc:mysql://localhost:3306/benchbase?rewriteBatchedStatements=true&allowPublicKeyRetrieval=True&sslMode=DISABLED
Isolation: TRANSACTION_SERIALIZABLE
Batch Size: 128
DDL Path: null
Loader Threads: 8
Session Setup File: null
Scale Factor: 1.0
Terminals: 1
New Connection Per Txn: false
Reconnect on Connection Failure: true

[INFO ] 2025-03-20 11:26:40,005 [main] com.oltpbenchmark.DBWorkload main - ======================================================================
Exception in thread "main" java.lang.RuntimeException: Failed to initialize JDBC driver 'com.mysql.cj.jdbc.Driver'
at com.oltpbenchmark.WorkloadConfiguration.init(WorkloadConfiguration.java:315)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:467)
Caused by: java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:462)
at java.base/java.lang.Class.forName(Class.java:453)
at com.oltpbenchmark.WorkloadConfiguration.init(WorkloadConfiguration.java:313)
... 1 more

any help or guidance would be most welcome
Bill

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions