JDBC Error Handling and transient errors

Hello guys,

I’m currently working on a service which inserts datas in an Oracle DB using the JDBC Adapter 6.5.
I want to identify :

  • transient adapter errors (so that i can re process them later)
  • adapter errors that can’t be resolved (and must lead to the rejection of the record)

I have already read the “webMethods JDBC Adapter User’s Guide 6.5” :
Page 192, “JDBC Adapter Exception Handling” paragraph, it seems that the ‘AdapterException’ and ‘AdapterConnectionException’ could do the job.
» But I can’t find a way to get those exceptions during my tests.

My call to the Db is in a ‘Try sequence’.
In my ‘Catch sequence’, I use the ‘getLastError’ service.
The output ‘lastError’ document contains a com.wm.pkg.art.error.DetailedServiceException exception, as described in the JDBC Adapter Guide.
So far so good.
But then I’m looking at the ‘nestedErrorInfo’ of the ‘lastError’ document and it seems that I always get the same com.wm.adk.error.AdapterServiceException exception. :sad:
No AdapterException. No AdapterConnectionException. But com.wm.adk.error.AdapterServiceException. :sad:

How do you get the AdapterException / AdapterConnectionException the guide is talking about ?

Any advice is appreciated.

Regards
Thomas

A screenshot of my pipeline :
[ATTACH=CONFIG]828[/ATTACH]
webM_screenshot.jpg

How are you testing your adapter service? You might not get the error you expect if you are testing by stepping through the service in Developer.

Build a service that acts as a test harnes by calling the one you are testing.

If you just want to test your catch block sequence, add a map step that populates the desired valued in the lastError structure.

HTH,

Mark

Thanks Mark for your reply.

I was indeed testing step by step with the Developer.

Following your advice, I created a service that calls the adapter service and ran it from the Administrator.

I’ve got the same issue.
Always the same com.wm.adk.error.AdapterServiceException exception that is coming up. :frowning: