This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC version not supported error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "JDBC version not supported error" Watch "JDBC version not supported error" New topic
Author

JDBC version not supported error

achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 31
i installed JDBC sql server driver 4.0 and configured it for netbeans 6.9 and i got an error saying this version is not supported for jdk 1.6. I went for jdbc 3.0 and i got the same error which is


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.

I just used the sqljdbc4.jar file in the libraries folder and still got the same error.

Help!
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1098

Where did you get the jar from, as it sounds to me like it is a very old jar that was written for a jdk version 1.5 or below.
achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 31
I have tried jdbc for sql server version 4.0

I havent found a method that works for this.
achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 31
I fixed it but i get a new error

SQLException caught: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

I am using sql server 2008 under windows authentication and my connection string is :

jdbc:sqlserver://localhost:1433;databaseName=sampledb;integratedSecurity=true

achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 31
Fixed the port thing Now i have a NullpointerException while insertion:

The code is given below:
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Then your first step is to find out what line of code threw the exception. Check the stack trace, it tells you exactly that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC version not supported error
 
Similar Threads
Jdbc driver not found when putting an application in a jar-file
Cannot Connect To MS-SqlServer 2008 R2
com.microsoft.sqlserver.jdbc.SQLServerException: The TDS protocol stream is not valid.
exception while running my first jdbc code
No suitable driver found for JDBC