Oracle Messaging Gateway Returns Errors "Failed to create MessageConsumer from Session" (Doc ID 1345706.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.5 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

Oracle Messaging Gateway (MGW) data dictionary view MGW_SUBSCRIBER shows errors "Failed to create MessageConsumer from Session":

SQL> select last_error_msg from mgw_subscriber;

ERROR_MSG
---------------------------------------------
Failed to create MessageConsumer from Session

Cleaning up the gateway (execute dbms_mgwadm.cleanup_gateway) and re-setting the subscriber (execute dbms_mgwadm.reset_subscriber) do not help.

There are no trace files generated for this error in $ORACLE_HOME/mgw/log

Changes

Drop/disable commands were run against the queues and the queues were re-created, for example:

DECLARE
v_schema VARCHAR2(20);
BEGIN
SELECT upper(sys_context('userenv', 'CURRENT_USER'))
INTO v_schema
FROM dual;
IF v_schema = 'AQ'
THEN
dbms_aqadm.stop_queue('MY_QUEUE');
dbms_aqadm.drop_queue('MY_QUEUE');
...
...
END;
/
BEGIN
sys.dbms_aqadm.create_queue_table(
...
sys.dbms_aqadm.create_queue(
...
--dbms_aqadm.start_queue('MY_QUEUE');
END;
/

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms