Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection gets closed because the "variant" data type is not supported #91

Closed
schemacrawler opened this issue Dec 23, 2016 · 4 comments
Assignees
Projects

Comments

@schemacrawler
Copy link

schemacrawler commented Dec 23, 2016

When I execute SELECT * FROM INFORMATION_SCHEMA.SEQUENCES, the connection gets closed, with an exception indicating that the "variant" data type is not supported. Consider throwing SQLServerException with a state other than com.microsoft.sqlserver.jdbc.SQLServerException.EXCEPTION_XOPEN_CONNECTION_FAILURE, and not closing the database connection.

Please let me know if you need more information.

@schemacrawler
Copy link
Author

Partial stack trace:

com.microsoft.sqlserver.jdbc.SQLServerException: The "variant" data type is not supported.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:206)
	at com.microsoft.sqlserver.jdbc.TypeInfo$Builder$16.apply(dtv.java:3198)
	at com.microsoft.sqlserver.jdbc.TypeInfo$Builder.build(dtv.java:3360)
	at com.microsoft.sqlserver.jdbc.TypeInfo.getInstance(dtv.java:3426)
	at com.microsoft.sqlserver.jdbc.StreamColumns.setFromTDS(StreamColumns.java:217)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet$1CursorInitializer.onColMetaData(SQLServerResultSet.java:240)
	at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:99)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.<init>(SQLServerResultSet.java:335)
	at com.microsoft.sqlserver.jdbc.SQLServerResultSet42.<init>(SQLServerResultSet42.java:35)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1684)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:903)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:796)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7535)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2438)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:208)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:183)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:769)
	at ...

@Suraiya-Hameed Suraiya-Hameed self-assigned this Dec 28, 2016
@Suraiya-Hameed Suraiya-Hameed added the Under Review Used for pull requests under review label Dec 28, 2016
@Suraiya-Hameed
Copy link
Contributor

Thanks @sualeh! We are looking into this issue. If the driver is to leave the connection open after throwing appropriate exception, it should discard the TDS packet/packets from the response, we are looking for an effective way to do that. Do let us know if you have any suggestions for that.

@v-nisidh v-nisidh added under development and removed Under Review Used for pull requests under review labels Jan 5, 2017
@Suraiya-Hameed
Copy link
Contributor

Here is the PR with fix for connection close issue. Please use it for testing and update us. Thanks!

@v-nisidh
Copy link
Contributor

Fixed in 6.1.2

beikov referenced this issue in hibernate/hibernate-orm Oct 10, 2018
@lilgreenbird lilgreenbird added this to Closed Issues in MSSQL JDBC Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
MSSQL JDBC
  
Closed Issues
Development

No branches or pull requests

3 participants