Forum Discussion

cloudstrife's avatar
14 years ago

TestRunner could not found JDBC class

I built the test case with JDBC connection and it works well when I using SoapUI GUI for testing. But if I changed to command line by using TestRunner, it always throw exception such like:
09:39:03,718 INFO [SoapUITestCaseRunner] running step [Setup]
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
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)

It seems test runner could not found sqljdbc4.jar, but I already put the jar wherever SoapUI may access, JDK folder, SoapUI lib folder, etc. But it still not work. Then I checked the bat file between SoapUI.bat and TestRunner.bat but found no difference of the environment settings.

You guys who met the problem before, pls kindly give me a hand of it.

Thx for all of you!!

3 Replies

  • sunxiucui's avatar
    sunxiucui
    New Contributor
    Hi, do you find the solutions? I met the similar problems and can not find a way to resolve it.
  • r3nrut's avatar
    r3nrut
    Occasional Contributor
    I've run into this issue today when trying to invoke testrunner using suites that require a JDBC driver. My test cases run fine when running using the soapUI interface but fail using testrunner.

    I can tell that the sqljdbc4.jar has been added to the extensions classpath so I'm not understanding the message that is returned.

    INFO [SoapUI] Adding [\SmartBear\soapUI-Pro\bin\ext\sqljdbc4.jar] to extensions classpath

    16:25:33,143 ERROR [SoapUI] An error occured [No suitable driver], see error log for details
    --> java.lang.ClassNotFoundException: com.microsoft.sqlserer.jdbc.SQLServerDriver

    I know for a fact that the driver is correct and has worked a thousand times before. Is this a bug in the testrunner code?

    I've also read that you have to provide the fully qualified path to testrunner.bat which I have also done and I'm still experiencing this issue.

    halp!