ClassNotFoundException for oracle driver when connecting to external database in jira plugin

I am currently developing a plugin to query a external oracle database. This is a standalone database and is not responsible for any core jira functionalities. The following are the steps I took to establish the connection:

  1. Download the ojdbc8.jar from oracle manually

  2. Execute the mvn install command to use the jar as a maven dependency

  3. Included the jar as a dependency:


4) called atlas-mvn eclipse:eclipse. atlas-mvn clean package, atlas-run in order to set up local instance and get all dependencies

5) This is my connection code: 

   public static Connection getERPOracleConnection() {
	try {
	} catch (ClassNotFoundException e) {
		System.out.println("Oracle Driver missing ");
		return null;
	System.out.println("Oracle Driver Found. Establishing database connection...");
	Connection connection = null;
	try {
		connection = DriverManager.getConnection("jdbc:oracle:thin:@", "username", "password");
	} catch (SQLException e) {
	if(connection != null) {
		System.out.println("Oracle Connection Established!");
	}else {
		System.out.println("Connection Error");
	return connection;

I was able to access some of the oracle related objects such as OracleTypes.cursor, so I am assuming that I pulled in all the dependencies correctly. But whenever I try to establish a JDBC connection with my external oracle database, I get the classNotFound exception.

<img src="//" width="690" height="336">

**Note**: The really weird  thing is this issue is somewhat intermittent. Sometimes when I do a mvn clean and atlas-run from scratch I was able to establish a connection. Most of the times I get the classNotFound Exception. 

Am I pulling in the dependencies wrong? Any suggestions?

Hi .

did you find a solution?


Hi @antoniojose.figueire,

I couldn’t get to the real reason for what caused the problem, but I was able to fix it by doing a clean build.

hi again @simonhuang92
It is possible to send me your pom.xml, just to see if is anything that may missing at mine?