0

I have installed Anypoint Studio 7.3 and trying to connect to oracle database using DB Connector. I have added the below dependency ±

     <groupId>com.oracle.jdbc</groupId>
     <artifactId>ojdbc8</artifactId>
     <version>12.2.0.1</version>
 </dependency>

But I am still getting error±

org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source Caused by: org.mule.extension.db.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source Caused by: org.mule.runtime.extension.api.exception.ModuleException: java.sql.SQLException: Error trying to load driver: oracle.jdbc.driver.OracleDriver : Cannot load class 'oracle.jdbc.driver.OracleDriver': [ oracle.jdbc.driver.OracleDriver, Cannot load class 'oracle.jdbc.driver.OracleDriver': [ Class 'oracle.jdbc.driver.OracleDriver' has no package mapping for region 'domain/default/app/tooling-application-8e2bb850-e8d8-11e8-bc79-fe8a20524153'., Cannot load class 'oracle.jdbc.driver.OracleDriver': [ oracle.jdbc.driver.OracleDriver, Class 'oracle.jdbc.driver.OracleDriver' not found in classloader for artifact 'container'.]]]

Can anyone suggest please . Thanks, Sanjukta

user3052531
  • 29
  • 2
  • 5

1 Answers1

0

That error happens because Maven can not find the dependency you added. That is because the Oracle JDBC driver is not available in the Maven Central repository. You will need to download the jar from Oracle and install it manually in the local Maven repository of your computer. Note that you need to match the coordinates of the dependency to the ones used in the install command, otherwise Maven will not find it.

aled
  • 21,330
  • 3
  • 27
  • 34
  • 1
    Adding to above solution, you need to add manually added dependencies in in pom.xml ` com.mycompany ojdbc8 ` under `mule-maven-plugin` – ravibeli Mar 20 '19 at 13:51