Skip to content

Regression in 8.4.0; SQLServerResultSet; SQLServerConnection vs SQLServerConnectionPoolProxy  #1401

@christophs78

Description

@christophs78

Driver version

8.4.0

Problem description

Caused by: java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolProxy incompatible with com.microsoft.sqlserver.jdbc.SQLServerConnection
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.configureLobs(SQLServerResultSet.java:2085)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getClob(SQLServerResultSet.java:2825)
at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getClob(WSJdbcResultSet.java:750)
at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1.doExtract(ClobTypeDescriptor.java:44)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)
...

Analysis

54c6748#diff-e5880682be515f702f2a448d2dbcdedf introduced the new method "configureLobs".
configureLobs uses hardcoded SQLServerConnection. But in some usecases (java-applicationserver?) the connection is not an instance of SQLServerConnection but of SQLServerConnectionPoolProxy. --> ClassCastException

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions