Contributions
SoapUI testStep Datasource Failing in LoadUI
I have a working SoapUI test step that loads data from a MS SQL server. This work fine in SoapUI, but when run from LoadUI in a soapUI runner I get the following error: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.eviware.soapui.support.GroovyUtils.registerJdbcDriver(GroovyUtils.java:120) at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:55) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.getDatabaseConnection(SourceFile:416) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.prepare(SourceFile:170) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(SourceFile:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:137) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:735) at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:576) at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:492) at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:58) at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:744) at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197) at java.lang.Thread.run(Unknown Source) java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(Unknown Source) at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:56) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.getDatabaseConnection(SourceFile:416) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.prepare(SourceFile:170) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(SourceFile:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:137) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:735) at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:576) at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:492) at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:58) at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:744) at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197) at java.lang.Thread.run(Unknown Source) com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.microsoft.sqlserver.jdbc.SQLServerDriver], connectionString [jdbc:sqlserver://server:1433;databaseName=NAME;user=Username;password=#####] at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:68) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.getDatabaseConnection(SourceFile:416) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.prepare(SourceFile:170) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(SourceFile:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:137) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:735) at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:576) at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:492) at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:58) at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:744) at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197) at java.lang.Thread.run(Unknown Source) Now after I add the .jar drivers to : C:\Program Files\SmartBear\LoadUI-Pro-2.7.0\ext restart LoadUI, I get the next error: java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.panels.teststeps.support.NamedParameterStatement.<init>(NamedParameterStatement.java:54) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.load(SourceFile:113) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(SourceFile:497) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.run(SourceFile:135) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:735) at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:576) at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:492) at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:58) at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:744) at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197) at java.lang.Thread.run(Unknown Source) I'm I missing more files??? How do I get datasource steps in soapui to run in LoadUI? Next, if I add the .jar drivers to this folder, no more system error, but it is still not working: C:\Program Files\SmartBear\LoadUI-Pro-2.7.0\lib if you go to the log here, there is now a new error that was not displayed in the system errors in LoadUI C:\Users\Myusername\.loadui\logs 2014-08-19 15:01:00,225 INFO [SoapUI] Adding [C:\Program Files\SmartBear\LoadUI-Pro-2.7.0\ext\jtds-1.3.1.jar] to extensions classpath 2014-08-19 15:01:00,226 INFO [SoapUI] Adding [C:\Program Files\SmartBear\LoadUI-Pro-2.7.0\ext\sqljdbc.jar] to extensions classpath 2014-08-19 15:01:00,519 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\Myusername\soapui-settings.xml] 2014-08-19 15:01:00,894 WARN [SoapUIProGroovyScriptEngineFactory] Missing scripts folder [C:\Program Files\SmartBear\SoapUI-Pro-5.0.0\bin\scripts] 2014-08-19 15:01:01,501 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include 2014-08-19 15:01:01,564 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema 2014-08-19 15:01:01,566 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace 2014-08-19 15:01:01,567 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd 2014-08-19 15:01:01,568 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime 2014-08-19 15:01:01,570 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime 2014-08-19 15:01:01,573 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/ 2014-08-19 15:01:01,582 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/ 2014-08-19 15:01:01,586 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope 2014-08-19 15:01:01,595 INFO [SchemaUtils] Added default schema from /com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding 2014-08-19 15:01:10,611 INFO [DefaultSoapUICore] Importing preferences from [C:\Users\SLove\soapui-settings.xml] 2014-08-19 15:01:10,615 INFO [HttpClientSupport$Helper] Updating keyStore.. 2014-08-19 15:01:10,820 INFO [WsdlProject] Loaded project from [file:/C:/AIRES-Test-soapui-project.xml] 2014-08-19 15:01:11,073 WARN [SoapUIProGroovyScriptEngineFactory] Missing scripts folder [C:\Program Files\SmartBear\SoapUI-Pro-5.0.0\bin\scripts] 2014-08-19 15:01:11,881 INFO [DefaultSoapUICore] Importing preferences from [C:\Users\Myusername\soapui-settings.xml] 2014-08-19 15:01:11,883 INFO [HttpClientSupport$Helper] Updating keyStore.. 2014-08-19 15:01:46,554 ERROR [AbstractTestRunner] Exception during Test Execution java.lang.IllegalAccessError: class com.microsoft.sqlserver.jdbc.SQLServerConnection$1DTCCommand cannot access its superclass com.microsoft.sqlserver.jdbc.UninterruptableTDSCommand at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at com.eviware.soapui.support.GroovyUtils$DriverProxy.connect(GroovyUtils.java:175) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:72) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.getDatabaseConnection(SourceFile:416) at com.eviware.soapui.impl.wsdl.teststeps.datasource.DBDataSource.prepare(SourceFile:170) at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.prepare(SourceFile:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:137) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:735) at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:576) at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:492) at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:58) at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:744) at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197) at java.lang.Thread.run(Unknown Source) by this point I am lost... This should be a simple configuration, how do I get it to work? thanks10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.7KViews0likes0CommentsRe: Stored Proc, DYNAMIC SQL returns no rows
Ok. I did some more testing and I am convinced there is a bug with SoapUI. Attached are some screeenshots with some highlighted sections of interest. Basically, I have added the sourceforge JDBC driver to test an alternate from the one included with the install (MS JDBC). Both drivers result in the same dysfunction. File > Preferences > JDBC driver Properties This will add the option of using the sourceforge JDBC driver to SOAPUI datasource steps. When I use this driver, the results are the same as the MS driver. No rows are returned to the datasource step if you call a stored PROC with dynamic SQL. Now if you try a JDBC request, sourceforge driver and call the stored PROC, it does respond... BUT the output xml returns an inaccurate result: <Results> <UpdateCount>24</UpdateCount> </Results> it should return: <Results> <C_S_U_F>10-10-10-10</C_S_U_F> </Results> You can see the response time (screenshot) takes about 7-8 seconds because the PROC is complicated. That is the same execution time it takes in MS Management studio. It also returns 55 bytes, which is about the size of the result is should return. For the last test, I create a Groovy step and programmatically executed the PROC with the sourceforge driver. The result returned in about 8 seconds with the CORRECT data! So to sum this up, Using a groovy step, I can get the data. Using Datasource and JDBC request steps do NOT return data. That has to show there is a bug in these features. I could be convinced otherwise, if someone can demonstrate working a Datasource step with MS SQL dynamic PROC's. We need these features to work in order to effectively use LOADUI PRO and SOAPUI PRO. Please help if someone knows a workaround or a trick to get this to work! Thank you10 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes0CommentsStored Proc, DYNAMIC SQL returns no rows
This is a bit confusing to explain, but here I go. I have an MS SQL Stored PROC that I can run with a dataSource test step. It will return rows if the PROC does NOT have any dynamic SQL embedded in it. So if there is a simple table select, it works fine. If you add dynamic SQL like: --******************************************************* SET @SQL = 'INSERT INTO #FIG (CHAPTER_NO) ( SELECT F.CHAPTER_NO FROM ' + @SchemaName+'.TABLENAME AS F )' EXEC sp_executesql @SQL SELECT CHAPTER_NO FROM #FIG --******************************************************* It returns no rows... This Statement above uses dynamic SQL and temporary tables. It no longer works with default JDBC drivers. viewtopic.php?f=2&t=8198 viewtopic.php?f=4&t=3252&p=11527&hilit=add+driver&sid=9acaa68df72a04ba6e8cd1500bd77886#p11527 viewtopic.php?f=5&t=22836&p=52220&hilit=stored+Procedure&sid=5febd570305662894ef672099b6f26ce#p52220 Why would dynamic SQL affect the JDBC drivers? They should not care what the PROC does, only its response. I have checked the response with other software drivers and it is the same for static and dynamic SQL. Anyone else with this problem? Should I install the net.sourceforge.jtds.jdbc.Driver ? How do i register this drive and get it to show up on the list of available drivers in the SOAPUI application? I am able to call another driver with groovy, but it is not on the SOAPUI dropdown lists... //******************************************************* import groovy.sql.Sql com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "net.sourceforge.jtds.jdbc.Driver") String csuf = ""; def list= [] String pP_Model = testRunner.testCase.testSuite.project.getPropertyValue( "TestModel" ) String pP_SqlServer = testRunner.testCase.testSuite.project.getPropertyValue( "SqlServer" ) String pP_SqlUser = testRunner.testCase.testSuite.project.getPropertyValue( "SqlUser" ) String pP_SqlPwd = testRunner.testCase.testSuite.project.getPropertyValue( "SqlPwd" ) //log.info(pP_Model) //log.info(pP_SqlServer) //log.info(pP_SqlUser) //log.info(pP_SqlPwd) def sql = Sql.newInstance("jdbc:jtds:sqlserver:" + pP_SqlServer, pP_SqlUser, pP_SqlPwd, "net.sourceforge.jtds.jdbc.Driver") def res = sql.eachRow("exec get_available_Figure_for_Model '" + pP_Model + "' ") { log.info( it.toRowResult().values()) csuf = it.toRowResult().values() } //******************************************************* This driver does not seem to have issues with dynamic SQL or is there a bug with the datasource steps? thanks for your help... Stephen Love Software Developer cdgnow.com10 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.2KViews0likes5Comments