cancel
Showing results for 
Search instead for 
Did you mean: 

Throwing Exception in Message mapping.

Former Member
0 Kudos

Hello,

I am using PI 7.0 and SP 16.

I have implemented this blog /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping . But when i was testing in Message Map it is showing the error but when i am testing an end to end scenario it is not showing any trace or error.

My trace level is 3. Also message status in moni is Scehdule for outbound processing.

Please help.

Thanks and Regards

Hemant

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member206760
Active Contributor
0 Kudos

hemant,

your exception will only be thrown if the mapping goes in error...

but as u are mentioning u are getting a Scehdule for outbound processing message in moni...so the mapping stage is not reached

this might be because some queues in XI might be blocked.

goto SMQ2 and SMQ1 if Qs are stopped unlock them

u can go to SXMB_ADM to manage Q ---> activate Qs

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

why not try sending smart exceptions as per my blog:

/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping

Regard,

Michal Krawczyk

Former Member
0 Kudos

Hi,

Micheal I will try this next week but right now I have to make that blog working.

Can you help me in finding out the error or anything I m missing.

Thanks and Regards

Hemant

Former Member
0 Kudos

Hi,

U can check ur trace on following path.

/usr/sap/AD5/DVEBMGS09/j2ee/cluster/server0/log..

U will get a log file... in which the information will be logged.

Babu

Former Member
0 Kudos

Hello,

But my main motto is to throw the exception in mapping and generate an alert...what is the use of looking in log file.

sbuttler77
Active Participant
0 Kudos

Hemant,

have you tried using "throw new RuntimeException("Reason");"? It does the same thing.

Sven

Edited by: Sven Buttler on Feb 25, 2010 2:10 PM

JaganMohan
Participant
0 Kudos

Dear Hemanth,

I have implemented this in my scenario and it was working fine. Might be the condition you have given is not satisfied with the input XML values. Check the following things.

1. Did you import the .jar or .zip files with two java clsses (CustomMappingException, ExceptionThrower) under imported archives?

2. Did you give the package name under imports of UDF?

3. Check whether package names are same at all the places wherever mentioned in that blog.

If you do correctly these things it must work when the conditions satisfied.

Main thing is the mapping should go error with red flag in SXMB_MONI. Then only you can find the message in trace.

Regards,

JP.

Edited by: Jaganmohan Ponmani on Feb 25, 2010 7:10 PM

sbuttler77
Active Participant
0 Kudos

I don't know if the blog's valid I'm throwing exceptions all the time. Maybe I'm missing something?

//write your code here

if ( a.startsWith("DO") ) {

throw new RuntimeException("DO NUMBER DO NOT SEND INVOICE");

}

else {

return a;

}