All Things Techie With Huge, Unstructured, Intuitive Leaps
Showing posts with label Unable to connect due to sql exception. Show all posts
Showing posts with label Unable to connect due to sql exception. Show all posts

OK, so I am working on and transferring files between my local machine and a production server.  I move the files from the prod server to check them out on my machine.  They are classes that connect to a MySQL database.  I fire everything up and the console fills with all sorts of exceptions, dolphin crap and such.  Here are the error messages in the console:

Unable to connect due to sql exception
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: "null"'.
Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: "null"'.
Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: "null"'.

 So first I check to see if I can ping the database. I can. The database tool works fine. As it turns out, I still had the database credentials pointing the ones in the production server. On my dev machine, they are a lot simpler.

It wasn't connecting to the database, but it wasn't exactly explicitly telling me that.

Hope this helps someone.