suresh
suresh

Reputation: 1013

sqljdbc4.0 to mssql-jdbc 6.2.1.jre7 migration

My application uses SQLServerConnectionPoolDataSource.

Sporadically I get a connection closed since I am using a sqljdbc4.0.

According to this https://blogs.msdn.microsoft.com/dataaccesstechnologies/2016/11/30/intermittent-jdbc-connectivity-issue-the-driver-could-not-establish-a-secure-connection-to-sql-server-by-using-secure-sockets-layer-ssl-encryption-error-sql-server-returned-an-incomplete-respons/

this problem can be resolved if we upgrade the driver. I am trying to put 6.2 version for jre7. I could not find the SQLServerConnectionPoolDataSource class. Is there any update to the class name or am I referring to a wrong jar.

    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>6.2.1.jre7</version>
    </dependency>

Many thanks!

Upvotes: 0

Views: 2001

Answers (1)

Jose Martinez
Jose Martinez

Reputation: 12022

I went to this page and downloaded the JAR. I opened the JAR using 7Zip and was able to find the class SQLServerConnectionPoolDataSource. Furthermore I added the following Maven depndency (which looks the same as yours) and my IDE recognized the SQLServerConnectionPoolDataSource class and I was able to use it and compile.

    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>6.2.1.jre7</version>
    </dependency>

After adding the dependency to your POM, try running the Maven command dependency:resolve. Maybe this will lead to your IDE recognizing the class.

Upvotes: 2

Related Questions