nuodb / migration-tools

Migration tools for NuoDB
http://nuodb.github.com/migration-tools/
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

nuodb-migration dump fails with "Class is not found com.mysql.jdbc.Driver" #2

Closed akshah123 closed 11 years ago

akshah123 commented 11 years ago

Hello,

After successfully completing "mvn install", I am getting an error why trying to dump data from a mysql database. Please see below for the command:

./nuodb-migration dump --source.driver=com.mysql.jdbc.Driver \ --source.url=jdbc:mysql://xxx.xxx.xxx.xxx:3306/database --source.catalog=database \ --source.username=root --source.password=xxxxxxxxx --output.type=csv --output.path=/vol/omnitarget_dump.cat

The command fails with following error message:

com.nuodb.migration.utils.ReflectionException: Class is not found com.mysql.jdbc.Driver at com.nuodb.migration.utils.ReflectionUtils.newInstance(ReflectionUtils.java:62) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.loadDriver(DriverConnectionProvider.java:110) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.initDriver(DriverConnectionProvider.java:95) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.getConnection(DriverConnectionProvider.java:117) at com.nuodb.migration.jdbc.connection.DriverConnectionServices.getConnection(DriverConnectionServices.java:54) at com.nuodb.migration.jdbc.connection.DriverConnectionServices.getDatabaseInspector(DriverConnectionServices.java:66) at com.nuodb.migration.dump.DumpJob.dump(DumpJob.java:117) at com.nuodb.migration.dump.DumpJob.execute(DumpJob.java:108) at com.nuodb.migration.dump.DumpJob.execute(DumpJob.java:94) at com.nuodb.migration.job.SimpleJobExecutor.execute(SimpleJobExecutor.java:103) at com.nuodb.migration.cli.run.CliRunJob.run(CliRunJob.java:56) at com.nuodb.migration.cli.run.CliRunJob.run(CliRunJob.java:49) at com.nuodb.migration.cli.CliHandlerSupport.handleRun(CliHandlerSupport.java:179) at com.nuodb.migration.cli.CliHandlerSupport.handleOptionSet(CliHandlerSupport.java:127) at com.nuodb.migration.cli.CliHandler.boot(CliHandler.java:53) at com.nuodb.migration.bootstrap.Bootstrap.boot(Bootstrap.java:80) at com.nuodb.migration.bootstrap.Bootstrap.main(Bootstrap.java:135) Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at com.nuodb.migration.utils.ReflectionUtils.newInstance(ReflectionUtils.java:60) ... 16 more Jan 4, 2013 11:09:58 PM com.nuodb.migration.bootstrap.Bootstrap main SEVERE: Boot failed com.nuodb.migration.cli.run.CliRunException: Class is not found com.mysql.jdbc.Driver at com.nuodb.migration.cli.run.CliRunJob.run(CliRunJob.java:59) at com.nuodb.migration.cli.run.CliRunJob.run(CliRunJob.java:49) at com.nuodb.migration.cli.CliHandlerSupport.handleRun(CliHandlerSupport.java:179) at com.nuodb.migration.cli.CliHandlerSupport.handleOptionSet(CliHandlerSupport.java:127) at com.nuodb.migration.cli.CliHandler.boot(CliHandler.java:53) at com.nuodb.migration.bootstrap.Bootstrap.boot(Bootstrap.java:80) at com.nuodb.migration.bootstrap.Bootstrap.main(Bootstrap.java:135) Caused by: com.nuodb.migration.utils.ReflectionException: Class is not found com.mysql.jdbc.Driver at com.nuodb.migration.utils.ReflectionUtils.newInstance(ReflectionUtils.java:62) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.loadDriver(DriverConnectionProvider.java:110) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.initDriver(DriverConnectionProvider.java:95) at com.nuodb.migration.jdbc.connection.DriverConnectionProvider.getConnection(DriverConnectionProvider.java:117) at com.nuodb.migration.jdbc.connection.DriverConnectionServices.getConnection(DriverConnectionServices.java:54) at com.nuodb.migration.jdbc.connection.DriverConnectionServices.getDatabaseInspector(DriverConnectionServices.java:66) at com.nuodb.migration.dump.DumpJob.dump(DumpJob.java:117) at com.nuodb.migration.dump.DumpJob.execute(DumpJob.java:108) at com.nuodb.migration.dump.DumpJob.execute(DumpJob.java:94) at com.nuodb.migration.job.SimpleJobExecutor.execute(SimpleJobExecutor.java:103) at com.nuodb.migration.cli.run.CliRunJob.run(CliRunJob.java:56) ... 6 more Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at com.nuodb.migration.utils.ReflectionUtils.newInstance(ReflectionUtils.java:60) ... 16 more

akshah123 commented 11 years ago

Please disregard this ticket as I clearly missed the instructions on how to properly update the pom file and include the dependency. If anyone else sees this, please take a look at the readme to see how to include dependency.

tl;dr --> rtfm