Friday, March 9, 2007

The JDBC Driver Switch

Cause

Changed JDBC drivers from
weblogic.jdbc.sqlserver.SQLServerDriver to com.microsoft.jdbc.sqlserver.SQLServerDriver

Fix

stmt.setDate(1, null);
stmt.setNull(1, java.sql.Types.DATE);


Stacktrace

15:34:26,477 INFO [STDOUT] java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]The requested data is not available.15:34:26,477 INFO [STDOUT] at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
15:34:26,477 INFO [STDOUT] at com.microsoft.jdbc.base.BaseData.convert(Unknown Source)
15:34:26,477 INFO [STDOUT] at com.microsoft.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
15:34:26,508 INFO [STDOUT] at com.microsoft.jdbc.base.BasePreparedStatement.setDate(Unknown Source)
15:34:26,508 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setDate(WrappedPreparedStatement.java:312)
15:34:26,508 INFO [STDOUT] at com.firstdata.emp.dao.ContactJDBCDAO.create

1 comment:

Anonymous said...

Interesting to know.