Forum Discussion

maciex88's avatar
10 years ago

SoapUI's Maven plugin strange problem with ojdbc.

Hi, I have faced a problem and I have no idea what's going on, so I decided to ask for help.
I'm using your plugin for Maven, got this in my pom.xml:

<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>4.6.1</version>
...
</plugin>


I also have the ojdbc dependency in pom.xml, like this:

<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>


And I have a test step in groovy, like this:

import java.sql.*;
def path="jdbc:oracle:thin:@xxxxxxxxxxxxx"
def username='xxxxx'
def password='xxxxx'
Connection conn = DriverManager.getConnection(path, username, password) /// Error here.


I have included the same ojdbc6.jar in my SoapUI's project. The same files - in Maven project and in SoapUI.
My question is:
Why am I getting "java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@xxxxxxxxxx" using Maven? When I run it in SoapUI everything is working properly, no errors, no exceptions... Help would be really appreciated!