Calling
GregorianCalendar gc = new GregorianCalendar();
test_outlook = rs.getDate(25, gc);
Returns
java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1032)
at de.simplicit.vjdbc.serial.StreamingResultSet.getDate(StreamingResultSet.java:1287)
Where rs is a ResultSet of a select query.
I've also seen this error
java.sql.SQLException: Can't convert type to Date: class java.lang.String
at de.simplicit.vjdbc.serial.StreamingResultSet.getDate(StreamingResultSet.java:618)
at de.simplicit.vjdbc.serial.StreamingResultSet.getDate(StreamingResultSet.java:1287)
The data itself looks OK but it may be NULL (which should be OK)
In public Date getDate(int columnIndex, Calendar cal) throws SQLException {
the call to
cal.setTime(getDate(columnIndex));
is incorrect as getDate will also decrement columnIndex. I think the correct statement should read
cal.setTime(getDate(columnIndex + 1));
Note that while my fix should stop the exceptions from being thrown, I don't think simply using a java.util.calendar in this way really does the conversion needed between timezones.