I want to use Schema Spy to generate schema diagrams,
I have specifed the following command
java -jar schemaSpy_5.0.0.jar -t pgsql -host 10.100.71.21[:5432] -db mydb -s public -u username -p password -dp postgresql-8.0-312.jdbc3.jar -o output/
I have the postgresql driver jar file in the same directory as schema spy jar file. But it gives the following error
[schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
java.lang.ClassNotFoundException: org.postgresql.Driver
Failed to load driver 'org.postgresql.Driver'from: [file:/home/panx/postgresql-8.0- 312.jdbc3.jar]
This entry doesn't point to a valid file/directory: [/whereever/postgresql-8.0-312.jdbc3.jar]
Use the -dp option to specify the location of the database
drivers for your database (usually in a .jar or .zip/.Z).
Any help would be appreciated.
Thanks,
Pankaj
First you need to download the actual driver Here.
Then run with set path to Driver
For example for Windows
java -jar schemaSpy.jar -t pgsql -host localhost:5432 -db _dbname_ -s _schena_name_ -u postgres -p -o D:\RVA\postgreSQL\ -dp "D:\Program Files (x86)\PostgreSQL\pgJDBC\postgresql-42.2.5.jar"
I think the problem is you didn't add the classpath to the driver. You have to add your classpath like this
java -jar schemaSpy_5.0.0.jar -t pgsql -host 10.100.71.21[:5432] -db mydb -s public -u username -p password -dp /home/panx/postgresql-8.0-312.jdbc3.jar -o output/
If it does not work you can download the source code of this project. In the project there is pgsql.properties file in dbTypes folder. You can change it with your classpath and I think this solves your problem.
I'd like to add a few points.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With