0 Replies Latest reply on Sep 5, 2010 6:37 PM by 723246

    Oracle JMS Database Persistence. Name of header message propery is empty.

    723246
      Hi, All.

      I have an issue whith Oracle JMS Database Persistence(OraAs v. 10.1.3.4, OraDB v. 10.2.0.4).

      The Symptoms: Reading aq messages through OEJMS fails with NullPointerExcpetion:

      ++++++++
      Exception in thread "main" oracle.jms.AQjmsException: JMS-120: Dequeue failed
           at oracle.jms.AQjmsError.throwEx(AQjmsError.java:308)
           at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2104)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:914)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
           at aqapitest.TestAqJms.main(TestAqJms.java:104)

      [Linked-exception]
      java.lang.NullPointerException
           at java.util.Hashtable.put(Hashtable.java:401)
           at oracle.jms.AQjmsMessage.convertPropertyListToHashtable(AQjmsMessage.java:2373)
           at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2012)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:914)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
      at aqapitest.TestAqJms.main(TestAqJms.java:104)
      ++++++++++++

      Scenario.
      1. I created the datasource and the connection pool ($ORAAS_HOME/j2ee/oc4j_soa/config/data-sources.xml):

      <managed-data-source connection-pool-name="AQJMSPool" jndi-name="jdbc/JmsAqDS" name="JmsAqDS"/>
      <connection-pool name="AQJMSPool">
      <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="jmsuser" password="jmsuser" url="jdbc:oracle:thin:@192.168.1.3:1521:MYORA" commit-record-table-name=""/>
      </connection-pool>

      2. I declared the resource provider in $ORAAS_HOME/j2ee/oc4j_soa/config/application.xml:

      <resource-provider class="oracle.jms.OjmsContext" name="endorTestRP">
      <description>Sensor JMS/AQ</description>
      <property name="datasource" value="jdbc/SensorTestDS"/>
      </resource-provider>

      3. I created the jmsuser and target queue.

           CONNECT / AS SYSDBA
           DROP USER jmsuser CASCADE ;

           GRANT connect,resource,AQ_ADMINISTRATOR_ROLE TO jmsuser IDENTIFIED BY jmsuser ;
           GRANT execute ON sys.dbms_aqadm TO jmsuser;
           GRANT execute ON sys.dbms_aq TO jmsuser;
           GRANT execute ON sys.dbms_aqin TO jmsuser;
           GRANT execute ON sys.dbms_aqjms TO jmsuser;

           connect jmsuser/jmsuser;

           BEGIN
           DBMS_AQADM.CREATE_QUEUE_TABLE(
           Queue_table => 'XX_JMS_QTAB',
           Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',
           sort_list => 'PRIORITY,ENQ_TIME',
           multiple_consumers => false,
           compatible => '10.0.0');
           
           DBMS_AQADM.CREATE_QUEUE(
           Queue_name => 'XX_JMS_Q',
           Queue_table => 'XX_JMS_QTAB');
           
           DBMS_AQADM.start_queue(Queue_name => 'XX_JMS_Q');
           END;

      4.I created a new connection factory entry in JMSAdapter oc4j-ra.xml ($ORAAS_HOME/j2ee/oc4j-soa/application-deployments/default/JMSAdapter/oc4j-ra.xml)

      <connector-factory location="eis/Jms/11gAQ" connector-name="Jms Adapter">
                <config-property name="connectionFactoryLocation" value="java:comp/resource/JMSAQ_RP/QueueConnectionFactories/QCF"/>
                <config-property name="factoryProperties" value=""/>
                <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
                <config-property name="isTopic" value="false"/>
                <config-property name="isTransacted" value="false"/>
                <config-property name="username" value="jmsuser"/>
                <config-property name="password" value="jmsuser"/>
                <connection-pooling use="private">
                     <property name="waitTimeout" value="180" />
                     <property name="scheme" value="fixed_wait" />
                     <property name="property-check-interval" value="5" />
                     <property name="autoCloseSession" value="" />
                     <property name="abandoned-connection-timeout" value="20" />
                     <property name="inactivity-timeout-check" value="all" />
                     <property name="inactivity-timeout" value="120" />
                </connection-pooling>
                <security-config use="none">
                </security-config>
           </connector-factory>

      5. After restarting the container i tried to send and recieve a message

      package aqapitest;

      import java.io.File;
      import java.io.FileNotFoundException;
      import java.io.FileOutputStream;
      import java.io.OutputStream;

      import java.sql.Connection;
      import java.sql.SQLException;

      import java.util.Hashtable;

      import javax.jms.BytesMessage;
      import javax.jms.JMSException;
      import javax.jms.Message;
      import javax.jms.Queue;
      import javax.jms.QueueConnection;
      import javax.jms.QueueConnectionFactory;
      import javax.jms.QueueReceiver;
      import javax.jms.QueueSender;
      import javax.jms.QueueSession;
      import javax.jms.TextMessage;

      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;

      import oracle.jms.AQjmsOracleDebug;
      import oracle.jms.AQjmsSession;

      public class TestAqJms {
      static String mode = "sr";
      public TestAqJms() {
      }

      public static void main(String[] args) throws NamingException,
      JMSException,
      FileNotFoundException,
      SQLException {

      QueueConnectionFactory queueConnectionFactory = null;
      Queue queue = null;
      QueueConnection queueConnection = null;
      QueueSession session = null;
      Connection dbConn = null;

      String logFileName = "c:\\jms.log";
      OutputStream outputStream = new FileOutputStream(new File(logFileName));
      AQjmsOracleDebug.setLogStream(outputStream);
      AQjmsOracleDebug.setTraceLevel(5);
      AQjmsOracleDebug.setDebug(true);

      Hashtable<String,String> env = new Hashtable<String,String>();
      env.put(Context.PROVIDER_URL, "opmn:ormi://192.168.1.3:6003:oc4j_soa");
      env.put(Context.INITIAL_CONTEXT_FACTORY ,"oracle.j2ee.rmi.RMIInitialContextFactory");
      env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
      env.put(Context.SECURITY_CREDENTIALS,"welcome1");

      System.out.println("\nConstructing InitialContext..");
      InitialContext context = new InitialContext(env);
      System.out.println("Ok! InitialContext: "+context.getClass().getName());

      System.out.println("\nLooking up ConnectionFactory..");
      queueConnectionFactory =(QueueConnectionFactory)context.lookup("java:comp/resource/JMSAQ_RP/QueueConnectionFactories/QCF");
      System.out.println("ConnectionFactory: "+queueConnectionFactory.getClass().getName());
      System.out.println("\nLooking up Queue..");
      queue= (Queue)context.lookup("java:comp/resource/JMSAQ_RP/Queues/XX_JMS_Q");
      System.out.println("Queue: "+queue.getClass().getName());

      System.out.println("\nEstablishing connection..");
      queueConnection = queueConnectionFactory.createQueueConnection("jmsuser","jmsuser");
      System.out.println("QueueConnection: "+queueConnection.getClass().getName());

      System.out.println("\nCreating session..");
      session = queueConnection.createQueueSession(true,QueueSession.SESSION_TRANSACTED);
      System.out.println("Session: "+session.getClass().getName());

      dbConn = ((AQjmsSession)session).getDBConnection();
      System.out.println("\nJDBC Driver: "+dbConn.getMetaData().getDriverName()+" v."+dbConn.getMetaData().getDriverVersion());

      if (mode.contains("s")) {
      System.out.println("\nSending message..");
      QueueSender sender = session.createSender(queue);
      System.out.println(" QueueSender: "+sender.getClass().getName());
      BytesMessage m = session.createBytesMessage();

      m.setLongProperty("anyPropName",102L);
      m.writeBytes("Hello!".getBytes());
      sender.send(m);
      session.commit();
      sender.close();
      System.out.println("Ok! Message send.");
      }

      if (mode.contains("r")){
      System.out.println("\nReceiving messages..");
      QueueReceiver queueReceiver = session.createReceiver(queue);
      System.out.println(" QueueReceiver: "+queueReceiver.getClass().getName());
      queueConnection.start();

      Message message = null;
      String value = null;
      while ((message = queueReceiver.receiveNoWait()) != null){
      if (message instanceof TextMessage){
      value = ((TextMessage)message).getText();
      } else if (message instanceof oracle.jms.AQjmsBytesMessage){
      value = new String(((oracle.jms.AQjmsBytesMessage)message).getBytesData());
      }
      System.out.println(" Message text: "+value);
      }
      System.out.println("Ok! Messages received");
      session.commit();
      queueReceiver.close();
      }
      session.close();
      queueConnection.close();
      }
      }

      To allow works this out you have to add following libraries:
      $ORAAS_HOME/j2ee/home/oc4jclient.jar
      $ORAAS_HOME/j2ee/home/jazncore.jar
      $ORAAS_HOME/j2ee/home/lib/jms.jar
      $ORAAS_HOME/j2ee/home/lib/bcel.jar
      $ORAAS_HOME/j2ee/home/lib/oc4j-internal.jar
      $ORAAS_HOME/j2ee/home/lib/pcl.jar
      $ORAAS_HOME/j2ee/home/lib/javax77.jar
      $ORAAS_HOME/j2ee/home/lib/adminclient.jar
      $ORAAS_HOME/j2ee/home/jazncore.jar
      $ORAAS_HOME/bpel/lib/dms.jar
      $ORAAS_HOME/bpel/lib/connector15.jar
      $ORAAS_HOME/jdbc/lib/ojdbc14.jar
      $ORAAS_HOME/rdbms/jlib/aqapi.jar

      6. I recieved this:

      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      Constructing InitialContext..
      Ok! InitialContext: javax.naming.InitialContext

      Looking up ConnectionFactory..
      ConnectionFactory: oracle.jms.AQjmsQueueConnectionFactory

      Looking up Queue..
      Queue: oracle.jms.AQjmsDestination

      Establishing connection..
      QueueConnection: oracle.jms.AQjmsConnection

      Creating session..
      Session: oracle.jms.AQjmsSession

      JDBC Driver: Oracle JDBC driver v.10.1.0.5.0

      Sending message..
      QueueSender: oracle.jms.AQjmsProducer
      Ok! Message send.

      Receiving messages..
      QueueReceiver: oracle.jms.AQjmsConsumer
      Exception in thread "main" oracle.jms.AQjmsException: JMS-120: Dequeue failed
           at oracle.jms.AQjmsError.throwEx(AQjmsError.java:308)
           at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2104)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:914)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
           at aqapitest.TestAqJms.main(TestAqJms.java:104)

      [Linked-exception]
      java.lang.NullPointerException
           at java.util.Hashtable.put(Hashtable.java:401)
           at oracle.jms.AQjmsMessage.convertPropertyListToHashtable(AQjmsMessage.java:2373)
           at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2012)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:914)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
           at aqapitest.TestAqJms.main(TestAqJms.java:104)
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


      Content of jms.log:
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsQueueConnectionFactory.createQueueConnection: with user/pwd
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr ctor (datasource): enter
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.getConnection: Creating from datasource
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.extraInit: enter
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.extraInit: The connection class: oracle_jdbc_driver_LogicalConnection_Proxy
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.extraInit: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.getConnection: generic->DB connection: oracle_jdbc_driver_LogicalConnection_Proxy@a030d6
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.getConnection: generic->XA connection: null
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr ctor (datasource): exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConnectionn ctor (datasource): type: 10
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConnection.setCompliant: Current <compliant> is set to:false
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsQueueConnectionFactory.createQueueConnection w/username/password: Connection created successfully
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsDBConnMgr.getConnection: get the firstConn created during the authentication
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.constructor: dbversion=10204
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.constructor1: oci enabled = true
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConnection:createQueueSession: Created session
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.createBytesMesage: returning bytes message
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send-1: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send-main: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send: queue: JMSUSER.XX_JMS_Q
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send: dest_queue: JMSUSER.XX_JMS_Q
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main setJMSTimestamp. timestamp: 1283687430671
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.checkMessageType: adt_type: SYS.AQ$_JMS_MESSAGE
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.checkMessageType: message_class: oracle.jms.AQjmsBytesMessage
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.genMsgCompatible: genMsgCompatible=true
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: q_name: JMSUSER.XX_JMS_Q
      main Num props 3
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsMessage.convertHashtableToPropertyList: entry
      main Property: 0
      main Name: JMS_OracleDeliveryMode Type: 27
      main Name: JMS_OracleDeliveryMode Value: 2 Str Type: 27
      main Property: 1
      main Name: JMS_OracleTimestamp Type: 24
      main Name: JMS_OracleTimestamp Value: 1283687430671 Num Type: 24
      main Property: 2
      main Name: anyPropName Type: 24
      main Name: anyPropName Value: 102 Num Type: 24
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsMessage.convertHashtableToPropertyList: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: message type: oracle.jms.AQjmsBytesMessage
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.genMsgCompatible: genMsgCompatible=true
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.populateMessageContainer: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.populateMessageContainer: - bytes_len: 6
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.populateMessageContainer: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: populateContainer took 0 msecs
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: corrid:
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: priority: 1
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: delay: 0
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: ttl_secs: -1
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: exceptionQ: null
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: p_type: 1
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.genMsgCompatible: genMsgCompatible=true
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: execute Query 15 msecs
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.write_blob: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.write_blob: - bytes_len: 6 qtable: JMSUSER.XX_JMS_QTAB
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsBytesMessage.write_blob: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.enqueue: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send-main: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.send-1: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.restartConsumers: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.localClose: ENTRY
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsProducer.localClose: EXIT
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer-constructor: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer-constructor: dest_type: 10
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer-constructor: cons_dest: JMSUSER.XX_JMS_Q
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer-constructor: p_type: SYS.AQ$_JMS_MESSAGE
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer-constructor: exit
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer.receive-2: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsConsumer.receive-2: timeout(millisecs): 0
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.checkForGlobalTxn: entry
      main [Sun Sep 05 15:50:30 MSD 2010] AQjmsSession.checkForGlobalTxn: oracle.jms.useEmulatedXA is on
      main [Sun Sep 05 15:50:30 MSD 2010] EmulatedXAHandler.checkForGlobalTxn: entry
      main [Sun Sep 05 15:50:31 MSD 2010] EmulatedXAHandler.doReflection: Exception: java.lang.NoSuchFieldException: transaction
      java.lang.NoSuchFieldException: transaction
           at java.lang.Class.getField(Class.java:1507)
           at oracle.jms.EmulatedXAHandler.doReflection(EmulatedXAHandler.java:65)
           at oracle.jms.EmulatedXAHandler.checkForGlobalTxn(EmulatedXAHandler.java:117)
           at oracle.jms.AQjmsSession.checkForGlobalTxn(AQjmsSession.java:6581)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:891)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
           at aqapitest.TestAqJms.main(TestAqJms.java:104)
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsSession.checkForGlobalTxn: exit
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: entry
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: sec_timeout: 0 close_check_interval: 120
      main Timeout: 0 Iterations: 1 Interval: 120 Last_interval: 0
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: q_name: JMSUSER.XX_JMS_Q p_data_type: SYS.AQ$_JMS_MESSAGE
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: After getDbConnection
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: Payload type0
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: use_ociaq_lib = false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: consumer_name: null
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: dq_mode: 3navig: 1visibility: 2
      main AQjmsConsumer.dequeue: wt_time: 0
      main Checking if session is closed: retry: false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: faking empty bytes message
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsSession.createBytesMesage: returning bytes message
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsBytesMessage.readBytesMessageContainer: entry
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsBytesMessage.readBytesMessageContainer: - bytes_len: 6
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsBytesMessage.readBytesMessageContainer: exit
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: general payload messaeg retrieved
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: set AQ enqueue_time as 1283679929000
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: msg_id: F334307DA5D54D7ABA41B789E1A1A231 corrid: null priority: 1
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: msg_delay(secs): 0
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: exptime(secs): -1
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: attempts: 1
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: excp_q: null
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsSession.getCompliant: Session <compliant>:false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: after receive- anyd_jms false
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: after receive-0 oracle.jms.AQjmsBytesMessage@2d5534
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: after receive-1
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue: after receive-2
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsMessage.convertPropertyListToHashtable: entry
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsMessage.convertPropertyListToHashtable: num_props: 3
      main [Sun Sep 05 15:50:31 MSD 2010] AQjmsConsumer.dequeue-ex3: Exception: java.lang.NullPointerException
      java.lang.NullPointerException
           at java.util.Hashtable.put(Hashtable.java:401)
           at oracle.jms.AQjmsMessage.convertPropertyListToHashtable(AQjmsMessage.java:2373)
           at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2012)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:914)
           at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:833)
           at oracle.jms.AQjmsConsumer.receiveNoWait(AQjmsConsumer.java:756)
           at aqapitest.TestAqJms.main(TestAqJms.java:104)
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      8. So.. i took a deep dive to the issue.. including decompilation of aqapi.jar.. and found that:

      The java.lang.NullPointerException raised because NAME OF JMS HEADER PROPERTY IS NULL.
      It was true, there were two message header properies with empty names in the database queue table.

      I checked this out: In the database i updated the message header properties names to P1 and P2.
      And the same code recieved the message without any error.

      So, problem moved from the Receiver to the Sender (Producer): PRODUCER GENARATES WRONG AQJMS MESSAGES;

      I continued digging.. I found (through additional tracing) that just before binding the Message object to CallableStatement (callableStatement.setORAData(15,(ORAData)message);)
      header properties was quite perfect.
      I replaced (by modifiyng AQjmsSession.java) the pl/sql procedure that popuplated queue (sys.dbms_aqin.aq$_jms_enqueue_bytes_message) with custom proxy procedure xxenq to insert tracing.
      I found that while executing pl/sql statement inside the DB, names of the properties was empty.

      I figured out that the issue with OJDBC Driver. Dut I tried ojdbc versions 10.1.0.5, 10.2.0.2, 10.2.0.3 and 10.2.0.4 .. the result was the same.

      I don't know what to do next..
      Uffff.
      Any suggestions?

      Edited by: oarkhipov on 05.09.2010 11:13