Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


infinite loop with Database.addRemoteTable

  • Grégory S.
    Grégory S.


    I'm a new user of this very good tool.

    I used it directly on a huge (~500 tables.. with horribly numerous relations between tables) database using following command line :

    java -jar schemaSpy_5.0.0.jar -t pgsql.properties  -db mydbname -u greg -s public -host localht -p xxx -o output

    it then took some minutes to complete its job but wow the result is very fine.

    Now, as normally possible with -I & -X (or -x)  (I also tried -i) command line switches, I would like to exclude some tables or common columns from the  different outputs/graphics/diagrams, particularly of the global relationships (but also of the relationships generated for each table). ('cause the diagram of the global relationships is 7161x30480 in size !)
    So I entered a command line like this:

    java -jar schemaSpy_5.0.0.jar -t pgsql.properties  -db japan -u greg -s public -host localht -p xxx -o output -I "a_lot_referenced_table"

    but then the process crached with a StackOverflow exception.

    here is the an extract of the loop output when I use loglevel fine:

    10:06:08.950 FIN:     Database.addRemoteTable - Adding remote table public.a_lot_referenced_table
    10:06:08.981 FIN:     Table.<init> - public.a_lot_referenced_table
    10:06:08.991 FIN:     Database.addRemoteTable - Adding remote table public.a_lot_referenced_table
    10:06:09.023 FIN:     Table.<init> - public.a_lot_referenced_table
    10:06:09.034 FIN:     Database.addRemoteTable - Adding remote table public.a_lot_referenced_table
    10:06:09.065 FIN:     Table.<init> - public.a_lot_referenced_table

    and so on up to the StackOverflow and premature exit of the program :

    Exception in thread "main" java.lang.StackOverflowError
    at org.postgresql.jdbc2.AbstractJdbc2Statement.<init>(AbstractJdbc2Statement.java:135)
    at org.postgresql.jdbc3.AbstractJdbc3Statement.<init>(AbstractJdbc3Statement.java:36)
    at org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>(AbstractJdbc3gStatement.java:23)
    at org.postgresql.jdbc4.AbstractJdbc4Statement.<init>(AbstractJdbc4Statement.java:26)
    at org.postgresql.jdbc4.Jdbc4Statement.<init>(Jdbc4Statement.java:25)
    at org.postgresql.jdbc4.Jdbc4Connection.createStatement(Jdbc4Connection.java:30)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.createStatement(AbstractJdbc3Connection.java:231)
    at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.createMetaDataStatement(AbstractJdbc2DatabaseMetaData.java:4370)
    at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getColumns(AbstractJdbc2DatabaseMetaData.java:2537)
    at org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData.getColumns(AbstractJdbc4DatabaseMetaData.java:99)
    at net.sourceforge.schemaspy.model.Table.initColumns(Table.java:281)
    at net.sourceforge.schemaspy.model.Table.<init>(Table.java:88)
    at net.sourceforge.schemaspy.model.RemoteTable.<init>(RemoteTable.java:38)
    at net.sourceforge.schemaspy.model.Database.addRemoteTable(Database.java:741)
    at net.sourceforge.schemaspy.model.Table.addForeignKey(Table.java:199)
    at net.sourceforge.schemaspy.model.RemoteTable.connectForeignKeys(RemoteTable.java:60)
    at net.sourceforge.schemaspy.model.Database.addRemoteTable(Database.java:746)

    imho this looks like the same problem as the ticket http://sourceforge.net/tracker/?func=detail&aid=3101845&group_id=137197&atid=737987  but I'm not a good java user and don't know how I could eventually integrate the proposed patch in that ticket and then run that within the sources.

    Anyone has an idea how I could proceed to successfully exclude some table (or some common columns from all tables) ?



  • Grégory S.
    Grégory S.

    ok I could integrate the patch in my source copy and successfully build it (ant and that's it).. testing this..

  • Grégory S.
    Grégory S.

    That makes it :)

    Shouldn't the patch be integrated into the trunk ?