Resource adapter invoked onReject without an associated exception

I encountered the following error with JMS Adapter when the message was redelivered from queue.

Resource adapter invoked onReject without an associated exception

Environment

  • Oracle SOA 11.1.1.7.8
  • JMS Q configured with redelivery option.
  • SOA Project with a JMS Adapter to consume from a JMS Queue. Uses an XA Datasource
  • BPEL component with oneWayDeliveryPolicy set to “sync” ; transaction set to “required”.
  • Throw activity to throw fault

BPEL Component With Throw

Problem

When a rollback fault or remote fault is thrown from the bpel , transaction is rolled back and message is put back in JMS Queue. The message is redelivered based on configuration and gets processed successfully.

Instance Details
Message Rolled back on throwing Remote Fault. Retried for 1 time.

However when a “binding fault” is thrown from the bpel , transaction is rolled back. Message also gets redelivered based on configuration. However JMS Adapter rejects the message with error “Resource adapter invoked onReject() without an associated exception”

Resource adapter invoked onReject() without an associated exception.
When a binding fault is thrown, JMS Adapter rejects the redelivered message.

Workaround

Have a catch / catch all branch to catch binding fault . Rethrow “remote” fault. This way any binding fault will be thrown as remote fault and adapter will not reject the messages.

BPEL With Catch All

Instance Details
Binding Fault is caught and thrown as Remote fault. Message is retried for 1 time.

Leave a Reply

Your email address will not be published. Required fields are marked *