#142 Gathering schema details... java.lang.NumberFormatException

open
5
2011-12-05
2011-12-05
No

I get this while reading the db schema... Everytime I rerun the schema I get other input string values. Could this be due to a bigint auto_increment value?

Thanks

lieven@T500:~/sspy$ java -jar schemaSpy_5.0.0.jar -t mysql -db asp -u selecter -p pass -o ../sspy/ -norows -host 127.0.0.1:3307 -dp /usr/share/java/mysql-connector-java-5.1.10.jar -loglevel finest
15:28:32.818 INFO: SchemaAnalyzer.analyze - Starting schema analysis
15:28:32.863 CONFIG: ConnectionURLBuilder.<init> - connectionURL: jdbc:mysql://127.0.0.1:3307/asp
15:28:32.864 INFO: SchemaAnalyzer.getConnection - Using database properties:
15:28:32.864 INFO: SchemaAnalyzer.getConnection - [schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql.properties
15:28:33.177 INFO: SchemaAnalyzer.analyze - Connected to MySQL - 5.1.54-community-log
15:28:33.177 INFO: SchemaAnalyzer.analyze - Gathering schema details
java.lang.NumberFormatException: For input string: "2405066107"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at net.sourceforge.schemaspy.model.Database.getBasicTableMeta(Database.java:366)
at net.sourceforge.schemaspy.model.Database.initTables(Database.java:232)
at net.sourceforge.schemaspy.model.Database.<init>(Database.java:71)
at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:211)
at net.sourceforge.schemaspy.Main.main(Main.java:42)

Discussion

  • Lieven  Van Acker

    hmm.. after inspecting the source, it seems like the number of rows is queried from the schema, even if -norows is specified. In this case we have a couple of tables with num_rows > maxint ...

    The numRows should definitly by typed long and if -norows is used, schemaSpy should not try to read table_rows from the information schema...

     
  • Lieven  Van Acker

    Corrected Database.java

     
  • John Currier

    John Currier - 2011-12-18

    It looks like it's probably an issue with the number of rows in that table. Can you try it with -norows and see if that makes it go away?

     
  • Haydn_Huntley

    Haydn_Huntley - 2012-08-08

    Is there a version of SchemaSpy which has this bug fixed?
    I'd love to download it if there is!

    Gathering schema details...java.lang.NumberFormatException: For input string: "3573804367"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:461)
    at java.lang.Integer.parseInt(Integer.java:499)
    at net.sourceforge.schemaspy.model.Database.getBasicTableMeta(Database.java:366)
    at net.sourceforge.schemaspy.model.Database.initTables(Database.java:232)
    at net.sourceforge.schemaspy.model.Database.<init>(Database.java:71)
    at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:211)
    at net.sourceforge.schemaspy.Main.main(Main.java:42)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks