List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:June 10 1999 6:35pm
Subject:Re: jdbc question
View as plain text  
Steve Ruby wrote:
> Anybody have experience with the jdbc driver
> I know I posted on this earlier but i have my question
> narrorwed down
> If I run these lines as is I get a NullPointerException when
> I try to create a Statement
> Class.forName("");
> con =
> DriverManager.getConnection("jdbc:mysql://");
> //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> //con = DriverManager.getConnection("jdbc:odbc:AMR2","admin","");
> If I switch the comments so I am running on the jdbc-odbc bridge
> then it works fine (the rest of the app being the same) I read the
> docs on the driver and I think I am using it correctly,
> I have tried several variations on the connection string with nosuccess
> the ODBC Datasource AMR2 is just a MyODBC pointer to the
> AMR database, both work fine in other context I've used them
> in, I just can't get jdbc to work, I've also tried the twz1
> driver with similar results
> I am using jdbc driver version 1.2a
> Suggestions?
> thanks
> Steve

Hi Steve

There is a known bug (especially in applets/servlets).
Due to a race condition sometimes the JDBC diver doesn't register itself, if you just use
Because of this use:
DriverManager.registerDriver( new );


jdbc questionSteve Ruby10 Jun
  • Re: jdbc questionChristian Mack10 Jun
  • Re: jdbc questionBenjamin Grosman11 Jun