mq
  1. mq
  2. MQ-113

NullPointerException in Destination.createDMQ after store destination failure

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1, 4.2, 4.3, 4.4, 4.4u1, 4.4u2, 4.5
    • Fix Version/s: 5.1 (RI-Bug-Fix)
    • Component/s: None
    • Labels:
      None

      Description

      The following NPE reported from forum thread
      http://forums.oracle.com/forums/post!reply.jspa?messageID=9764848

      and also the broker didn't log the store destination exception
      ......
      [29/Jul/2011:12:06:40 NZST] [B1013]: Auto Creation of Queues is enabled
      [29/Jul/2011:12:06:40 NZST] Loading All Stored Destinations
      [29/Jul/2011:12:06:40 NZST] Loaded 0 stored destinations
      [29/Jul/2011:12:06:40 NZST] [B1144]: Creating Dead Message Queue
      [29/Jul/2011:12:06:40 NZST] [B1158]: Administrator has created destination mq.sys.dmq [Queue]
      [29/Jul/2011:12:06:40 NZST] Another broker has created the DMQ, reloading
      [29/Jul/2011:12:06:40 NZST] Exception running broker :
      java.lang.NullPointerException
      at com.sun.messaging.jmq.jmsserver.core.Destination.createDMQ(Destination.java:442)
      at com.sun.messaging.jmq.jmsserver.core.Destination.loadDestinations(Destination.java:4857)
      at com.sun.messaging.jmq.jmsserver.core.Destination.init(Destination.java:5585)
      at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1053)
      at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:410)
      at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:1973)

        Activity

        Hide
        amyk added a comment -

        The NPE is fixed in 4.6

        Show
        amyk added a comment - The NPE is fixed in 4.6
        Hide
        saradak added a comment -

        The original NPE is fixed but there is another NPE when starting the HA broker cluster with msserver.

        Steps to produce the problem:

        1. Start broker b1(port=8001) & b2(port=8002) in HA cluster with the following properties

        imq.instanceconfig.version=300
        imq.portmapper.port=brokerportno
        imq.brokerid=brokername
        #
        imq.cluster.ha=true
        imq.cluster.clusterid=mqCluster
        #
        imq.persist.store=jdbc
        imq.persist.jdbc.dbVendor=mssql
        imq.persist.jdbc.mssql.user=imq
        imq.persist.jdbc.mssql.password=imqroot
        imq.persist.jdbc.mssql.property.url=jdbc\:sqlserver\://<hostname>\:1433;databaseName=mqdb
        imq.persist.jdbc.mssql.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
        imq.persist.jdbc.opendburl=jdbc\:sqlserver\://<hostname>\:1433;databaseName=mqdb
        #
        imq.cluster.heartbeat.interval=2
        imq.cluster.heartbeat.threshold=2
        imq.cluster.monitor.interval=5
        imq.cluster.monitor.threshold=1

        1. Properties to define the tables used by the broker. Do not modify the schema.
        1. Version Table
          imq.persist.jdbc.mssql.table.MQVER41=\
          CREATE TABLE $ {name} (\
          STORE_VERSION INTEGER NOT NULL,\
          LOCK_ID VARCHAR(100),\
          PRIMARY KEY(STORE_VERSION))

          # Configuration change record table
          imq.persist.jdbc.mssql.table.MQCREC41=\
          CREATE TABLE ${name}

          (\
          RECORD VARBINARY(1024) NOT NULL,\
          CREATED_TS BIGINT NOT NULL)

        1. Broker table
          imq.persist.jdbc.mssql.table.MQBKR41=\
          CREATE TABLE $ {name} (\
          ID VARCHAR(100) NOT NULL,\
          URL VARCHAR(100) NOT NULL,\
          VERSION INT NOT NULL,\
          STATE INT NOT NULL,\
          TAKEOVER_BROKER VARCHAR(100),\
          HEARTBEAT_TS BIGINT,\
          PRIMARY KEY(ID))

          # Store session table
          imq.persist.jdbc.mssql.table.MQSES41=\
          CREATE TABLE ${name}

          (\
          ID BIGINT NOT NULL,\
          BROKER_ID VARCHAR(100) NOT NULL,\
          IS_CURRENT INT NOT NULL,\
          CREATED_BY VARCHAR(100) NOT NULL,\
          CREATED_TS BIGINT NOT NULL,\
          PRIMARY KEY(ID))

        imq.persist.jdbc.mssql.table.MQSES41.index.IDX1=\
        CREATE INDEX $

        {index} ON ${name} (\
        BROKER_ID)

        # Destination table
        imq.persist.jdbc.mssql.table.MQDST41=\
        CREATE TABLE ${name} (\
        ID VARCHAR(100) NOT NULL,\
        DESTINATION VARBINARY(1024) NOT NULL,\
        IS_LOCAL INT NOT NULL,\
        CONNECTION_ID BIGINT,\
        CONNECTED_TS BIGINT,\
        STORE_SESSION_ID BIGINT,\
        CREATED_TS BIGINT NOT NULL,\
        PRIMARY KEY(ID))
        imq.persist.jdbc.mssql.table.MQDST41.index.IDX1=\
        CREATE INDEX ${index}

        ON $

        {name} (\
        STORE_SESSION_ID)

        # Interest (consumer) table
        imq.persist.jdbc.mssql.table.MQCON41=\
        CREATE TABLE ${name}

        (\
        ID BIGINT NOT NULL,\
        CLIENT_ID VARCHAR(1024),\
        DURABLE_NAME VARCHAR(1024),\
        CONSUMER VARBINARY(1024) NOT NULL,\
        CREATED_TS BIGINT NOT NULL,\
        PRIMARY KEY(ID))

        1. Interest list (consumer state) table
          imq.persist.jdbc.mssql.table.MQCONSTATE41=\
          CREATE TABLE $ {name} (\
          MESSAGE_ID VARCHAR(100) NOT NULL,\
          CONSUMER_ID BIGINT NOT NULL,\
          STATE INT,\
          TRANSACTION_ID BIGINT,\
          CREATED_TS BIGINT NOT NULL,\
          PRIMARY KEY(MESSAGE_ID, CONSUMER_ID))

          imq.persist.jdbc.mssql.table.MQCONSTATE41.index.IDX1=\
          CREATE INDEX ${index} ON ${name}

          (\
          TRANSACTION_ID)

        imq.persist.jdbc.mssql.table.MQCONSTATE41.index.IDX2=\
        CREATE INDEX $

        {index} ON ${name} (\
        MESSAGE_ID)

        # Message table
        imq.persist.jdbc.mssql.table.MQMSG41=\
        CREATE TABLE ${name} (\
        ID VARCHAR(100) NOT NULL,\
        MESSAGE VARBINARY(2048) NOT NULL,\
        MESSAGE_SIZE INT,\
        STORE_SESSION_ID BIGINT NOT NULL,\
        DESTINATION_ID VARCHAR(100),\
        TRANSACTION_ID BIGINT,\
        CREATED_TS BIGINT NOT NULL,\
        PRIMARY KEY(ID))

        imq.persist.jdbc.mssql.table.MQMSG41.index.IDX1=\
        CREATE INDEX ${index}

        ON $

        {name} (\
        STORE_SESSION_ID, DESTINATION_ID)

        # Property table
        imq.persist.jdbc.mssql.table.MQPROP41=\
        CREATE TABLE ${name}

        (\
        PROPNAME VARCHAR(100) NOT NULL,\
        PROPVALUE VARBINARY(1024),\
        PRIMARY KEY(PROPNAME))

        1. Transaction table
          imq.persist.jdbc.mssql.table.MQTXN41=\
          CREATE TABLE $ {name} (\
          ID BIGINT NOT NULL,\
          TYPE INT NOT NULL,\
          STATE INT,\
          AUTO_ROLLBACK INT NOT NULL,\
          XID VARCHAR(256),\
          TXN_STATE VARBINARY(1024) NOT NULL,\
          TXN_HOME_BROKER VARBINARY(1024),\
          TXN_BROKERS VARBINARY(1024),\
          STORE_SESSION_ID BIGINT NOT NULL,\
          EXPIRED_TS BIGINT NOT NULL,\
          ACCESSED_TS BIGINT NOT NULL,\
          PRIMARY KEY(ID))

          imq.persist.jdbc.mssql.table.MQTXN41.index.IDX1=\
          CREATE INDEX ${index} ON ${name}

          (\
          STORE_SESSION_ID)

        1. JMS Bridge TM LogRecord table
          imq.persist.jdbc.mssql.table.MQTMLRJMSBG41=\
          CREATE TABLE $ {name} (\
          XID VARCHAR(256) NOT NULL,\
          LOG_RECORD VARBINARY(1024) NOT NULL,\
          NAME VARCHAR(100) NOT NULL,\
          BROKER_ID VARCHAR(100) NOT NULL,\
          CREATED_TS BIGINT NOT NULL,\
          UPDATED_TS BIGINT NOT NULL,\
          PRIMARY KEY(XID))

          imq.persist.jdbc.mssql.table.MQTMLRJMSBG41.index.IDX1=\
          CREATE INDEX ${index} ON ${name}

          (BROKER_ID)

        imq.persist.jdbc.mssql.table.MQTMLRJMSBG41.index.IDX2=\
        CREATE INDEX $

        {index}

        ON $

        {name} (NAME)

        # JMS Bridges table
        imq.persist.jdbc.mssql.table.MQJMSBG41=\
        CREATE TABLE ${name}

        (\
        NAME VARCHAR(100) NOT NULL,\
        BROKER_ID VARCHAR(100) NOT NULL,\
        CREATED_TS BIGINT NOT NULL,\
        UPDATED_TS BIGINT NOT NULL,\
        PRIMARY KEY(NAME))

        2. Broker failed to start with the following error:

        [#|2013-05-03T20:53:54.563+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbcimq.persist.jdbc.connection.retry.delay=5000

        #]

        [#|2013-05-03T20:53:54.564+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|imq.persist.jdbc.mssql.driver=com.microsoft.sqlserver.jdbc.SQLServerDrive r

        #]

        [#|2013-05-03T20:53:54.564+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|imq.persist.jdbc.opendburl=jdbc:sqlserver://<hostname>:1433 ;databaseName=mqdb

        #]

        [#|2013-05-03T20:53:54.564+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.mssql.connection.retry.regex=(?s).*

        #]

        [#|2013-05-03T20:53:54.710+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.validateOnGet=true

        #]

        [#|2013-05-03T20:53:54.711+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.timeoutIdle=true

        #]

        [#|2013-05-03T20:53:54.711+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.reaptime=300

        #]

        [#|2013-05-03T20:53:54.712+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.min_connections=5

        #]

        [#|2013-05-03T20:53:54.712+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.max_connections=5

        #]

        [#|2013-05-03T20:53:55.663+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|Microsoft SQL Server, 11.00.2100, 4.0.2206.100

        #]

        [#|2013-05-03T20:53:55.664+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|Using plugged-in persistent store:
        version=410
        brokerid=b2
        database connection url=jdbc:sqlserver://<hostname>:1433;d atabaseName=mqdb
        database user=imq

        #]

        [#|2013-05-03T20:53:55.664+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1170]: Auto Creation of plugged-in persistent store is enabled

        #]

        [#|2013-05-03T20:53:56.756+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1486]: Store session reaper thread has been scheduled[delay=289561, peri od=86400000]

        #]

        [#|2013-05-03T20:53:56.757+0000|WARNING|5.0|imq.log.Logger|_ThreadID=1;_ThreadNa me=main;|WARNING [B2219]: Broker property setting imq.persist.file.newTxnLog.ena bled=true will be ignored

        #]

        [#|2013-05-03T20:53:57.355+0000|WARNING|5.0|imq.log.Logger|_ThreadID=1;_ThreadNa me=main;|WARNING [B2108]: Resetting a broker in HA mode will only reset messages owned by that broker, to clear all messages in the cluster use imqdbmgr recreat e tbl

        #]

        [#|2013-05-03T20:53:57.355+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.minimizeWrites=true

        #]

        [#|2013-05-03T20:53:57.357+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1204]: Starting HA Monitor Service

        #]

        [#|2013-05-03T20:53:57.359+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1206]: Monitor service initializing for brokerid b2 at mq://10.242.88.11 2:8002/

        #]

        [#|2013-05-03T20:53:57.359+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.cluster.monitor.interval=5

        #]

        [#|2013-05-03T20:53:57.360+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.cluster.monitor.threshold=1

        #]

        [#|2013-05-03T20:53:57.968+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1193]: Broker has started using a store session of 8664712842403238656 a nd a broker session of 8664712842403238656

        #]

        [#|2013-05-03T20:53:57.970+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1205]: Starting HA Heartbeat Service

        #]

        [#|2013-05-03T20:53:57.979+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1187]: Heartbeat service binds to slc03lib.us.oracle.com/10.242.88.112:8 002

        #]

        [#|2013-05-03T20:53:57.981+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1004]: Starting the heartbeat service using udp ( slc03lib.us.oracle.com /10.242.88.112:8002 ) with min threads 1 and max threads of 1

        #]

        [#|2013-05-03T20:53:58.054+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1041]: Cluster initialization successful.

        #]

        [#|2013-05-03T20:53:58.094+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1013]: Auto Creation of Queues is enabled

        #]

        [#|2013-05-03T20:53:58.124+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1136]: Processing stored transactions

        #]

        [#|2013-05-03T20:53:58.183+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1284]: 0 cluster transactions remain in PREPARED state, 0 in COMMITTED s tate waiting for remote broker completion

        #]

        [#|2013-05-03T20:53:58.260+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|Of 0 remote transactions, 0 in PREPARED state, 0 in COMPLETE state, 0 in C OMMITTED state

        #]

        [#|2013-05-03T20:53:58.261+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1390]: Loading of transactions has been successfully completed

        #]

        [#|2013-05-03T20:53:58.262+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1434]: Retrieving stored destinations

        #]

        [#|2013-05-03T20:53:58.343+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1503]: Retrieved 0 destinations from store

        #]

        [#|2013-05-03T20:53:58.345+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1144]: Creating Dead Message Queue

        #]

        [#|2013-05-03T20:53:58.411+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1158]: Administrator has created destination mq.sys.dmq [Queue]

        #]

        [#|2013-05-03T20:53:58.539+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1431]: Database connection 0x1636823 got exception com.sun.messaging.jmq .jmsserver.persist.jdbc.comm.MQSQLException: [INSERT INTO MQDST41CmqCluster ( ID , DESTINATION, IS_LOCAL, CONNECTION_ID, CONNECTED_TS, STORE_SESSION_ID, CREATED_ TS) VALUES ( ?, ?, ?, ?, ?, ?, ? )]: String or binary data would be truncated.[2 2001, 8152], will be destroyed(dbp)

        #]

        [#|2013-05-03T20:53:58.540+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|[B1345]: Destroy an active database connection [Connection:0x1636823, com. sun.messaging.jmq.jmsserver.util.BrokerException: [B4014]: Failed to persist des tination Q:mq.sys.dmq] because of com.sun.messaging.jmq.jmsserver.util.BrokerExc eption: [B4014]: Failed to persist destination Q:mq.sys.dmq (dbp)

        #]

        [#|2013-05-03T20:53:58.600+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|Exception running broker :
        java.lang.NullPointerException
        at com.sun.messaging.jmq.jmsserver.core.DestinationList.createDMQ(Destin ationList.java:548)
        at com.sun.messaging.jmq.jmsserver.core.DestinationList.loadDestinations (DestinationList.java:1662)
        at com.sun.messaging.jmq.jmsserver.core.DestinationList.init(Destination List.java:2720)
        at com.sun.messaging.jmq.jmsserver.core.CoreLifecycleImpl.initDestinatio ns(CoreLifecycleImpl.java:110)
        at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1233)
        at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:447)
        at com.sun.messaging.jmq.jmsserver.Broker.brokerMain(Broker.java:2186)
        at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:2164)

        #]
        Show
        saradak added a comment - The original NPE is fixed but there is another NPE when starting the HA broker cluster with msserver. Steps to produce the problem: 1. Start broker b1(port=8001) & b2(port=8002) in HA cluster with the following properties imq.instanceconfig.version=300 imq.portmapper.port=brokerportno imq.brokerid=brokername # imq.cluster.ha=true imq.cluster.clusterid=mqCluster # imq.persist.store=jdbc imq.persist.jdbc.dbVendor=mssql imq.persist.jdbc.mssql.user=imq imq.persist.jdbc.mssql.password=imqroot imq.persist.jdbc.mssql.property.url=jdbc\:sqlserver\://<hostname>\:1433;databaseName=mqdb imq.persist.jdbc.mssql.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver imq.persist.jdbc.opendburl=jdbc\:sqlserver\://<hostname>\:1433;databaseName=mqdb # imq.cluster.heartbeat.interval=2 imq.cluster.heartbeat.threshold=2 imq.cluster.monitor.interval=5 imq.cluster.monitor.threshold=1 Properties to define the tables used by the broker. Do not modify the schema. Version Table imq.persist.jdbc.mssql.table.MQVER41=\ CREATE TABLE $ {name} (\ STORE_VERSION INTEGER NOT NULL,\ LOCK_ID VARCHAR(100),\ PRIMARY KEY(STORE_VERSION)) # Configuration change record table imq.persist.jdbc.mssql.table.MQCREC41=\ CREATE TABLE ${name} (\ RECORD VARBINARY(1024) NOT NULL,\ CREATED_TS BIGINT NOT NULL) Broker table imq.persist.jdbc.mssql.table.MQBKR41=\ CREATE TABLE $ {name} (\ ID VARCHAR(100) NOT NULL,\ URL VARCHAR(100) NOT NULL,\ VERSION INT NOT NULL,\ STATE INT NOT NULL,\ TAKEOVER_BROKER VARCHAR(100),\ HEARTBEAT_TS BIGINT,\ PRIMARY KEY(ID)) # Store session table imq.persist.jdbc.mssql.table.MQSES41=\ CREATE TABLE ${name} (\ ID BIGINT NOT NULL,\ BROKER_ID VARCHAR(100) NOT NULL,\ IS_CURRENT INT NOT NULL,\ CREATED_BY VARCHAR(100) NOT NULL,\ CREATED_TS BIGINT NOT NULL,\ PRIMARY KEY(ID)) imq.persist.jdbc.mssql.table.MQSES41.index.IDX1=\ CREATE INDEX $ {index} ON ${name} (\ BROKER_ID) # Destination table imq.persist.jdbc.mssql.table.MQDST41=\ CREATE TABLE ${name} (\ ID VARCHAR(100) NOT NULL,\ DESTINATION VARBINARY(1024) NOT NULL,\ IS_LOCAL INT NOT NULL,\ CONNECTION_ID BIGINT,\ CONNECTED_TS BIGINT,\ STORE_SESSION_ID BIGINT,\ CREATED_TS BIGINT NOT NULL,\ PRIMARY KEY(ID)) imq.persist.jdbc.mssql.table.MQDST41.index.IDX1=\ CREATE INDEX ${index} ON $ {name} (\ STORE_SESSION_ID) # Interest (consumer) table imq.persist.jdbc.mssql.table.MQCON41=\ CREATE TABLE ${name} (\ ID BIGINT NOT NULL,\ CLIENT_ID VARCHAR(1024),\ DURABLE_NAME VARCHAR(1024),\ CONSUMER VARBINARY(1024) NOT NULL,\ CREATED_TS BIGINT NOT NULL,\ PRIMARY KEY(ID)) Interest list (consumer state) table imq.persist.jdbc.mssql.table.MQCONSTATE41=\ CREATE TABLE $ {name} (\ MESSAGE_ID VARCHAR(100) NOT NULL,\ CONSUMER_ID BIGINT NOT NULL,\ STATE INT,\ TRANSACTION_ID BIGINT,\ CREATED_TS BIGINT NOT NULL,\ PRIMARY KEY(MESSAGE_ID, CONSUMER_ID)) imq.persist.jdbc.mssql.table.MQCONSTATE41.index.IDX1=\ CREATE INDEX ${index} ON ${name} (\ TRANSACTION_ID) imq.persist.jdbc.mssql.table.MQCONSTATE41.index.IDX2=\ CREATE INDEX $ {index} ON ${name} (\ MESSAGE_ID) # Message table imq.persist.jdbc.mssql.table.MQMSG41=\ CREATE TABLE ${name} (\ ID VARCHAR(100) NOT NULL,\ MESSAGE VARBINARY(2048) NOT NULL,\ MESSAGE_SIZE INT,\ STORE_SESSION_ID BIGINT NOT NULL,\ DESTINATION_ID VARCHAR(100),\ TRANSACTION_ID BIGINT,\ CREATED_TS BIGINT NOT NULL,\ PRIMARY KEY(ID)) imq.persist.jdbc.mssql.table.MQMSG41.index.IDX1=\ CREATE INDEX ${index} ON $ {name} (\ STORE_SESSION_ID, DESTINATION_ID) # Property table imq.persist.jdbc.mssql.table.MQPROP41=\ CREATE TABLE ${name} (\ PROPNAME VARCHAR(100) NOT NULL,\ PROPVALUE VARBINARY(1024),\ PRIMARY KEY(PROPNAME)) Transaction table imq.persist.jdbc.mssql.table.MQTXN41=\ CREATE TABLE $ {name} (\ ID BIGINT NOT NULL,\ TYPE INT NOT NULL,\ STATE INT,\ AUTO_ROLLBACK INT NOT NULL,\ XID VARCHAR(256),\ TXN_STATE VARBINARY(1024) NOT NULL,\ TXN_HOME_BROKER VARBINARY(1024),\ TXN_BROKERS VARBINARY(1024),\ STORE_SESSION_ID BIGINT NOT NULL,\ EXPIRED_TS BIGINT NOT NULL,\ ACCESSED_TS BIGINT NOT NULL,\ PRIMARY KEY(ID)) imq.persist.jdbc.mssql.table.MQTXN41.index.IDX1=\ CREATE INDEX ${index} ON ${name} (\ STORE_SESSION_ID) JMS Bridge TM LogRecord table imq.persist.jdbc.mssql.table.MQTMLRJMSBG41=\ CREATE TABLE $ {name} (\ XID VARCHAR(256) NOT NULL,\ LOG_RECORD VARBINARY(1024) NOT NULL,\ NAME VARCHAR(100) NOT NULL,\ BROKER_ID VARCHAR(100) NOT NULL,\ CREATED_TS BIGINT NOT NULL,\ UPDATED_TS BIGINT NOT NULL,\ PRIMARY KEY(XID)) imq.persist.jdbc.mssql.table.MQTMLRJMSBG41.index.IDX1=\ CREATE INDEX ${index} ON ${name} (BROKER_ID) imq.persist.jdbc.mssql.table.MQTMLRJMSBG41.index.IDX2=\ CREATE INDEX $ {index} ON $ {name} (NAME) # JMS Bridges table imq.persist.jdbc.mssql.table.MQJMSBG41=\ CREATE TABLE ${name} (\ NAME VARCHAR(100) NOT NULL,\ BROKER_ID VARCHAR(100) NOT NULL,\ CREATED_TS BIGINT NOT NULL,\ UPDATED_TS BIGINT NOT NULL,\ PRIMARY KEY(NAME)) 2. Broker failed to start with the following error: [#|2013-05-03T20:53:54.563+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbcimq.persist.jdbc.connection.retry.delay=5000 #] [#|2013-05-03T20:53:54.564+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|imq.persist.jdbc.mssql.driver=com.microsoft.sqlserver.jdbc.SQLServerDrive r #] [#|2013-05-03T20:53:54.564+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|imq.persist.jdbc.opendburl=jdbc:sqlserver://<hostname>:1433 ;databaseName=mqdb #] [#|2013-05-03T20:53:54.564+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.mssql.connection.retry.regex=(?s).* #] [#|2013-05-03T20:53:54.710+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.validateOnGet=true #] [#|2013-05-03T20:53:54.711+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.timeoutIdle=true #] [#|2013-05-03T20:53:54.711+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.connection.reaptime=300 #] [#|2013-05-03T20:53:54.712+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.min_connections=5 #] [#|2013-05-03T20:53:54.712+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.jdbc.max_connections=5 #] [#|2013-05-03T20:53:55.663+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|Microsoft SQL Server, 11.00.2100, 4.0.2206.100 #] [#|2013-05-03T20:53:55.664+0000|FORCE|5.0|imq.log.Logger|_ThreadID=1;_ThreadName =main;|Using plugged-in persistent store: version=410 brokerid=b2 database connection url=jdbc:sqlserver://<hostname>:1433;d atabaseName=mqdb database user=imq #] [#|2013-05-03T20:53:55.664+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1170] : Auto Creation of plugged-in persistent store is enabled #] [#|2013-05-03T20:53:56.756+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1486] : Store session reaper thread has been scheduled [delay=289561, peri od=86400000] #] [#|2013-05-03T20:53:56.757+0000|WARNING|5.0|imq.log.Logger|_ThreadID=1;_ThreadNa me=main;|WARNING [B2219] : Broker property setting imq.persist.file.newTxnLog.ena bled=true will be ignored #] [#|2013-05-03T20:53:57.355+0000|WARNING|5.0|imq.log.Logger|_ThreadID=1;_ThreadNa me=main;|WARNING [B2108] : Resetting a broker in HA mode will only reset messages owned by that broker, to clear all messages in the cluster use imqdbmgr recreat e tbl #] [#|2013-05-03T20:53:57.355+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.persist.minimizeWrites=true #] [#|2013-05-03T20:53:57.357+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1204] : Starting HA Monitor Service #] [#|2013-05-03T20:53:57.359+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1206] : Monitor service initializing for brokerid b2 at mq://10.242.88.11 2:8002/ #] [#|2013-05-03T20:53:57.359+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.cluster.monitor.interval=5 #] [#|2013-05-03T20:53:57.360+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|imq.cluster.monitor.threshold=1 #] [#|2013-05-03T20:53:57.968+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1193] : Broker has started using a store session of 8664712842403238656 a nd a broker session of 8664712842403238656 #] [#|2013-05-03T20:53:57.970+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1205] : Starting HA Heartbeat Service #] [#|2013-05-03T20:53:57.979+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1187] : Heartbeat service binds to slc03lib.us.oracle.com/10.242.88.112:8 002 #] [#|2013-05-03T20:53:57.981+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1004] : Starting the heartbeat service using udp ( slc03lib.us.oracle.com /10.242.88.112:8002 ) with min threads 1 and max threads of 1 #] [#|2013-05-03T20:53:58.054+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1041] : Cluster initialization successful. #] [#|2013-05-03T20:53:58.094+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1013] : Auto Creation of Queues is enabled #] [#|2013-05-03T20:53:58.124+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1136] : Processing stored transactions #] [#|2013-05-03T20:53:58.183+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1284] : 0 cluster transactions remain in PREPARED state, 0 in COMMITTED s tate waiting for remote broker completion #] [#|2013-05-03T20:53:58.260+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|Of 0 remote transactions, 0 in PREPARED state, 0 in COMPLETE state, 0 in C OMMITTED state #] [#|2013-05-03T20:53:58.261+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1390] : Loading of transactions has been successfully completed #] [#|2013-05-03T20:53:58.262+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1434] : Retrieving stored destinations #] [#|2013-05-03T20:53:58.343+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1503] : Retrieved 0 destinations from store #] [#|2013-05-03T20:53:58.345+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1144] : Creating Dead Message Queue #] [#|2013-05-03T20:53:58.411+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1158] : Administrator has created destination mq.sys.dmq [Queue] #] [#|2013-05-03T20:53:58.539+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1431] : Database connection 0x1636823 got exception com.sun.messaging.jmq .jmsserver.persist.jdbc.comm.MQSQLException: [INSERT INTO MQDST41CmqCluster ( ID , DESTINATION, IS_LOCAL, CONNECTION_ID, CONNECTED_TS, STORE_SESSION_ID, CREATED_ TS) VALUES ( ?, ?, ?, ?, ?, ?, ? )] : String or binary data would be truncated. [2 2001, 8152] , will be destroyed(dbp) #] [#|2013-05-03T20:53:58.540+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;| [B1345] : Destroy an active database connection [Connection:0x1636823, com. sun.messaging.jmq.jmsserver.util.BrokerException: [B4014] : Failed to persist des tination Q:mq.sys.dmq] because of com.sun.messaging.jmq.jmsserver.util.BrokerExc eption: [B4014] : Failed to persist destination Q:mq.sys.dmq (dbp) #] [#|2013-05-03T20:53:58.600+0000|INFO|5.0|imq.log.Logger|_ThreadID=1;_ThreadName= main;|Exception running broker : java.lang.NullPointerException at com.sun.messaging.jmq.jmsserver.core.DestinationList.createDMQ(Destin ationList.java:548) at com.sun.messaging.jmq.jmsserver.core.DestinationList.loadDestinations (DestinationList.java:1662) at com.sun.messaging.jmq.jmsserver.core.DestinationList.init(Destination List.java:2720) at com.sun.messaging.jmq.jmsserver.core.CoreLifecycleImpl.initDestinatio ns(CoreLifecycleImpl.java:110) at com.sun.messaging.jmq.jmsserver.Broker._start(Broker.java:1233) at com.sun.messaging.jmq.jmsserver.Broker.start(Broker.java:447) at com.sun.messaging.jmq.jmsserver.Broker.brokerMain(Broker.java:2186) at com.sun.messaging.jmq.jmsserver.Broker.main(Broker.java:2164) #]
        Hide
        amyk added a comment -

        The 2nd NPE is fixed in 5.0.1. The NPE is triggered by following SQLException when storing the DMQ to the user defined MQDST41 table

        SQLException: [INSERT INTO MQDST41Ca5 ( ID, DESTINATION, IS_LOCAL, CONNECTION_ID, CONNECTED_TS, STORE_SESSION_ID, CREATED_TS) VALUES ( ?, ?, ?, ?, ?, ?, ? )]: String or binary data would be truncated.[22001, 8152]

        This SQLException is caused by too small size of DESTINATION column - 1024. Debugging shows that the Destination object to be stored, after serialization, has size=1153 (pos=2 mq.sys.dmq [Queue]). Increasing this column's size to 2048 works.

        imq.persist.jdbc.mssql.table.MQDST41=\
        .....
        DESTINATION VARBINARY(1024) NOT NULL,\

        Show
        amyk added a comment - The 2nd NPE is fixed in 5.0.1. The NPE is triggered by following SQLException when storing the DMQ to the user defined MQDST41 table SQLException: [INSERT INTO MQDST41Ca5 ( ID, DESTINATION, IS_LOCAL, CONNECTION_ID, CONNECTED_TS, STORE_SESSION_ID, CREATED_TS) VALUES ( ?, ?, ?, ?, ?, ?, ? )] : String or binary data would be truncated. [22001, 8152] This SQLException is caused by too small size of DESTINATION column - 1024. Debugging shows that the Destination object to be stored, after serialization, has size=1153 (pos=2 mq.sys.dmq [Queue] ). Increasing this column's size to 2048 works. imq.persist.jdbc.mssql.table.MQDST41=\ ..... DESTINATION VARBINARY(1024) NOT NULL,\

          People

          • Assignee:
            amyk
            Reporter:
            amyk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: