@@ -132,7 +132,7 @@ protected X doExtract(ResultSet rs, int position, WrapperOptions options) throws
132
132
// supposed to be supported in JDBC 4.2
133
133
return javaType .wrap ( rs .getObject ( position , OffsetDateTime .class ), options );
134
134
}
135
- catch (SQLException |AbstractMethodError e ) {
135
+ catch (SQLException |AbstractMethodError | ClassCastException e ) {
136
136
// fall back to treating it as a JDBC Timestamp
137
137
return options .getJdbcTimeZone () != null ?
138
138
javaType .wrap ( rs .getTimestamp ( position , Calendar .getInstance ( options .getJdbcTimeZone () ) ), options ) :
@@ -146,7 +146,7 @@ protected X doExtract(CallableStatement statement, int position, WrapperOptions
146
146
// supposed to be supported in JDBC 4.2
147
147
return javaType .wrap ( statement .getObject ( position , OffsetDateTime .class ), options );
148
148
}
149
- catch (SQLException |AbstractMethodError e ) {
149
+ catch (SQLException |AbstractMethodError | ClassCastException e ) {
150
150
// fall back to treating it as a JDBC Timestamp
151
151
return options .getJdbcTimeZone () != null ?
152
152
javaType .wrap ( statement .getTimestamp ( position , Calendar .getInstance ( options .getJdbcTimeZone () ) ), options ) :
@@ -160,7 +160,7 @@ protected X doExtract(CallableStatement statement, String name, WrapperOptions o
160
160
// supposed to be supported in JDBC 4.2
161
161
return javaType .wrap ( statement .getObject ( name , OffsetDateTime .class ), options );
162
162
}
163
- catch (SQLException |AbstractMethodError e ) {
163
+ catch (SQLException |AbstractMethodError | ClassCastException e ) {
164
164
// fall back to treating it as a JDBC Timestamp
165
165
return options .getJdbcTimeZone () != null ?
166
166
javaType .wrap ( statement .getTimestamp ( name , Calendar .getInstance ( options .getJdbcTimeZone () ) ), options ) :
0 commit comments