cannot set date field to null
I am trying to set an Oracle date column to NULL. I tried using both PreparedStatement and Statement (SQL query), and it seems to hang right after the executeUpdate() call. I have autocommit enabled and the connection is open. When executing the SQL manually, the date column is correctly set to NULL. I would appreciate any insight as to what else may be causing it to hang?
Here is the code snippet:
PreparedStatement pstmt = conn.prepareStatement(
"update foo_table set date_column = ? "
+ " where foo_id = ?"
);
pstmt.setNull(1, java.sql.Types.DATE);
//pstmt.setDate(1, null);// doesn't work
pstmt.setInt(2, (Integer.valueOf(foo_id_val)).intValue() );
int rowcount = pstmt.executeUpdate();<- it hangs here

