Question

I've just downloaded schemaspy and it is working perfectly apart from one thing. I always have to specify the path to the mysql connector with the -dp option.

If I don't specify it, I get this error:

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Failed to load driver 'com.mysql.jdbc.Driver'
This entry doesn't point to a valid file/directory: [/mysql/mysql-connector-java-5.1.6-  bin.jar]

The path (symlink to /usr/share/java/mysql-connector-java-5.1.28.jar or whatever version you have) is:

/usr/share/java/mysql-connector-java.jar

And it is on the $CLASSPATH.

Also, don't expect -p prompt for a password.

No correct solution

OTHER TIPS

I do it this way.. Added this as parameter: -dp C:\apache-tomcat-6.0.37\lib\mysql-connector-java-5.1.10.jar kept my mysql driver in destined folder.

Worked for me.

I use SchemaSpy ,a java based application, aand store the params using File-> Store Parameters once and later i just load it whenever i need it by File -> Load Parameters. You can give a try.

Create then a script with the java statement and save the path to the mysql-connector as an enviroment variable and pass it to the -dp.

I had the common issues about the mysql-connector and the dot executable file. It's not necessary to restart the machine if you pass the correct value to -gv, believe me. I've installed the Graphviz and found the mysql-connector performing a sorted search of *.jar files.

The following lines are how I executed the statement.

java 
-jar schemaSpy.jar 
-t mysql 
-o library 
-host localhost 
-db dummyDB 
-u user
-p user
-dp C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\mysql-connector-java-commercial-5.1.22\mysql-connector-java-commercial-5.1.22-bin.jar 
-gv "C:\Program Files (x86)\Graphviz2.38"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top