File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC version not supported error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
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: 87
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: 1107

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: 87
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: 87
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: 87
Fixed the port thing Now i have a NullpointerException while insertion:

The code is given below:
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18712
    
    8

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