6

I am new to SOAPUI and have been trying to do query and procedure testing using SOAPUI. I went through the SOAPUI documentation on net however I am not able to establish an connection to my DB.. I have copied the mysql jar in the lib folder of SOAPUI. The exception I get is

Tue Nov 08 12:54:51 IST 2011:ERROR:com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.mysql.jdbc.Driver], connectionString [jdbc:mysql://DB SERVER IP:PORT/DB NAMES?user=username&password=password]

Can anyone please tell me what is wrong... Here are the steps of what I did in SOAPUI for this JDBC thing:-

> 1.New project.
> 2. Clock on New Project.
> 3.Go to JDBC Connections tab.
> 4. Add a new Data Connection.
> 5. Specified unique name.
> 6. selected driver as mysql:com.jdbc.driver
> 7.I can only see to mention host,port and DB.
> 8.Mentioned Host,Port and DB..
> 9.Tested the Connection.
> 10.Got the above mentioned excpetion...

Please help anyone...

AngelsandDemons
  • 2,823
  • 13
  • 47
  • 70

7 Answers7

14

You could try the following. I had the same problem once and the following was working for me:

  • Download the JAR for MySQL again. In my case it happened that the JAR itself was corrupt.
  • Copy the JAR to %soapUI Folder%\bin\ext
Robert Strauch
  • 12,055
  • 24
  • 120
  • 192
  • I think the second point is important. You have to copy the JAR to %soapUI%/bin/ext and not %soapUI%/lib – Sebi Nov 11 '11 at 13:05
  • Hi this change worked when using the soapui interface. But when i tried integrating it with maven getting the same error again. – rolling stone Jan 31 '17 at 16:07
  • !Important. After you copy the jar make sure you restart ready api – Adrian Oct 04 '21 at 13:44
5

This worked perfectly fine for me!

  1. Download the mySQL connector tar.gz file from here http://dev.mysql.com/downloads/connector/j/5.0.html

  2. Copy it at \SmartBear\SoapUI-Pro-5.0.0\bin\ext path

  3. Extract it and Restart the application
  4. Test the connection again! :)
Sandeep
  • 153
  • 2
  • 4
  • 16
  • the exact folder path for me on my mac OSX 10.11.6: /Applications/SoapUI-5.2.1.app/Contents/Resources/app/bin/ext. I downloaded the .zip file from here: http://dev.mysql.com/downloads/connector/j/5.1.html – nommer Nov 12 '16 at 00:33
2

For me coping mysql jar in lib folder worked <%soapUI%/lib> and not <%soapUI%/bin/ext>

Pratik1990
  • 23
  • 3
  • For me, copying the H2 jar to `lib` worked fine. It didn't work in `ext`. Downloaded from [here](http://www.h2database.com/html/download.html) – Jose Rui Santos Jul 29 '16 at 16:12
2

Driver jar must be in ext folder and you also need to register a driver before actually using it. for example to register postgresql driver use :

com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("org.postgresql.Driver")
kundan bora
  • 3,821
  • 2
  • 20
  • 29
Nayan
  • 316
  • 3
  • 2
1

What worked for me:

Copy the ojdbc6.jar in lib and ext folders.

Juri Noga
  • 4,363
  • 7
  • 38
  • 51
imganeshr
  • 11
  • 3
0

Remember to restart once you have downloaded the driver and included it in the directory.

pranavrao1
  • 1,529
  • 1
  • 12
  • 11
0

check your connections strings. It could be different.Are you trying to add using datasource? or script?

Chanakya
  • 865
  • 2
  • 9
  • 22