cancel
Showing results for 
Search instead for 
Did you mean: 

Handling exceptions in JDBC lookup function

deepak_shah
Contributor
0 Kudos

Hi Experts,

We are doing JDBC lookup using standard JDBC lookup function in mapping. It works fine.

However when there is any issue in JDBC lookup channel then JDBC lookup function raised exception in message trace as information message only. And due to this the mapping is not failing.

We want to fail the mapping when JDBC channel is in error. Is there any way to handle this in mapping?

Regards,

Deepak

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Write simple UDF and check the repsonse ad raise mappinge exception(in UDF thow exception saying like JDBC response not correct or with some other user message).

deepak_shah
Contributor
0 Kudos

Hi Raja,

Thanks for the response.

We have written UDF but how do we catch the exception raised by JDBCLookup function.

In display queue of Lookup the context is shown as "<null>".

Thanks,

Deepak

Shabarish_Nair
Active Contributor
0 Kudos

check the return parameter to be null or empty and then fail the UDF

Former Member
0 Kudos

Did you tried using a BPM

Although this is an alternative approach to the way you are looking at solution

Create a transformation step in BPM followed by a synch send. Here you have to add an control step to catrch the exception