Menu

#64 NullPointerException w/GNU JDK

open
5
2008-09-26
2008-04-01
Skevin
No

For almost two months now, I've been running SchemaSpy every day to track changes our developers' changes to a backend in production. Suddenly, as of yesterday, I started getting this error:

solomon@epimetheus:~$ java -jar schemaSpy_3.1.1.jar -cp /usr/share/java/mysql-connector-java-5.0.4.jar -t mysql -db vmc -host localhost -u root -o /var/www/html/refactor21/

java.lang.NullPointerException
at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
at net.sourceforge.schemaspy.util.ConnectionURLBuilder.<init>(ConnectionURLBuilder.java:25)
at net.sourceforge.schemaspy.Main.main(Main.java:125)

(Unfortunately, I'm more a DBA that a Java dude - I know all forms of SQL and Python in my sleep, but debugging this is driving me batty.)
I definitely know:
- This is not an authentication problem.
- I've been running this the same way out of my command history for the last two months.
- I've tried re-typing everything manually, which should rule out the possibility that the String Tokenizer is crashing on the arguments I'm passing in.
- I'm mostly sure my Java environment hasn't changed.

Any help would be appreciated. Thanks.

Solomon Chang

Discussion

  • John Currier

    John Currier - 2008-04-01

    Logged In: YES
    user_id=1264584
    Originator: NO

    For some reason it can't resolve connectionSpec in your mysql.properties file, which may be on your file system but is more likely in schemaSpy_3.1.1.jar. SchemaSpy should have blown up before this point if it couldn't find the .properties file at all.

    Is it possible that someone placed an invalid mysql.properties file (or even just mysql) in the directory that you're running SchemaSpy from?

     
  • Skevin

    Skevin - 2008-04-01

    Logged In: YES
    user_id=1072259
    Originator: YES

    Nope, there's no such file as mysql.properties in the directory I was running from.

    However, one of my coworkers just now found a great fix. He switched me from the GNU JDK to Sun's official JDK. I know, I know, the two are supposed to be functionally identical, but apparently Sun's JDK actually works correctly with SchemaSpy.

    I've actually been able to duplicate this problem on another machine with the GNU JDK, so the problem most likely lies with the version of Java that one is saddled down with.

    Thanks for the quick response, though!

    Solomon Chang

     
  • John Currier

    John Currier - 2008-04-01

    Logged In: YES
    user_id=1264584
    Originator: NO

    Does that mean that someone switched you to the GNU JDK without your knowledge and that's what caused the bug?

    I guess I'll need to install the GNU JDK sometime to figure out what it's doing differently than the various other JDKs.

    John

     
  • John Currier

    John Currier - 2008-09-26
    • summary: NullPointerException --> NullPointerException w/GNU JDK
     

Log in to post a comment.