. Makes changing database easy ;)
Hope this helps,
Jon
-Original Message-
From: Philip Kazmier, CEM RD [mailto:[EMAIL PROTECTED]]
Sent: 08 April 2002 22:55
To: 'Tomcat Users List'
Subject: RE: NullPointerException when using JDBC ResultSet next()
method
I apologize but I posted the wrong code
To: 'Tomcat Users List'
Subject: RE: NullPointerException when using JDBC ResultSet next()
method
I apologize but I posted the wrong code. Here is the correct code. Line 45
is rs.next. I am not sure that the driver has loaded properly. How can I
tell?
Thanks.
import java.io.*;
import
sorry, but you called
ResultSet rset = stmt.executeQuery (select sc_id from bug_status_codes);
and then used
rs.next()
maybe they must be all rs or all rset.
Bye
Giorgio
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list:
Thank you Giorgio! That was it! Boy do I feel stupid.
Thanks again.
-Original Message-
From: Giorgio Ponza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 2:15 AM
To: Tomcat Users List
Subject: Re: NullPointerException when using JDBC ResultSet next()
method
sorry, but you
to the rset but call rs.next().
So rs is null.
-Ursprüngliche Nachricht-
Von: Philip Kazmier, CEM RD [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 8. April 2002 23:55
An: 'Tomcat Users List'
Betreff: RE: NullPointerException when using JDBC ResultSet next()
method
ResultSet rs = null
You sure that your test table has a test column? Change rs.getString
(test) to rs.getString(1) to see if that works...
HTH
Philip
The stack trace says that your NullPointer occurs on line 45, but line
45 is blank. Is there some more code that you didn't ost? Import
statements, perhaps?
I think it probably happened here:
stmt = con.createStatement();
-IE: You were not able to get a Connection, con is null and calling
();
}
catch(SQLException ignored) { }
}
}
};
-Original Message-
From: August Detlefsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 1:19 PM
To: Tomcat Users List
Subject: Re: NullPointerException when using JDBC ResultSet