Missing Oracle jdbc Driver for Mule ESB Datamapper -
good morning everyone,
i have big issue run job in mule esb. i'm trying map csv file in table of oracle database. that, created jdbc connector oracle datasource , connection test valid. if run job 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 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 of type: receiverfileinputstream (org.mule.api.messagingexception) -------------------------------------------------------------------------------- root exception stack trace: java.lang.classnotfoundexception: cannot load class 'oracle.jdbc.oracledriver' @ org.mule.module.launcher.application.compositeapplicationclassloader.loadclass(compositeapplicationclassloader.java:74) @ org.jetel.util.classloader.greedyurlclassloader.loadclassgreedy(greedyurlclassloader.java:137) @ org.jetel.util.classloader.greedyurlclassloader.loadclass(greedyurlclassloader.java:111) + 3 more (set debug level logging or '-dmule.verbose.exceptions=true' everything) ******************************************************************************
do have put driver "ojdbc7.jar" in specific directory?
what looks have configured oracle.jdbc.oracledriver
instead of oracle.jdbc.driver.oracledriver
can configure following example :-
<spring:beans> <spring:bean id="datasource" class="org.apache.commons.dbcp.basicdatasource" destroy-method="close"> <spring:property name="driverclassname" value="oracle.jdbc.driver.oracledriver"/> <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:xe"/> <spring:property name="username" value="yourusername"/> <spring:property name="password" value="yourpassword"/> <spring:property name="removeabandoned" value="true"/> <spring:property name="initialsize" value="10"/> <spring:property name="maxactive" value="50"/> </spring:bean> </spring:beans> <db:generic-config name="database_configuration" datasource-ref="datasource" doc:name="generic database configuration" /> <flow name="mainflow"> <http:listener config-ref="httplistenerconfig" path="/*" doc:name="http" allowedmethods="get"/> /////////////////////////////////////// code //////////////////////////////////// <db:select config-ref="database_configuration" doc:name="database"> <db:parameterized-query><![cdata[select * yourtablename]]></db:parameterized-query> </db:select> </flow>
you need configure , change per ip, username, password etc
add commons-dbcp-1.2.2.jar or other version , ojdbc6.jar in classpath dependancy
Comments
Post a Comment