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

java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamError #20

Closed
mohsen opened this issue Nov 23, 2016 · 5 comments
Closed

Comments

@mohsen
Copy link

mohsen commented Nov 23, 2016

Using sqljdbc42.jar from package sqljdbc_6.0.7728.100_enu.tar, I'm getting the following exception from time to time:
config:
Linux CentOS 7 - 3.10.0-327.18.2.el7.x86_64
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)
Using HikariCP connection pool which wraps com.microsoft.sqlserver.jdbc.SQLServerDataSource

java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/StreamError
        at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onError(tdsparser.java:194)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:71)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1630)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:426)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:372)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284)
@v-nisidh
Copy link
Contributor

v-nisidh commented Nov 23, 2016

Interesting @mohsen !!!

Although we are not supporting OpenJDK at this moment. We like to have some more information which might helps us in future.

  1. Did you download this package from our download center ?
  2. Is Exception always coming or occurs in some specific scenario? Did you check without connection pool just using just plain jdbc?
  3. Can you provide small unit test case?
  4. Which OpenJDK version 1.6 / 1.7 / 1.8 you are using?

We support Sun/Oracle JDK / JRE versions. You can see System Requirements on MSDN website.

@mohsen
Copy link
Author

mohsen commented Nov 23, 2016

  1. Yes.
  2. Actually it's not always thrown. It's not yet clear when it happens, but it happens a lot (in a roughly high traffic web application)
  3. Unfortunately not yet, because I cannot reproduce it manually. Let me investigate more.
  4. The latest Open JDK 1.8.0_111-b15.

I should also give Oracle JRE a try.

BTW is there any explicit version number for sqljdbc42? I've used an older version of sqljdbc42 jar file which was 653574 bytes (again downloaded over a year ago from official download center) for some time without any problem. But I cannot find a proper versionig of it to report here. The one I now use is 891084 bytes.

Oracle's JDBC driver for example remains a known number for years, but the build number is specified in MANIFEST.MF.

@v-nisidh
Copy link
Contributor

@mohsen

Version you mentioned is latest one from MSDN Download Center.

Download Package (tarball / zip) name itself indicates version.
Also one can check version with following code too.

con.getMetaData().getDriverMajorVersion()

Further one can download it from maven repo too.

In our next public release we are going to add build number in MANIFEST.MF which is standard practice in Java World.

We are working towards Semantic Versioning in order to avoid version confusions.

Meanwhile it's worth to watch our dev branch for further updates.

@v-nisidh
Copy link
Contributor

@mohsen : Did you able to find out way to reproduce it by unit test case ?

@ajlam
Copy link
Member

ajlam commented Mar 27, 2017

@mohsen - we haven't heard from you in a bit. Closing this issue for now. Please feel free to reopen if required.

@ajlam ajlam closed this as completed Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants