Hi
JDBC gurus,
I am facing a very wierd problem - any help appreciated.
Here is the simple code:
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection c = DriverManager.getConnection(connURL, dbUserName, dbPassword);
System.out.println("Connected correctly: ");
}
catch(ClassNotFoundException cnfe)
{
System.out.println("Error loading driver: " + cnfe);
}
The above works fine but when I add this line:
Statement stmt = c.createStatement();
it fails, giving the following error:
java.lang.NullPointerException
at myClasses.DbBean.isLoginValid(DbBean.java:107)
pointing to line which has the Statemnt stmt =...
Any ideas why? I am going crazy here
Thanks!