Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » JDBC Connection to MS SQL Server 2017(Unable to configure JDBC connection to MS SQL Server 2017 via Eclipse 2020-03)
JDBC Connection to MS SQL Server 2017 [message #1827867] Tue, 26 May 2020 02:54 Go to next message
Donald Fisher is currently offline Donald FisherFriend
Messages: 4
Registered: May 2020
Junior Member
I have searched the DTP forum to no avail and am hoping to discover a solution through conversation. I am attempting to connect Eclipse 2020-03 (4.15.0) Build 20200313-1211 to an MS SQL 2017 Server Build 14.0.2027.2 on a local Windows 10 Home machine but having a difficult time at it. From the default Java perspective, I click 'Window | Show View | Other...' and then 'Data Management | Data Source Explorer'. In this view, I click 'New Connection Profile', select "SQL Server", input a Connection Profile Name, and click 'Next'. From there, I click 'New Driver Definition' and find that "Microsoft SQL Server 2017 JDBC Driver is not listed. I then click 'Cancel' to close the "New Driver Definition" window and 'Cancel' again to close the "New Connection Profile" window, thus starting anew. I again click 'New Connection Profile', and this time select "Generic JDBC", input a Connection Profile Name, and click 'Next'. In the resulting "New Connection Profile" window, I input the database name ("sec"), URL ("jdbc:sqlserver://localhost"), and user name and password created in MS SSMS. I then click 'Test Connection' to which an error stating "Ping failed!" is presented with the following details:

java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.sqlserverDriver
	at java.net.URLClassLoader.findClass(URLClassLoader.java:610)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:937)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:882)
	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:1225)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:865)
	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:327)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)
	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:53)
	at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
	at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
	at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
	at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)


I am assuming the error may be due to a missing JDBC reference; however, I am not sure how to remedy it.
Re: JDBC Connection to MS SQL Server 2017 [message #1828061 is a reply to message #1827867] Sun, 31 May 2020 08:47 Go to previous messageGo to next message
Donald Fisher is currently offline Donald FisherFriend
Messages: 4
Registered: May 2020
Junior Member
UPDATE: I believe I was using an incorrect JDBC *.jar file and have since downloaded and referenced what I believe to be the correct version under 'Provide Driver Details'. From the default Java perspective, I click 'Window | Show View | Other...' and then 'Data Management | Data Source Explorer'. In this view, I click 'New Connection Profile', select "SQL Server", input a Connection Profile Name, and click 'Next'. From there, I click 'New Driver Definition' and still find that "Microsoft SQL Server 2017 JDBC Driver is not listed, so I select the first available "Other Driver" (2000), input a Driver Name in the 'Name/Type' tab, add the appropriate *.jar file reference to the 'JAR List' tab (mssql-jdbc-7.4.1.jre8.jar), input the connection URL ("jdbc:sqlserver://localhost"), database name("sec"), driver class ("com.microsoft.sqlserver.jdbc.SQLServerDriver"), password, and user name created in MS SSMS in the 'Properties' tab, and click 'OK'. I then click 'Test Connection' to which an error stating "Ping failed!" is presented with the following details:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: no further information. 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.".
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
	at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:285)
	at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2431)
	at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:656)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2472)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2142)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1993)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1164)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:760)
	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:328)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
	at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
	at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)
	at org.eclipse.datatools.enablement.msft.internal.sqlserver.connection.JDBCSQLServerConnectionFactory.createConnection(JDBCSQLServerConnectionFactory.java:27)
	at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
	at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
	at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
	at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)


The error is different and leads me to believe that the connection may be configured correctly but the server is not responding as expected. The server is in fact running on the local machine and I have double verified that the provided credentials are correct and have the necessary permissions to the server. I have attempted the same with my firewall completely disabled without success.

The JDBC driver I am using is located at the following URL:

https://www.microsoft.com/en-us/download/details.aspx?id=58505
Re: JDBC Connection to MS SQL Server 2017 [message #1828614 is a reply to message #1828061] Mon, 15 June 2020 08:43 Go to previous message
Donald Fisher is currently offline Donald FisherFriend
Messages: 4
Registered: May 2020
Junior Member
I am still so far unsuccessful in creating a connection to MS SQL Server 2017 via Eclipse.
Previous Topic:Eclipse Oracle Connection Fails?
Next Topic:How to add new button
Goto Forum:
  


Current Time: Tue Apr 23 14:34:25 GMT 2024

Powered by FUDForum. Page generated in 0.03016 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top