Closed
Description
I have a bit of a problem running utPLSQL-maven-plugin. If I simply add the plugin
<plugin>
<groupId>org.utplsql</groupId>
<artifactId>utplsql-maven-plugin</artifactId>
<version>3.1.0-SNAPSHOT</version>
<configuration>
...
</configuration>
</plugin>
Then I get following error:
Caused by: java.lang.ClassNotFoundException: oracle.sql.ORAData
This makes me think I need to add oracle jdbc driver onto classpath of the plugin. So I added the dependencies:
<plugin>
<groupId>org.utplsql</groupId>
<artifactId>utplsql-maven-plugin</artifactId>
<version>3.1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>orai18n</artifactId>
<version>12.2.0.1</version>
</dependency>
</dependencies>
That helps a bit, but the test run still fails with
Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin: ...
I can't find where in the code (plugin or java-api) do you register the oracle driver class. I can see that in cli project there is Class.forName(), but nothing like it in plugin nor java-api.
What is the right way to register the driver then?