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

NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamInfo #2418

Closed
JDBC-0 opened this issue May 17, 2024 · 4 comments
Closed

NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamInfo #2418

JDBC-0 opened this issue May 17, 2024 · 4 comments
Assignees

Comments

@JDBC-0
Copy link

JDBC-0 commented May 17, 2024

Driver version

12.6.1

SQL Server version

Microsoft SQL Server 2019 (RTM-CU25-GDR) (KB5036335) - 15.0.4360.2 (X64) Mar 19 2024 00:23:01 Copyright (C) 2019 Microsoft Corporation Enterprise Evaluation Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: )

Client Operating System

Windows Server 2019 Standard

JAVA/JVM version

17.0.8.1 LTS

Problem description

After Updating from driver version from 12.2.0 to 12.6.1, some SQL queries throw NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamInfo. Inspecting the JARs of the driver versions, this StreamInfo class exists in 12.2.0 but not on 12.6.1 anymore!

Expected behavior

No change of classes or at least description in driver release notes about this change and how to replace old behaviour.

Actual behavior

See error message below.

Error message/stack trace

Unexpected error: java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamInfo
java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamInfo
at com.microsoft.sqlserver.jdbc.SQLServerStatement$1NextResult.onInfo(SQLServerStatement.java:1636)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:109)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1691)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1124)

@David-Engel
Copy link
Collaborator

Are you sure you were running 12.6.1? Your line numbers don't line up with code from any release tags.

StreamInfo appears to be in 12.6.1 but has been deleted in PR #2251, which would only put it in 12.7.0. But again, your stack's line numbers don't align with the code from that tag, either.
https://github.com/microsoft/mssql-jdbc/blob/v12.7.0/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerStatement.java#L1636

Are you running a jar you've built yourself?

@Jeffery-Wasty Jeffery-Wasty self-assigned this May 17, 2024
@Jeffery-Wasty
Copy link
Contributor

Hi @JDBC-0,

We'll be closing this issue in a few days if there is no further reply.

@JDBC-0
Copy link
Author

JDBC-0 commented May 27, 2024

It was 12.6.1 .... we reinstalled the driver and then the error didn't occured anymore. Probably corrupt JAR file.
If 12.7.0 will remove StreamInfo, will this be binary compatible or an incompatible change?

@David-Engel
Copy link
Collaborator

StreamInfo wasn't a public class, so it should remain compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed Issues
Development

No branches or pull requests

3 participants