Good morning to everyone,
I have a big issue with the Datamapper component in Mule ESB. I'm trying to map an Excel file (xlsx) in a table of an oracle database. To do that, I created a JDBC Connector with a Oracle DataSource and all of its stuff but when When I go to the DataMapper Wizard to create the mapping, I am not able to choose the Connector created because there are no item in the connectors list (in the Output datamapper wizard label).[Here below a screenshot of my problem]
I really don't understand why, could you help me?
Moreover, I have a question to you: I need to insert in the database other fields in addition to that provided by the xls file, like MuleMessageID, xls file name and Oracle SYSDATE. Is it possibile?
To provide to you much information as possible, i'll post my mule project
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:ftp="http://www.mulesoft.org/schema/mule/ee/ftp" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
<spring:beans>
<spring:bean id="SettingProperty" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" scope="singleton">
<spring:property name="locations">
<spring:list>
<spring:value>classpath:pilot.properties</spring:value>
</spring:list>
</spring:property>
</spring:bean>
</spring:beans>
<http:connector name="HTTPConnector"
cookieSpec="netscape"
doc:name="HTTP\HTTPS">
<service-overrides messageFactory="it.aizoon.http.customHttpMultipart.MyHttpMultipartMuleMessageFactory"/>
</http:connector>
<file:endpoint path="${file.output}" name="XSLXFile" responseTimeout="10000" doc:name="File"/>
<jdbc-ee:oracle-data-source name="Oracle_Data_Source" user="${db.user}" password="${db.password}" url="${db.url}" doc:name="Oracle Data Source" transactionIsolation="UNSPECIFIED"/>
<jdbc-ee:connector name="JdbcConnector" dataSource-ref="Oracle_Data_Source" validateConnections="true" queryTimeout="-1" doc:name="Database" pollingFrequency="0">
<jdbc-ee:query key="storedProc" value="CALL ${db.storedProc}" />
</jdbc-ee:connector>
<data-mapper:config name="xls_to_db_grf" transformationGraphPath="xls_to_db.grf" doc:name="xls_to_db_grf"/>
<!-- Starting Flow Declaration -->
<flow name="zonal_imbalance_1.0Flow1" doc:name="zonal_imbalance_1.0Flow1">
<http:inbound-endpoint
address="http://${conn.host}:${conn.port}/${conn.path}"
connector-ref="HTTPConnector" doc:name="HTTP" exchange-pattern="request-response"/>
<wildcard-filter pattern="*/${conn.path}*" caseSensitive="true" doc:name="Wildcard"/>
<file:outbound-endpoint responseTimeout="10000" doc:name="Store XSLX File" path="C:\Users\paride.letizia\MuleStudio\workspace_ee\zonal_imbalance_1.0\src\test\resources\outputFolder"/>
<data-mapper:transform doc:name="DataMapper"/>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryTimeout="-1" doc:name="ORACLE Database" queryKey="example" connector-ref="JdbcConnector">
<jdbc-ee:query key="example" value="SELECT * FROM prova;"/>
</jdbc-ee:outbound-endpoint>
</flow>
</mule>
Thank you very very much to all of you, in advance. I look forward to hearing from you.