couchbase-sql-importer icon indicating copy to clipboard operation
couchbase-sql-importer copied to clipboard

Could not find or load main class

Open jijeshvu07 opened this issue 7 years ago • 1 comments

I have the CouchbaseSqlImporter.jar , mysql-connector-java-5.1.38.jar and import.properties files are on the same dir. property file contains

SQL Information

sql.connection=jdbc:mysql://localhost:3307/organization sql.username=root sql.password=password

Couchbase Information

cb.uris=http://localhost:5984/hrms-db cb.bucket=default cb.password=admin

Import information

import.tables=ALL import.createViews=true import.typefield=type import.fieldcase=lower

And i run the jar using the below cmd java -cp "CouchbaseSqlImporter.jar:mysql-connector-java-5.1.38.jar" com.couchbase.utils.sqlImporter import.properties The error while excuting cmd. Error: Could not find or load main class com.couchbase.utils.sqlImporter

jijeshvu07 avatar Jul 05 '17 09:07 jijeshvu07

I know I'm 3 years too late but just leaving this here for anyone else who might encounter this on Windows 10 I resolved it by changing the : separating the jar files to a ; and it resolves the class not found issue.

Full sample: java -cp "CouchbaseSqlImporter.jar;mysql-connector-java-5.1.38.jar" com.couchbase.utils.sqlImporter import.properties

benmarte avatar Feb 01 '21 11:02 benmarte