Forum Discussion

dtoceva's avatar
dtoceva
New Contributor
14 years ago

JDBC connection problems (to mssql server)

Hi all,
I have searched through the forums for similar issues and I have gone through all supposed solutions but no resolution yet.

I am using the trial version of Soap UI Pro and I'm trying to connect to MsSQL server via JDBC (tried both Datasource and Groovy script) and they both complain about not finding a suitable driver when I have copied the jar file in soapui/bin/ext (and jre/lib/ext and also in soapui/lib).

This is the driver and string I'm using:
com.microsoft.jdbc.sqlserver.SQLServerDriver
jdbc:microsoft:sqlserver://SQLDEV:1433;databaseName=MyDB?user=USER&password=PASSWORD

I am receiving that error:
Thu Nov 08 15:42:45 EET 2012:ERROR:com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.microsoft.jdbc.sqlserver.SQLServerDriver], connectionString [jdbc:microsoft:sqlserver://SQLDEV:1433;databaseName=MyDB?user=USER&password=PASSWORD]
com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.microsoft.jdbc.sqlserver.SQLServerDriver], connectionString [jdbc:microsoft:sqlserver://SQLDEV:1433;databaseName=MyDB?user=USER&password=PASSWORD
at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:64)
at com.eviware.soapui.impl.wsdl.support.connections.DefaultDatabaseConnectionContainer.testDatabaseConnection(SourceFile:271)
at com.eviware.soapui.impl.wsdl.teststeps.datasource.JdbcDataSource$TestConnectionAction.actionPerformed(SourceFile:283)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

I have tried the same using the free version of Soap ui, but the same error is returned.

I would appreciate any advice.

Thanks,
Diliana

1 Reply

  • dtoceva's avatar
    dtoceva
    New Contributor
    Hi,

    I have managed to solve the problem, seems to be because in the soapUI-Pro-4.5.1\bin\ext folder I have puth both sqljdbc.jar and sqljdbc4.jar and when running suap ui seems that it has been using the older version of the driver - sqljdbc.jar, but I have installed the latest Java SE Development Kit 7, and it has been returning exception related to that. So once I have deleted sqljdbc.jar the problem was solved.
    I have managed to resolve that problem by using SQuirrel SQL client.

    Dilyana