Forum Discussion
See if the below link helps:
http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php
By the way, if you see the log (2nd snippet), there is mongodb class name in the registered dirvers, hence the error.
nmrao This link is somewhat helpful. I already used all info from that lil to setup driver, but it still doesn't work as JDBC test step.
In logs snippet last record is saying registering 5 JBDC drivers from extension library and then a list of drivers, but there is no Mongo driver in this list. That's why I assumed that this is driver issue.
Here is how I setup my DB connection and test step:
Server is up and running because I can connect to it with standalone app with the same settings.
Also I've created a script test step where I import this library and create a DB connection and can fetch the data, but for the convenience I need to setup it as JDBC test step. (Script stopped working since my last run, just nothing happens SoapUI freezes only force quite and restart helps - but this is separate issue.)
First of all should I use mongo-java-driver:
<groupId>org.mongodb</groupId> <artifactId>mongo-java-driver</artifactId> <version>3.5.0</version>?
or
mongoldb-driver:
<groupId>org.mongodb</groupId> <artifactId>mongodb-driver</artifactId> <version>3.5.0</version>?
or both?
Script was working with Java Driver.
Here is the script contents:
And thanks for helping me out with this nmrao appreciate it.
- nmrao7 years agoChampion Level 3While using data base connection thru Groovy Script, the driver class has to be registered explicity.
User below statement as sample to register mysql; so change it to mongodb for your case.
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "com.mysql.jdbc.Driver" )- IvanB7 years agoOccasional Contributor
Thanks nmrao , but what about registering db connection and creating db connection step with that connection? Am I doing something wrong in there?
- nmrao7 years agoChampion Level 3Not quite clear what you are asking.
Have you tried the comment from previous reply? what was the outcome?
Related Content
- 8 years agoLavalyte