NullPointerException when producer sends message to a Composite Queue

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException when producer sends message to a Composite Queue

Al_C
We're trying to implement a composite queue on SwiftMQ 9.3.0 and we're seeing a NullPointerException when we try to put a message on the queue. We're treating the composite queue like a regular queue as far as message producing goes.

I looked through the change logs on newer releases but didn't see anything for composite queues in the bug fixes. We see a panic in the error log and this stack trace is sent to standard out/error. Are we doing something wrong or is this a bug?

java.lang.NullPointerException
        at com.swiftmq.impl.queue.standard.composite.c.done(Unknown Source)
        at com.swiftmq.tools.concurrent.AsyncCompletionCallback.notifyCallbackStack(Unknown Source)
        at com.swiftmq.impl.store.standard.log.LogManager.process(Unknown Source)
        at com.swiftmq.tools.queue.SingleProcessorQueue.dequeue(Unknown Source)
        at com.swiftmq.impl.store.standard.log.b.run(Unknown Source)
        at com.swiftmq.impl.threadpool.standard.PoolThread.run(Unknown Source)
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
Can you post your configuration, please
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
Here you go.


<?xml version="1.0" encoding="UTF-8"?>

<router name="router1" kernelpath="../../kernel" release="09.03.00" startorder="sys$log sys$authentication sys$threadpool sys$timer sys$net sys$store sys$queuemanager sys$topicmanager sys$accounting sys$mgmt sys$xa sys$routing sys$jndi sys$jms sys$amqp sys$deploy sys$jac sys$scheduler sys$monitor">

 

  <swiftlet name="sys$accounting">
    <connections/>
  </swiftlet>

 

  <swiftlet name="sys$amqp">
    <declarations>
      <connection-templates>
        <connection-template name="ssl" socketfactory-class="com.swiftmq.net.JSSESocketFactory"/>
      </connection-templates>
      <transformer>
        <default-inbound-transformers>
          <default-inbound-transformer name="0">
            <properties/>
          </default-inbound-transformer>
        </default-inbound-transformers>
        <default-outbound-transformers>
          <default-outbound-transformer name="0">
            <properties/>
          </default-outbound-transformer>
        </default-outbound-transformers>
        <destination-transformers/>
      </transformer>
    </declarations>
    <listeners>
      <listener name="amqp">
        <host-access-list/>
      </listener>
      <listener name="amqps" connection-template="ssl" port="5671">
        <host-access-list/>
      </listener>
    </listeners>
  </swiftlet>

 

  <swiftlet name="sys$authentication">
    <groups>
      <group name="admin">
        <queue-grants>
          <queue-grant name="swiftmqmgmt" browse-grant="false" receive-grant="false"/>
          <queue-grant name="swiftmqmgmt@router2" browse-grant="false" receive-grant="false"/>
        </queue-grants>
        <topic-grants/>
      </group>
      <group name="public">
        <queue-grants>
          <queue-grant name="testqueue"/>
        </queue-grants>
        <topic-grants>
          <topic-grant name="swiftmq.jndi" durable-grant="false" subscribe-grant="false"/>
          <topic-grant name="testtopic"/>
        </topic-grants>
      </group>
    </groups>
    <resource-limit-groups>
      <resource-limit-group name="public"/>
    </resource-limit-groups>
    <users>
      <user name="admin" group="admin" password="secret">
        <host-access-list/>
      </user>
    </users>
  </swiftlet>

 

  <swiftlet name="sys$deploy">
    <deploy-spaces>
      <deploy-space name="extension-swiftlets" path="../../deploy/router1"/>
      <deploy-space name="jms-app" path="../../jmsapp/router1"/>
    </deploy-spaces>
  </swiftlet>

 

  <swiftlet name="sys$jac">
    <static-containers/>
  </swiftlet>

 

  <swiftlet name="sys$jms">
    <intravm-connection-factories>
      <intravm-connection-factory name="IVMConnectionFactory"/>
      <intravm-connection-factory name="IVMQueueConnectionFactory"/>
      <intravm-connection-factory name="IVMTopicConnectionFactory"/>
    </intravm-connection-factories>
    <listeners>
      <listener name="plainsocket" port="4001">
        <connection-factories>
          <connection-factory name="ConnectionFactory"/>
          <connection-factory name="QueueConnectionFactory"/>
          <connection-factory name="TopicConnectionFactory"/>
          <connection-factory name="fasttimeout@router1" reconnect-delay="1000" reconnect-max-retries="200"/>
          <connection-factory name="noreconnect@router1"/>
          <connection-factory name="plainsocket@router1"/>
          <connection-factory name="plainsocket_appserver@router1" thread-context-classloader-for-getobject="true"/>
          <connection-factory name="plainsocket_recover@router1" smqp-consumer-cache-size="10"/>
        </connection-factories>
        <host-access-list/>
      </listener>
    </listeners>
  </swiftlet>

 

  <swiftlet name="sys$jndi">
    <aliases>
      <alias name="routerdlq" map-to="routerdlq@router1"/>
      <alias name="Events_Alertable_Events" map-to="Events_Alertable_Events@router1"/>
      <alias name="Alerts_Composite_Queue" map-to="Alerts_Composite_Queue@router1"/>
      <alias name="swiftmqmgmt" map-to="swiftmqmgmt@router1"/>
      <alias name="swiftmqscheduler" map-to="swiftmqscheduler@router1"/>
      <alias name="test_composite" map-to="test_composite@router1"/>
      <alias name="unroutable" map-to="unroutable@router1"/>
    </aliases>
    <jndi-replications/>
    <remote-queues>
      <remote-queue name="testqueue@router2"/>
    </remote-queues>
  </swiftlet>

 

  <swiftlet name="sys$log" logfile-error="../../log/router1/error.log" logfile-info="../../log/router1/info.log" logfile-warning="../../log/router1/warning.log"/>

 

  <swiftlet name="sys$mgmt">
    <jmx enabled="true">
      <mbean-server/>
    </jmx>
    <message-interface/>
  </swiftlet>

 

  <swiftlet name="sys$monitor">
    <connection/>
    <memory/>
    <queue/>
    <settingsmail/>
  </swiftlet>

 

  <swiftlet name="sys$net">
    <multicast/>
  </swiftlet>

 

  <swiftlet name="sys$queuemanager">
    <clustered-queues/>
    <composite-queues>
      <composite-queue name="Alerts_Composite_Queue">
        <queue-bindings>
          <queue-binding name="Events_Alertable_Events"/>
        </queue-bindings>
        <topic-bindings/>
      </composite-queue>
      <composite-queue name="test_composite">
        <queue-bindings/>
        <topic-bindings/>
      </composite-queue>
    </composite-queues>
    <queue-controllers>
      <queue-controller name="01" persistence-mode="non_persistent" predicate="tmp$%"/>
      <queue-controller name="02" predicate="sys$%"/>
      <queue-controller name="03" predicate="swiftmq%"/>
      <queue-controller name="04" predicate="rt$%"/>
      <queue-controller name="05" predicate="unroutable"/>
      <queue-controller name="06" predicate="%$%"/>
      <queue-controller name="07" predicate="routerdlq"/>
      <queue-controller name="08" predicate="%"/>
    </queue-controllers>
    <queues>
      <queue name="Events_Alertable_Events" cache-size="165000" duplicate-detection-backlog-size="100" flowcontrol-start-queuesize="-1"/>
    </queues>
  </swiftlet>

 

  <swiftlet name="sys$routing">
    <connectors/>
    <filters/>
    <listeners>
      <listener name="plainsocket" port="4100">
        <host-access-list/>
      </listener>
    </listeners>
    <static-routes>
      <static-route name="router2"/>
    </static-routes>
  </swiftlet>

 

  <swiftlet name="sys$scheduler">
    <calendars/>
    <schedules>
      <schedule name="Shrink page file (daily)" enabled="true" job-group="Store" job-name="Shrink" time-expression="at 01:00">
        <parameters/>
      </schedule>
    </schedules>
  </swiftlet>

 

  <swiftlet name="sys$store">
    <backup path="../../store/router1/backup"/>
    <cache/>
    <database path="../../store/router1/db"/>
    <durable-subscriber path="../../store/router1/durables"/>
    <swap path="../../store/router1/swap"/>
    <transaction-log path="../../store/router1/log"/>
  </swiftlet>

 

  <swiftlet name="sys$threadpool">
    <pools>
      <pool name="accounting.connections" kernel-pool="true">
        <threads>
          <thread name="sys$accounting.sourcerunner"/>
        </threads>
      </pool>
      <pool name="accounting.events" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$accounting.eventprocessor"/>
        </threads>
      </pool>
      <pool name="amqp.connection" kernel-pool="true" max-threads="5" min-threads="1">
        <threads>
          <thread name="sys$amqp.connection.service"/>
        </threads>
      </pool>
      <pool name="amqp.session" kernel-pool="true" max-threads="50" min-threads="1">
        <threads>
          <thread name="sys$amqp.sasl.service"/>
          <thread name="sys$amqp.session.service"/>
        </threads>
      </pool>
      <pool name="jac.runner" kernel-pool="true">
        <threads>
          <thread name="sys$jac.runner"/>
        </threads>
      </pool>
      <pool name="jms.connection" kernel-pool="true" max-threads="5" min-threads="5">
        <threads>
          <thread name="sys$jms.connection.service"/>
        </threads>
      </pool>
      <pool name="jms.ivm.client.connection" kernel-pool="true" max-threads="10">
        <threads>
          <thread name="sys$jms.client.connection.%"/>
        </threads>
      </pool>
      <pool name="jms.ivm.client.session" kernel-pool="true" max-threads="10">
        <threads>
          <thread name="sys$jms.client.session.%"/>
        </threads>
      </pool>
      <pool name="jms.session" kernel-pool="true" max-threads="100" min-threads="1">
        <threads>
          <thread name="sys$jms.session.service"/>
        </threads>
      </pool>
      <pool name="jndi" kernel-pool="true" max-threads="1" min-threads="1">
        <threads>
          <thread name="sys$jndi.listener"/>
        </threads>
      </pool>
      <pool name="mgmt" kernel-pool="true" max-threads="2">
        <threads>
          <thread name="sys$mgmt.%"/>
        </threads>
      </pool>
      <pool name="net.connection" kernel-pool="true">
        <threads>
          <thread name="sys$net.connection.handler"/>
        </threads>
      </pool>
      <pool name="net.connection.mgr" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$net.connection.mgr"/>
        </threads>
      </pool>
      <pool name="queue.cluster" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$queuemanager.cluster.subscriber"/>
        </threads>
      </pool>
      <pool name="queue.redispatcher" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$queuemanager.cluster.redispatcher"/>
        </threads>
      </pool>
      <pool name="queue.timeout" kernel-pool="true" max-threads="1" min-threads="1">
        <threads>
          <thread name="sys$queuemanager.timeoutprocessor"/>
        </threads>
      </pool>
      <pool name="routing.connection.mgr" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$routing.connection.mgr"/>
        </threads>
      </pool>
      <pool name="routing.exchanger" kernel-pool="true" max-threads="1">
        <threads>
          <thread name="sys$routing.route.exchanger"/>
        </threads>
      </pool>
      <pool name="routing.scheduler" kernel-pool="true" max-threads="3" min-threads="3">
        <threads>
          <thread name="sys$routing.scheduler"/>
        </threads>
      </pool>
      <pool name="routing.service" kernel-pool="true" max-threads="3" min-threads="3">
        <threads>
          <thread name="sys$routing.connection.service"/>
        </threads>
      </pool>
      <pool name="routing.throttle" kernel-pool="true" max-threads="3" min-threads="3">
        <threads>
          <thread name="sys$routing.connection.throttlequeue"/>
        </threads>
      </pool>
      <pool name="scheduler.job" kernel-pool="true">
        <threads>
          <thread name="sys$scheduler.runner"/>
        </threads>
      </pool>
      <pool name="scheduler.system" kernel-pool="true" max-threads="2">
        <threads>
          <thread name="sys$scheduler.requestprocessor"/>
          <thread name="sys$scheduler.scheduler"/>
        </threads>
      </pool>
      <pool name="store.log" kernel-pool="true" max-threads="1" min-threads="1">
        <threads>
          <thread name="sys$store.logmanager"/>
        </threads>
      </pool>
      <pool name="timer.dispatcher" kernel-pool="true" max-threads="1" min-threads="1">
        <threads>
          <thread name="sys$timer.dispatcher"/>
        </threads>
      </pool>
      <pool name="timer.tasks" kernel-pool="true" max-threads="3" min-threads="3">
        <threads>
          <thread name="sys$timer.task"/>
        </threads>
      </pool>
      <pool name="topic" kernel-pool="true" max-threads="2">
        <threads>
          <thread name="sys$topicmanager.topic.%"/>
        </threads>
      </pool>
    </pools>
  </swiftlet>

 

  <swiftlet name="sys$timer"/>

 

  <swiftlet name="sys$topicmanager">
    <slow-subscriber-conditions/>
    <static-remote-router-subscriptions/>
    <topics>
      <topic name="testtopic"/>
    </topics>
  </swiftlet>

 

  <swiftlet name="sys$trace">
    <spaces>
      <space name="kernel">
        <predicates>
          <predicate name="0" filename="../../trace/router1/manager.trace" value="%Manager"/>
          <predicate name="1" filename="../../trace/router1/net.trace" value="sys$net"/>
          <predicate name="10" filename="../../trace/router1/auth.trace" value="sys$auth%"/>
          <predicate name="11" filename="../../trace/router1/mgmt.trace" value="sys$mgmt%"/>
          <predicate name="12" filename="../../trace/router1/store.trace" value="sys$store"/>
          <predicate name="13" filename="../../trace/router1/xa.trace" value="sys$xa"/>
          <predicate name="14" filename="../../trace/router1/jac.trace" value="sys$jac"/>
          <predicate name="15" filename="../../trace/router1/timer.trace" value="sys$timer"/>
          <predicate name="16" filename="../../trace/router1/scheduler.trace" value="sys$scheduler"/>
          <predicate name="17" filename="../../trace/router1/monitor.trace" value="sys$monitor"/>
          <predicate name="18" filename="../../trace/router1/accounting.trace" value="sys$accounting"/>
          <predicate name="19" filename="../../trace/router1/amqp.trace" value="sys$amqp"/>
          <predicate name="2" filename="../../trace/router1/jms.trace" value="sys$jms"/>
          <predicate name="3" filename="../../trace/router1/deploy.trace" value="sys$deploy"/>
          <predicate name="4" filename="../../trace/router1/thread.trace" value="sys$thread%"/>
          <predicate name="5" filename="../../trace/router1/routing.trace" value="sys$rout%"/>
          <predicate name="6" filename="../../trace/router1/queuemanager.trace" value="sys$queue%"/>
          <predicate name="7" filename="../../trace/router1/topic.trace" value="sys$topic%"/>
          <predicate name="9" filename="../../trace/router1/jndi.trace" value="sys$jndi"/>
        </predicates>
      </space>
      <space name="protocol">
        <predicates>
          <predicate name="1" filename="../../trace/router1/protocol.trace" value="%"/>
        </predicates>
      </space>
      <space name="queue">
        <predicates>
          <predicate name="1" filename="../../trace/router1/queue.trace" value="%"/>
        </predicates>
      </space>
      <space name="swiftlet">
        <predicates>
          <predicate name="1" filename="../../trace/router1/swiftlet.trace" value="%"/>
        </predicates>
      </space>
    </spaces>
  </swiftlet>

 

  <swiftlet name="sys$xa"/>
</router>
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
You don't have queue bindings for "test_composite"...
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
All of our work was against Alerts_Composite_Queue. We did delete that test composite queue but it didn't seem to make a difference.

One thing we notice is that we seem to be able to actually put messages on the queue but we get the null pointer exception when we attempt to consume the second message from the queue. The first one seems to work.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
You consume from Events_Alertable_Events, right? If yes, I need to test it here.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
In reply to this post by Al_C
I've tested it with 9.6.0 on a composite queue ttt with a queue binding testqueue and works fine. Sending 100 msgs to ttt and consumed 100 msgs from testqueue.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
OK. We'll upgrade our server and see if that fixes the issue.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
In reply to this post by IIT Software
OK, we've got it working but we do see an issue. It looks like the queues bound to the composite queues cannot have an FC Start value of -1. In general we don't want flow control so we've always set FC Start to -1 and FC Delay to 0. When we leave FC Start at the default of 400 things work just fine, -1 will give us an NPE.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
We will verify it. If this is a bug, it will be fixed for the next release.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
In reply to this post by Al_C
That's a bug and is fixed for the next release. As a workaround specify a high value in fc start.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
Thanks! I'll let the team know.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

Al_C
In reply to this post by IIT Software
Also, a question from the people upstairs. What would be the ETA on the next release?
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
The current release 9.7.0 is quite fresh but we will provide a fix soon. You can workaround this bug with a high fc start value.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException when producer sends message to a Composite Queue

IIT Software
Administrator
In reply to this post by Al_C
This bug has been fixed in SwiftMQ 9.7.1.