Good morning to everyone,
I have a big issue to run a job in Mule ESB. I'm trying to map an CSV file in a table of an oracle database. To do that, I created a JDBC Connector with a Oracle DataSource and the Connection Test is Valid. But if i run The Job an error Message appears.
[Error Message]
-------------------------------------
ERROR 2015-06-17 09:01:26,223 [[....].connector.file.mule.default.receiver.01] org.mule.exception.DefaultMessagingExceptionStrategy:
******************************************************************************
Message : com.mulesoft.mule.module.datamapper.api.exception.DataMapperCreationException: Element [JDBC0:]-Can't initialize connection DBConnection driver[null]:jndi[null]:url[jdbc:oracle:thin:@.....:....:.......]:user[......]. (java.lang.RuntimeException). Message payload is of type: ReceiverFileInputStream
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Cannot load class 'oracle.jdbc.OracleDriver' (java.lang.ClassNotFoundException)
org.mule.module.launcher.application.CompositeApplicationClassLoader:74 (null)
2. Cannot create JDBC driver 'Oracle'. Cannot find class. (org.jetel.exception.ComponentNotReadyException)
org.jetel.connection.jdbc.driver.JdbcDriverImpl:188 (null)
3. Can't initialize connection DBConnection driver[null]:jndi[null]:url[..............]:user[.......]. (org.jetel.exception.ComponentNotReadyException)
org.jetel.graph.TransformationGraph:413 (null)
4. Element [JDBC0:]-Can't initialize connection DBConnection driver[null]:jndi[null]:url[..............]:user[...........]. (com.mulesoft.mule.module.datamapper.api.exception.DataMapperCreationException)
com.mulesoft.mule.module.datamapper.clover.impl.graphfactory.DocumentCloverGraphFactoryImpl:59 (null)
5. com.mulesoft.mule.module.datamapper.api.exception.DataMapperCreationException: Element [JDBC0:]-Can't initialize connection DBConnection driver[null]:jndi[null]:url[............]:user[.....]. (java.lang.RuntimeException)
com.mulesoft.mule.module.datamapper.clover.impl.graphprovider.PoolGraphProvider:109 (null)
6. com.mulesoft.mule.module.datamapper.api.exception.DataMapperCreationException: Element [JDBC0:]-Can't initialize connection DBConnection driver[null]:jndi[null]:url[..............]:user[..............]. (java.lang.RuntimeException). Message payload is of type: ReceiverFileInputStream (org.mule.api.MessagingException)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.ClassNotFoundException: Cannot load class 'oracle.jdbc.OracleDriver'
at org.mule.module.launcher.application.CompositeApplicationClassLoader.loadClass(CompositeApplicationClassLoader.java:74)
at org.jetel.util.classloader.GreedyURLClassLoader.loadClassGreedy(GreedyURLClassLoader.java:137)
at org.jetel.util.classloader.GreedyURLClassLoader.loadClass(GreedyURLClassLoader.java:111)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
******************************************************************************
Do I have to put the driver "ojdbc7.jar" in a specific directory?
What it looks like you have configured
oracle.jdbc.OracleDriver
instead oforacle.jdbc.driver.OracleDriver
You can configure the following example :-You need to configure and change as per your ip, username, password etc
Add commons-dbcp-1.2.2.jar or other version and ojdbc6.jar in your classpath as dependancy