Hi guys, I'm running a program that connects with Microsoft SQL Server 2008. It runs smoothly for some time and then throws an exception - com.microsoft.sqlserver.jdbc.SQLServerException: The TDS protocol stream is not valid. I found that this exception is thrown while I'm freeing the resources. Here is my code to free the resources.
I'm probably using sqljdbc driver version older than 3.0. Also I came to find out probably there is a bug with sqljdbc as it always return error code = 0 when there is connection problem.
What might be the issue with older jar. I tried with sqljdbc jar version 3, it doesn't work and prints out
"Exception occurs in createConnection=Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0."
in my log. So I'm using sqljdbc4 now. It seems to work fine, but will it happen that like old jar it will throw exception after some time like in case of old jar. Please help