couchbase-sql-importer
couchbase-sql-importer copied to clipboard
Could not find or load main class
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
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