| Bongani Hlope on Thu, 20 Feb 2003 16:38:04 +0200 (SAST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [Linux dev] Re: Java NullPointerException |
Jarrod Hermer wrote: <snip>
ResultSet rs = null;
try { CallableStatement cs = conn.prepareCall("{call GetUserByName(?)}"); cs.setString(1, name); rs = cs.executeQuery(); } catch(SQLException ex) { System.out.println("ERROR getting user"); System.out.println(ex.getMessage()); }
while(rs.next()) { // Do Stuff } rs.close();
------------------------------------------------------------------------ ----
On my development machine it functions without any problems. However on my production machine which I am convinced is identical the program crashes with a Java.NullPointerException error.
<snip>
CallableStatement cs = conn.prepareCall("{call GetUserByName(?)}");
cs.setString(1, name)
--
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former."
-Albert Einstein