[Solved] [JDBC] Cannot connect to a MS SQL database
Hello. I'm having issues connecting to a MS SQL database with JDBC. I went to the JDBC drivers page and saw that there isn't a download link for MS SQL driver. So I went to the Microsoft website and downloaded the Microsoft JDBC Drivers 6.0, 4.2, 4.1, and 4.0 for SQL Server. I extracted the file and added both sqljdbc.jar and sqljdbc4.jar (individually) but whenever I try to test the connection I get the following error message: com.eviware.soapui.support.SoapUIException: Failed to init connection for driver [com.microsoft.sqlserver.jdbc.SQLServerDriver], connectionString [jdbc:microsoft:sqlserver://HOSTNAME\SQLExpress:3306;databaseName=MYDB;user=USER&password=PASS] I checked the SoapUI log and the drivers are being loaded. For example: Mon Dec 05 08:08:21 PST 2016:INFO:Adding [C:\Program Files\SoapUI-5.2.1\bin\ext\sqljdbc.jar] to extensions classpath According to the error log, it seems that the driver loaded isn't the correct one: Mon Dec 05 08:35:48 PST 2016:ERROR:java.sql.SQLException: No suitable driver Obviously I'm doing something wrong here. Can someone help to me to understand where I'm making the mistake? If it helps, the db connection works (checked with MS SQL Server Manager) and I was able to connect to a MySQL db using SoapUI (different db though). Thanks for reading and I appreciate any advice you may have!Solved24KViews0likes20CommentsIO Error: Unknown host specified in TestRunner Execution
Hello, We have some Test Steps that make use of JDBC connections in SoapUI. For our Oracle database we use a tnsnames.ora file to manage the hosts and connections. I did have some initial problems getting that to work with SoapUI. But finally got it after updating some things in the vmoptions fileand moving the odbc driver into<Install Directory>\SmartBear\ReadyAPI-1.6.0\bin\ext. It works fine now. However, I noticed when we try to run the tests from the cmd line or Test Runner they fail. How can I configure SoapUI to know that the hosts are there? Just making a simple connection step and running a query here. Sample from the error log: 09:35:58,004 ERROR [SoapUI] An error occurred [IO Error: Unknown host specified ], see error log for details 09:35:58,005 ERROR [errorlog] java.sql.SQLRecoverableException: IO Error: Unknown host specified java.sql.SQLRecoverableException: IO Error: Unknown host specified at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:517) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:557) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:233) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:556) at com.eviware.soapui.support.GroovyUtils$DriverProxy.connect(GroovyUtils.java:150) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:67) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.getDatabaseConnection(JdbcSubmit.java:188) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.prepare(JdbcSubmit.java:214) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.runQuery(JdbcSubmit.java:171) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.run(JdbcSubmit.java:145) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.<init>(JdbcSubmit.java:77) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcRequest.submit(JdbcRequest.java:133) at com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep.run(JdbcRequestTestStep.java:203) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:251) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:50) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:161) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:127) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:73) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:673) at com.eviware.soapui.impl.wsdl.WsdlTestCasePro.run(WsdlTestCasePro.java:96) at com.eviware.soapui.impl.wsdl.WsdlTestCasePro.run(WsdlTestCasePro.java:85) at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:633) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runTestCase(SoapUIProTestCaseRunner.java:237) at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:430) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:98) at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:257) at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:160) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:82) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:78) Caused by: oracle.net.ns.NetException: Unknown host specified at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:188) at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:130) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:413) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:882) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:267) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1625) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:365)Solved18KViews0likes10CommentsReadyAPI 2.7 Failed to Register the JDBC driver
Hi, I recently updated ReadyAPI from 2.6 to 2.7 but now all my test steps that have custom code to connect to a database via JDBC i get the following errors: Mon May 06 10:32:49 MDT 2019: ERROR: Failed to register the JDBC driver [oracle.jdbc.driver.OracleDriver]. Mon May 06 10:32:49 MDT 2019: ERROR: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.eviware.soapui.support.GroovyUtils.registerJdbcDriver(GroovyUtils.java:110) at com.eviware.soapui.support.GroovyUtils$registerJdbcDriver.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Script1.run(Script1.groovy:2) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:158) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:261) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStepByName(AbstractTestCaseRunner.java:240) at com.eviware.soapui.model.testsuite.TestCaseRunner$runTestStepByName$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Script1.run(Script1.groovy:8) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:158) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:261) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:171) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Does anyone have a solution? Thanks NathonSolved2.8KViews0likes2CommentsHow can i connect oracle SQL developer connection without entering "sid".
Please find the attached screenshot as well for reference. The problem i am facing is ..while connecting Oracle sqldeveloper I am entering service name and keeping the 'SID' field blank(which is not mandatory field in the tool). But in ReadyAPI(Please find the attached screenshot) sid is a mandatory field, i can not keep it blank while connecting. Hence i am getting error "Can't get the Connection for specified properties; java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection"2.7KViews0likes2CommentsJDBC connectivity to SQL Azure using SoapUI Basic.
Hi , This is regarding JDBC connectivity to SQL Azure using SoapUI Basic. I was referring to Azure site to get the relevant driver and connection string. (https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-java-simple-windows/) . I downloaded SQLJDBC driver (version4.2) and added its jar to ext folder of SoapUI . For my SoapUI project i added a JDBC step with driver (com.microsoft.sqlserver.jdbc.SQLServerDriver) and connection string (jdbc:sqlserver://<myServer>.database.windows.net:1433;database=<mydatabase>;user=<myusername>;password=<mypassword>;encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30; ). My machine's port 1433 is open to make such communication. I am able to make connection through my eclipse editor using same string but this is not working through my SoapUI JDBC step or script step . I am neither able to see any error or logs for this , neither able to track any such TCP message sent through my machine. Can you please suggest if I am missing out anything here. Thanks, ArunSolved2.6KViews0likes1CommentCannot Connect to Oracle RDB Database
I'm trying to connect to an Oracle RDB Database which is not one of the listed databases. I have the driver for it and put it in the bin/ext folder. After trying to fill out the information in JDBC Drivers PropertiesI tried a number of ways to connect to it but with no luck. I'm looking for guidance as this is the first time I've tried to connect to a database type that wasn't listed as one of the defaults. Is there a specific way I need to enter the Driver name on the JDBC Drivers Properties page? I tried just using the name, the file name, the exact file path, but none worked. Currently this is the error I'm getting no matter what I try. Any help would be appreciated.Solved2.6KViews0likes3CommentsUnable to transfer data from a data source into SQL query
I'm trying totransfer data from a data source to be used in a where statement of a SQL query. Essentially my script does the following: Holds “ID” numbers in a grid data source Executes a SOAP request and one of the fields uses the “ID” numbers from the grid data source ${DataSource#IDNumber} (have looped this at the end of the test case to go back and use the next ID number and run again) Uses a Microsoft SQL Server driver to connect to a DB and run a Select SQL query on one of the tables and compare this against some of the data in the SOAP request I can do this for one “ID” number if I write it as where = '123' however I want to be able to use the ID number that was used in the test case for that loop i.e ${DataSource#IDNumber}. I have tried it writing the below but it doesn’t work can someone help please? Select * From OpsControl.Piece Where OpsControl.Piece.TrackingNumber = 'DataSource#IDNumber' Many thanks Chris Hi,2.1KViews0likes4CommentsJDBC like statement
Hi community, I've been struggling with this issue for some time now but I found some workarounds, but now I need it and can't really find a good answer for me. I need to use in a jDBC query the 'like' statement and with all combos I could think of or find I always end up in an error. So select * from frc where service like 'CLI%' works out fine, the problem might be that I use aproperty in this query so it'sselect * from frc where service like :ser%(I've tried * and ? , and even '%') any ideas or hints ? Thnx in advance1.9KViews0likes7Comments