4 Replies Latest reply on Aug 18, 2011 3:44 AM by 391458

    Dequeue Problem from Oracle AQ with XMLType payload

    570345
      Hi,
      I have created a queue using the following script -

      BEGIN
      dbms_aqadm.create_queue_table(
      queue_table => 'INBOUND_QTAB',
      comment => 'Inbound Queue',
      queue_payload_type => 'SYS.XMLType',
      compatible => '8.1');
      END;
      /

      BEGIN
      dbms_aqadm.create_queue(
      queue_name => 'INBOUND_QUEUE',
      queue_table => 'INBOUND_QTAB');
      END;
      /

      and then started the queue.

      For dequeue I am using the following

      1> AQjmsQueueConnectionFactory q_conn_fact = (AQjmsQueueConnectionFactory)AQjmsFactory.getQueueConnectionFactory("NAGPUR.tdk.dk","LSFM",1521,"thin");
      2> appslog.write(CLASS_PREFIX+"performAction()","#######Got Queue Connection Factory#######", Log.ERROR); //OK
      3> QueueConnection q_conn = q_conn_fact.createQueueConnection("xdp","xdp");
      4> appslog.write(CLASS_PREFIX+"performAction()","#######Got Queue Connection#######", Log.ERROR); //OK
      5> QueueSession q_sess = q_conn.createQueueSession(true,Session.AUTO_ACKNOWLEDGE);
      6> appslog.write(CLASS_PREFIX+"performAction()","#######Got Queue Session#######", Log.ERROR); //OK
      7> Queue myQueue = ((AQjmsSession)q_sess).getQueue("xdp",inboundQueue);
      8> appslog.write(CLASS_PREFIX+"performAction()","#######Got Handle to the Queue : " + myQueue.toString() + "#######", Log.ERROR); //OK , but this is the last line that is prining successfully
      9> QueueReceiver q_receiver = ((AQjmsSession)q_sess).createReceiver(myQueue, XMLType.getORADataFactory());
      10> appslog.write(CLASS_PREFIX+"performAction()","#######Got Receiver for the Queue#######", Log.ERROR); //DOES NOT printing
      11> XXTDCQueueListener q_listener = new XXTDCQueueListener();
      q_receiver.setMessageListener(q_listener);
      12> appslog.write(CLASS_PREFIX+"performAction()","#######Set the message listener#######", Log.ERROR);
      13> q_conn.start();
      14> appslog.write(CLASS_PREFIX+"performAction()","#######Queue connection started#######", Log.ERROR);
      15> XMLType xml_msg = (XMLType)q_receiver.receiveNoWait();
      16> appslog.write(CLASS_PREFIX+"performAction()","#######Got the XMLType Message#######", Log.ERROR);
      17> q_sess.commit();
      18> q_conn.stop();
      19> q_conn.close();

      Now the problem is that, while creating the queue receiver (line 9), it got stuck. The next i.e. line 10 not printed.
      Can you please suggest whether I have handled the code successfully?
        • 1. These are the entries in the LOG file
          570345
          [Apr 12, 2007 11:44:49 AM CEST]:1176371089487:Thread[Incoming,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:ERROR:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.adapter.xxtdc.XXTDCInboundReader.peformAction]:BEGIN
          [Apr 12, 2007 11:44:49 AM CEST]:1176371089490:Thread[Incoming,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:ERROR:[xdp.adapter.xxtdc.XXTDCInboundReader.performAction()]:#######Got Queue Connection Factory#######
          [Apr 12, 2007 11:44:49 AM CEST]:1176371089532:Thread[Incoming,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:ERROR:[xdp.adapter.xxtdc.XXTDCInboundReader.performAction()]:#######Got Queue Connection#######
          [Apr 12, 2007 11:44:49 AM CEST]:1176371089544:Thread[Incoming,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:ERROR:[xdp.adapter.xxtdc.XXTDCInboundReader.performAction()]:#######Got Queue Session#######
          [Apr 12, 2007 11:44:49 AM CEST]:1176371089581:Thread[Incoming,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:ERROR:[xdp.adapter.xxtdc.XXTDCInboundReader.performAction()]:#######Got Handle to the Queue : XDP.XXTDC_INV_INBOUND_QUEUE#######
          [Apr 12, 2007 11:44:59 AM CEST]:1176371099430:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.QueueIO.read.begin]:Timeout: 10
          [Apr 12, 2007 11:44:59 AM CEST]:1176371099430:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.DBAccess.readFromQ]:QName: XNP_OUT_MSG_Q; Consumer: XXTDC_TEST_AQ_IN; Timeout: 10
          [Apr 12, 2007 11:45:09 AM CEST]:1176371109230:Thread[Control,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.PipeIO.read.begin]:Timeout: 10
          [Apr 12, 2007 11:45:09 AM CEST]:1176371109230:Thread[Control,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.DBAccess.readFromPipe]:PipeName: XXTDC_TEST_AQ_IN_10216_C; Timeout: 10
          [Apr 12, 2007 11:45:14 AM CEST]:1176371114436:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.QueueIO.read.begin]:Timeout: 10
          [Apr 12, 2007 11:45:14 AM CEST]:1176371114436:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.DBAccess.readFromQ]:QName: XNP_OUT_MSG_Q; Consumer: XXTDC_TEST_AQ_IN; Timeout: 10
          [Apr 12, 2007 11:45:29 AM CEST]:1176371129237:Thread[Control,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.PipeIO.read.begin]:Timeout: 10
          [Apr 12, 2007 11:45:29 AM CEST]:1176371129237:Thread[Control,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.DBAccess.readFromPipe]:PipeName: XXTDC_TEST_AQ_IN_10216_C; Timeout: 10
          [Apr 12, 2007 11:45:29 AM CEST]:1176371129441:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.QueueIO.read.begin]:Timeout: 10
          [Apr 12, 2007 11:45:29 AM CEST]:1176371129441:Thread[Application,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[XXTDC_TEST_AQ_IN_10216_C : oracle.apps.xdp.common.DBAccess.readFromQ]:QName: XNP_OUT_MSG_Q; Consumer: XXTDC_TEST_AQ_IN; Timeout: 10
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135953:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:STATEMENT:[jtf.cache.CacheWorkerThread]:CacheWorkerThread.heapTracker() - thread wakes up
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(): BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null,0x16b13c7): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(): BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null,0x16b13c7): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(): BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(oracle.jdbc.driver.OracleConnection@cfec48): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135954:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(oracle.jdbc.driver.OracleConnection@cfec48,0x89cf1e): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135956:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(): BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135956:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null): : BEGIN/END
          [Apr 12, 2007 11:45:35 AM CEST]:1176371135957:Thread[Cache Heap Tracker,5,main]:-1:-1:nagpur:10.74.107.80:-1:-1:PROCEDURE:[fnd.common.WebAppsContext]:oracle.apps.fnd.common.WebAppsContext.releaseJDBCConnection(null,0x89cf1e): : BEGIN/END
          • 2. Re: Dequeue Problem from Oracle AQ with XMLType payload
            588735
            I got similar problem.
            In stead, I use dequeue as following:
            AQMessage message = ((AQOracleQueue)queue).dequeue(dq_option, XMLType.getORADataFactory());

            During runtime, I got classcast exception.

            any help will be appreciated.

            Thanks
            • 3. Re: Dequeue Problem from Oracle AQ with XMLType payload
              783453
              how did you run the script, through sqlplus?
              • 4. Re: Dequeue Problem from Oracle AQ with XMLType payload
                391458
                The payload you are enqueueing is not an XMLType.