cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC to Mail Adapter

Former Member
0 Kudos

Hi All,

i need some help regarding my scenario with JDBC to Mail adapter.I have to read a table and <b>then sent the values in it to a email.i have finished design and configuring ,but still i am getting this mapping error.

<b>"com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_sp_mail_MM_: RuntimeException in Message-Mapping transformatio~</"

</b>

when i check the trace it says

" com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:sp_mail_MT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start"

</b>

Let me give the details of my scenario especially my mapping where it fails

This is my message mapping with <b>1:1 mapping</b>

Source Message Type:

sp_jdbc_DT 1..1

Record 1

Row 1..unb

Create_Date 1

Message 1

Flag 1

Status 1

Target Message Type

sp_jdbc_DT 1..1

Record 1

Row 1

Create_Date 1

Message 1

Flag 1

Status 1

the payload i get

<?xml version="1.0" encoding="utf-8" ?>

- <Record>

- <row>

<Create_Date>2007-02-13 14:17:20.78</Create_Date>

<Message>An Error Occured in the Stored Procedure</Message>

<Mail_Flag>H</Mail_Flag>

<Status>new</Status>

</row>

</Record>

I have Created source mt as outbound and target mt as inbound. and also defined interface mapping.

in the configuration i have created a comm channel for database as sender jdbc and reciver as mail adapter.i have defined sender agreement,reciever agreemane and interface and reciver determination.

my idea is to send the payload as message to the reciepient email.i have not downloaded any mail package.

Any Help appreciated..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aravind,

Is ur target msg type correct

<i>Cannot produce target element /ns0:sp_mail_MT</i>

I cannot see any sp_mail_MT in ur target structure. I think thr is prob with the message mapping. You dont hv to use mail package over hr. Just give the sender and receiver details in the receiver mail adapter

Also, check the following link

<a href="https://websmp209.sap-ag.de/form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202&_OBJECT=011000358700004556712005E">https://websmp209.sap-ag.de/form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202&_OBJECT=011000358700004556712005E</a>

Regards,

Akshay

Former Member
0 Kudos

Hi All,

My problem is solved.I found that i did not add the namespace under the configuration paramter

"Document Namespace" in the sender JDBC adapter.Mapping failed as there was no namespace.

Thanks for all your responses

Answers (3)

Answers (3)

udo_martens
Active Contributor
0 Kudos

Hi Aravind,

you have a required element <i>sp_mail_MT</i> in your target msg type. During mapping it cant be filled. Copy incoming XML from MONI and go to test modus at IB Repository. Switch trace to maximum and test with downloaded file, to find out why required element is not filled. If you <b>want</b> that result without error change the target msg type and make the field optional (0-1 or 0-unbounded).

Regards,

Udo

Former Member
0 Kudos

Aravind,

your mapping is not correct can you check the trace in mapping and paste the error here so that i can tell you which field is causing the error.

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Hi Arvind,

There is a problem in your Message Mapping.

Test your mapping in the repository and then correct it.

Regards

Sunita