schemaspy / schemaspy

Database documentation built easy
http://schemaspy.org
GNU Lesser General Public License v3.0
3.21k stars 314 forks source link

TRying to run schemaSpy for Firebird DB #735

Open mak053 opened 4 years ago

mak053 commented 4 years ago

Received the below message when executing: java -jar C:\Users\mkelly\Downloads\schemaSpy_5.0.0.jar -t firebird -db C:\SiteWatch\DB\Test.fdb -u Reports -p reports -o C:\Program Files\Firebird -port 3050 -host localhost -dp C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar

Failed to query Graphviz version information with: dot -V java.io.IOException: Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified 11:41:37.550 WARNING: SchemaAnalyzer.analyze - Unrecognized option(s): Files\Firebird Using database properties: [C:\Users\mkelly\Downloads\schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/firebird.properties java.lang.ClassNotFoundException: org.firebirdsql.jdbc.FBDriver

Failed to load driver 'org.firebirdsql.jdbc.FBDriver' These entries don't point to valid files/directories: [C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar, \usr\java\tools\firebird\jaybird-full-2.0.1.jar:, c:jdbc irebirdjaybird-full-2.0.1.jar]

Use the -dp option to specify the location of the database drivers for your database (usually in a .jar or .zip/.Z).

Expected Behavior

expecting to run successful and create ER and relationship docs

Current Behavior

see above

Possible Solution

Believe it is an issue accessing jdbc driver but not sure how to resolve.

Steps to Reproduce (for bugs)

in cmd prompt run - C:\Users\mkelly>java -jar C:\Users\mkelly\Downloads\schemaSpy_5.0.0.jar -t firebird -db C:\SiteWatch\DB\Test.fdb -u Reports -p reports -o C:\Program Files\Firebird -port 3050 -host localhost -dp C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar

Context

Need to understand tables and relationships in order to build query and reporting solution.

Your Environment

Windows 10 Firebird DB 2_5 JDBC jaybird 4.0.1 jre 1.8.0_261

npetzall commented 4 years ago

Sorry, we have no support for 5.0.0. Could you try with 6.1.0 or 6.1.1-SNAPSHOT.

Reason being that the code has changed to much an i believe it was changed before the initial commit of this repository.

npetzall commented 4 years ago

But I see two issues right of the bat.

java -jar C:\Users\mkelly\Downloads\schemaSpy_5.0.0.jar -t firebird -db C:\SiteWatch\DB\Test.fdb -u Reports -p reports -o "C:\Program Files\Firebird" -port 3050 -host localhost -dp C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar

The output path contains space so needs quotes and graphviz isn't in path env should be possible to specify with `-gv "[path to graphviz folder]"

Might get an error regarding user and then you could use -sso if that is available in 5.0.0

mak053 commented 4 years ago

First, thanks for the help.

downloaded 6.1.0 and retried with similar results - see below.

I did change the output path to remove spaces as you suggested.

Also, I need to install graphviz. I'm not a developer so this may take me a little while. I will respond once I've installed and tried again.

C:\Users\mkelly>java -jar C:\Users\mkelly\Downloads\schemaspy-6.1.0.jar -t firebird -db C:\SiteWatch\DB\Test.fdb -u Reports -p reports -o C:\aaa -port 3050 -host localhost -dp C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar


/ | | | __ _ / | _ _ \ / | ' \ / \ ' ` \ / _` _ | ' | | | | ) | (| | | | / | | | | | (_| |) | |) | || | |____/ \|| ||_|| || ||_,_|__/| ./ \, | |_| |___/

                                          6.1.0

SchemaSpy generates an HTML representation of a database schema's relationships. SchemaSpy comes with ABSOLUTELY NO WARRANTY. SchemaSpy is free software and can be redistributed under the conditions of LGPL version 3 or later. http://www.gnu.org/licenses/

INFO - Starting Main v6.1.0 on DESKTOP-TVS28T0 with PID 2840 (C:\Users\mkelly\Downloads\schemaspy-6.1.0.jar started by mkelly in C:\Users\mkelly) INFO - The following profiles are active: default INFO - Started Main in 0.99 seconds (JVM running for 1.401) INFO - Starting schema analysis WARN - Connection Failure Failed to connect to database URL [jdbc:firebirdsql://localhost:3050/C:/SiteWatch/DB/Test.fdb] Failed to create any of 'org.firebirdsql.jdbc.FBDriver' driver from driverPath 'C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar' with sibling jars no. Resulting in classpath: empty There were missing paths in driverPath: C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar Use commandline option '-dp' to specify driver location. If you need to load sibling jars used '-loadjars' INFO - StackTraces have been omitted, use -debug when executing SchemaSpy to see them

npetzall commented 4 years ago

There were missing paths in driverPath: C:\Users\mkelly\Downloads\Jaybird-3.0.9-JDK_1.8.zip\jaybird-full-3.0.9.jar

It says that the file doesnt exist. It doesn't load jars from inside zips so you'll need to extract it. I'm jus assuming that you get that kind of path in explorer when double clicking a zip file.

npetzall commented 4 years ago

Actually with 6.1 and newer you can skip graphviz and just use -vizjs when using Java older than 15.

npetzall commented 4 years ago

There's a bug in 6.1 that's fixed in 6.1.1-SNAPSHOT related to links between different schemas.