windows - tomcat - jdbc - "unable to connect" linux instead of windows is fine
Posted by: Niels
Date: December 29, 2004 05:26PM

I created a small JSP to connect to a mySQL database on another server.
Under Linux (Tomcat 5.5.4) with JDBC 3.0.16 It works fine..I get a sql result.

If I use instead of Linux windows (XP & 2000) I get the following stacktrace:
java.sql.SQLException: Unable to connect to any hosts due to exception: java.lang.NullPointerException
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1622)
at com.mysql.jdbc.Connection.<init>(Connection.java:491)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.jsp.db_002dtest_jsp._jspService(org.apache.jsp.db_002dtest_jsp:64)

All the database connections are fine (it is the same jsp)

I also tried an newer connector (3.1.5) ..without any succes.

Does someone has a clue??
Thanks,
Niels

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.