SourceForge has been redesigned. Learn more.

infinite loop with Database.addRemoteTable

  • Grégory S.

    Grégory S. - 2013-04-24


    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  -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  -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>(
    at org.postgresql.jdbc3.AbstractJdbc3Statement.<init>(
    at org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>(
    at org.postgresql.jdbc4.AbstractJdbc4Statement.<init>(
    at org.postgresql.jdbc4.Jdbc4Statement.<init>(
    at org.postgresql.jdbc4.Jdbc4Connection.createStatement(
    at org.postgresql.jdbc3.AbstractJdbc3Connection.createStatement(
    at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.createMetaDataStatement(
    at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getColumns(
    at org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData.getColumns(
    at net.sourceforge.schemaspy.model.Table.initColumns(
    at net.sourceforge.schemaspy.model.Table.<init>(
    at net.sourceforge.schemaspy.model.RemoteTable.<init>(
    at net.sourceforge.schemaspy.model.Database.addRemoteTable(
    at net.sourceforge.schemaspy.model.Table.addForeignKey(
    at net.sourceforge.schemaspy.model.RemoteTable.connectForeignKeys(
    at net.sourceforge.schemaspy.model.Database.addRemoteTable(

    imho this looks like the same problem as the ticket  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. - 2013-04-24

    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. - 2013-04-24

    That makes it :)

    Shouldn't the patch be integrated into the trunk ?


Log in to post a comment.