SiKing
14 years agoCommunity Expert
No suitable driver found for jdbc:sqlserver
Hi all.
I have struggled through this for two days previously. Now I am at another client, and it seems I am destined to repeat the same mistakes.
I am running SoapUI 3.6.1. I tried both the x32 and x64 versions with the exact same results. When it starts up, it reports:
Tried both versions from Microsoft for sqljdbc4.jar.
FYI:
When I execute the following:
I get: "Thu Jun 30 14:18:00 PDT 2011:ERROR:An error occured [No suitable driver found for jdbc:sqlserver://vsqlgmsdb01:1433;databaseName=PatronExtension], see error log for details".
I don't know if the stack trace is helpful to anybody:
After spending a day Googling, I tried all the following with the exact same results:
I have struggled through this for two days previously. Now I am at another client, and it seems I am destined to repeat the same mistakes.
I am running SoapUI 3.6.1. I tried both the x32 and x64 versions with the exact same results. When it starts up, it reports:
Thu Jun 30 14:17:45 PDT 2011:INFO:Adding [C:\Program Files (x86)\eviware\soapUI-3.6.1\bin\ext\sqljdbc4.jar] to extensions classpath
...
Thu Jun 30 14:17:47 PDT 2011:INFO:Used java version: 1.6.0_21
Tried both versions from Microsoft for sqljdbc4.jar.
FYI:
echo %JAVA_HOME%
C:\Program Files (x86)\eviware\soapUI-3.6.1\jre
When I execute the following:
import groovy.sql.Sql
def sqlInstance = Sql.newInstance(
"jdbc:microsoft:sqlserver://vsqlgmsdb01:1433;databaseName=PatronExtension;",
"user",
"password",
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
)
I get: "Thu Jun 30 14:18:00 PDT 2011:ERROR:An error occured [No suitable driver found for jdbc:sqlserver://vsqlgmsdb01:1433;databaseName=PatronExtension], see error log for details".
I don't know if the stack trace is helpful to anybody:
Thu Jun 30 15:04:34 PDT 2011:ERROR:java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://vsqlgmsdb01;databaseName=PatronExtension;
java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://vsqlgmsdb01;databaseName=PatronExtension;
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at groovy.sql.Sql.newInstance(Sql.java:273)
at groovy.sql.Sql$newInstance.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)
at Script4.run(Script4.groovy:3)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
After spending a day Googling, I tried all the following with the exact same results:
- jdbc:sqlserver: instead of jdbc:microsoft:sqlserver:
- not including the driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
- removing the default port 1433
- server IP instead of hostname
- sqljdbc.jar instead of sqljdbc4.jar, and both of them
What did I do wrong?
TIA for any advice.
- The secret "make this work switch" is:
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver")
briefly mentioned here: http://www.soapui.org/Scripting-Propert ... ovy-script