Reputation: 77
After updating maven plugin to version 5.1.2 I get an error message
$ERROR [SoapUI] An error occurred [No suitable driver found for jdbc:oracle:thin:@//174.23.0.187:1111/qwe], see error log for details
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//174.23.0.187:1111/qwe
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at groovy.sql.Sql.newInstance(Sql.java:398)
at groovy.sql.Sql.newInstance(Sql.java:442)
at groovy.sql.Sql$newInstance.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
...
Upvotes: 1
Views: 2498
Reputation: 77
register JDBC driver solved the issue
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "oracle.jdbc.OracleDriver" )
Upvotes: 2
Reputation: 10329
In case you do not want to use the password locked Oracle repo, you can do the following:
Download the O-JDBC from Oracle.
Place it in your project. Somewhere like a lib
directory.
Use the maven-install-plugin
to install the jar in your local repo. Something like this:
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>install-ojdbc7</id>
<phase>pre-integration-test</phase>
<configuration>
<file>lib/ojdbc7.jar</file>
<repositoryLayout>default</repositoryLayout>
<groupId>oracle.jdbc</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
The details of how this works are discussed little further here.
For your SoapUI, you will then need to link in the dependency:
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>${soapui-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>oracle.jdbc</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
...
</configuration>
</execution>
</executions>
</plugin>
I am using mvn verify
to run all this.
Upvotes: 1
Reputation: 18517
You need to include oracle jdbc driver to your classpath, which you can download from here
Since you've a maven project the most normal thing to do was to simply include the dependency in your pom.xml
, however due to the oracle jdbc licence there is no public repository with this jar, however recently (a few days ago) oracle adds this jar to their repository. You can try with it following the details on oracle blog (note that user auth is required and maven version 3.2.5 o higher).
Upvotes: 1