Thread: SchemaSpy.jar

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5

    SchemaSpy.jar


    I try to analyse a database with this:

    http://schemaspy.sourceforge.net/

    Does somebody have this working on Firebird?

    How?

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,784
    Rep Power
    348
    What is your problem?
    Show us the error message or whatever you are getting.
  4. #3
  5. Bug Hunter
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Transylvania (Romania)
    Posts
    309
    Rep Power
    24

    Talking


    Originally Posted by rapgame
    I try to analyse a database with this:

    http://schemaspy.sourceforge.net/

    Does somebody have this working on Firebird?

    How?

    Thanks.
    It should work with firebird , from what i have seen is listed in the supported databases
    My home page: http://www.firebirdsql.org and work place :http://www.reea.net
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    I am running ubuntu Lucid (10.4).

    This Java tool has to connect with the Firebird database.

    So I type:

    Code:
    # java -jar schemaSpy_5.0.0.jar -t firebird -db employee.fdb -s schema -u SYSDBA -p bliep -o /home/user/firebird/ -port 3050 -host localhost
    The computer complains:

    Using database properties:
    Code:
      [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: [/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).
    So how-to resolve this.

    Which Java jdbc driver do you use?

    Another way to formulate this question:

    I hava a Java program, how to communicate with Firebird.
    Last edited by rapgame; February 6th, 2011 at 08:12 AM.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,784
    Rep Power
    348
    You need to specify the location of the JDBC driver's jar file:
    Code:
    java -jar schemaSpy_5.0.0.jar -cp /path/to/jaybird-full-2.1.6-java6.jar -t firebird -db employee.fdb -s schema -u SYSDBA -p masterkey -o /home/stage/rrap/firebird/ -port 3050 -host localhost
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    Thanks!

    so

    #whereis jaybird-full-2.1.6

    jaybird:


    # apt-get install jaybird-full-2.1.6

    failed, no such package.


    Jaybird is not available for Ubuntu?
    Where to get this Jaybird?
    How to install this?
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,784
    Rep Power
    348
    Originally Posted by rapgame
    Where to get this Jaybird?
    How to install this?
    Jaybird is the JDBC driver for Firebird
    You can download it from the Firebird Homepage:
    http://www.firebirdsql.org/index.php?op=devel&sub=jdbc

    Simply copy the .jar file into a convenient directory.
    Last edited by shammat; February 6th, 2011 at 09:21 AM.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    Wait a minute...

    A jar is a compressed folder.

    Like a zip folder.

    Right?

    Does Linux accept .zip instead of .jar files?

    ( I still get the error).

    I actually found this all ready, but only zip folders and not the .jar ...

    Thanks (again)
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,784
    Rep Power
    348
    1) Download the ZIP file
    2) unzip it
    3) Copy the file jaybird-full-2.1.6.jar into a convenient directory
    4) specify the full path to the .jar file when starting schema spy.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    Code:
     [schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/firebird.properties
    Gathering schema details......16:55:18.875 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: org.firebirdsql.jdbc.field.TypeConvertionException: Types.ARRAY: SQL type for this field is not yet supported.
    16:55:18.877 WARNING: Table.initColumnAutoUpdate - SQL: select * from "PROJ_DEPT_BUDGET" where 0 = 1
    ....16:55:18.919 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: org.firebirdsql.jdbc.field.TypeConvertionException: Types.ARRAY: SQL type for this field is not yet supported.
    16:55:18.920 WARNING: Table.initColumnAutoUpdate - SQL: select * from "JOB" where 0 = 1
    org.firebirdsql.jdbc.FBSQLException: The resultSet is closed
    	at org.firebirdsql.jdbc.AbstractResultSet.getField(AbstractResultSet.java:642)
    	at org.firebirdsql.jdbc.AbstractResultSet.getString(AbstractResultSet.java:701)
    	at org.firebirdsql.jdbc.AbstractDatabaseMetaData.getPrimaryKeys(AbstractDatabaseMetaData.java:3689)
    	at net.sourceforge.schemaspy.model.Table.initPrimaryKeys(Table.java:235)
    	at net.sourceforge.schemaspy.model.Table.<init>(Table.java:90)
    	at net.sourceforge.schemaspy.model.Database$TableCreator.createImpl(Database.java:1003)
    	at net.sourceforge.schemaspy.model.Database$ThreadedTableCreator$1.run(Database.java:1044)
    ...(0sec)
    Writing/graphing summary...java.lang.NullPointerException
    	at net.sourceforge.schemaspy.DbAnalyzer.getImpliedConstraints(DbAnalyzer.java:68)
    	at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:288)
    	at net.sourceforge.schemaspy.Main.main(Main.java:42)
    Thanks, but

    and no information in the generated folders

    Do you get this too?
    Last edited by rapgame; February 6th, 2011 at 10:11 AM.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    I think a jar is always a zip

    But a zip is not always a jar.

    I found another jar:
    Code:
    #java -jar /home/java/schemaSpy_5.0.0.jar -t firebird -db /var/lib/firebird/2.1/data/employee.fdb -s schema -u SYSDBA -p blala -o /home/firebird/ -port 3050 -host localhost -dp /home/firebird/bla/jaybird-full-2.1.5.jar

    Code:
    Using database properties:
      [/home/schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/firebird.properties
    Gathering schema details......17:29:54.985 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: org.firebirdsql.jdbc.field.TypeConvertionException: Types.ARRAY: SQL type for this field is not yet supported.
    .17:29:54.987 WARNING: Table.initColumnAutoUpdate - SQL: select * from "PROJ_DEPT_BUDGET" where 0 = 1
    .17:29:55.004 WARNING: Table.initColumnAutoUpdate - Failed to determine auto increment status: org.firebirdsql.jdbc.field.TypeConvertionException: Types.ARRAY: SQL type for this field is not yet supported.
    17:29:55.004 WARNING: Table.initColumnAutoUpdate - SQL: select * from "JOB" where 0 = 1
    ......(0sec)
    Writing/graphing summary..............(0sec)
    Writing/diagramming details...........(2sec)
    Wrote relationship details of 11 tables/views to directory '/home//firebird' in 3 seconds.
    View the results by opening /home//firebird/index.html
    Lots of thanks, it works!
    Last edited by rapgame; February 6th, 2011 at 01:40 PM.
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    Sometimes you have to add -dbThreads 1

    Because of multiple connections.

    Code:
    #java -jar /home/java/schemaSpy_5.0.0.jar -t firebird -db /var/lib/firebird/2.1/data/employee.fdb -s schema -u SYSDBA -p blala -o /home/firebird/ -port 3050 -host localhost -dp /home/firebird/jaybird-full-2.1.5.jar -dbThreads 1
    Why are those multiple connection issues never the case with MySQL and PostgreSQL?
    Last edited by rapgame; February 6th, 2011 at 01:41 PM.
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    1
    Rep Power
    0
    I've updated firebird.properties to indicate that it's single-threaded. Note that Oracle and MS SQL Server also have JDBC metadata services that don't support queries from multiple threads.

    John
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    74
    Rep Power
    5
    Thanks,

    This is the kind of feedback and support I really appreciate.

    Long live opensource and their contributors.

IMN logo majestic logo threadwatch logo seochat tools logo