Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3804

NullPointerException logged every 30 seconds while attempting to clear expired messages

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.6.0
    • 5.6.0
    • Message Store
    • None
    • Windows XP SP3

    Description

      this is a duplicate of AMQ-3677 which was marked resolved. however i am still noticing this issue using the 5.6 snapshot release from apr 11, 2012. in this case activemq server was shutdown by terminating the java process. when the server is started again, following exception is logged every 30 seconds:

      2012-04-11 14:06:53,786 org.apache.activemq.broker.region.Topic[ActiveMQ Broker[ZyrionMessageBus] Scheduler]: (ERROR) (   Topic.java:683) Failed to remove expired Message from the store 
      java.lang.NullPointerException
      	at org.apache.activemq.store.kahadb.MessageDatabase.removeAckLocation(MessageDatabase.java:2005)
      	at org.apache.activemq.store.kahadb.MessageDatabase.updateIndex(MessageDatabase.java:1259)
      	at org.apache.activemq.store.kahadb.MessageDatabase$15.execute(MessageDatabase.java:1046)
      	at org.apache.kahadb.page.Transaction.execute(Transaction.java:769)
      	at org.apache.activemq.store.kahadb.MessageDatabase.process(MessageDatabase.java:1044)
      	at org.apache.activemq.store.kahadb.MessageDatabase$13.visit(MessageDatabase.java:977)
      	at org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand.visit(KahaRemoveMessageCommand.java:220)
      	at org.apache.activemq.store.kahadb.MessageDatabase.process(MessageDatabase.java:969)
      	at org.apache.activemq.store.kahadb.MessageDatabase.store(MessageDatabase.java:881)
      	at org.apache.activemq.store.kahadb.MessageDatabase.store(MessageDatabase.java:863)
      	at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBTopicMessageStore.doAcknowledge(KahaDBStore.java:715)
      	at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBTopicMessageStore.acknowledge(KahaDBStore.java:701)
      	at org.apache.activemq.store.kahadb.KahaDBTransactionStore.acknowledge(KahaDBTransactionStore.java:519)
      	at org.apache.activemq.store.kahadb.KahaDBTransactionStore$2.acknowledge(KahaDBTransactionStore.java:222)
      	at org.apache.activemq.broker.region.Topic.acknowledge(Topic.java:489)
      	at org.apache.activemq.broker.region.Topic.messageExpired(Topic.java:681)
      	at org.apache.activemq.broker.region.Topic.doBrowse(Topic.java:562)
      	at org.apache.activemq.broker.region.Topic.access$100(Topic.java:62)
      	at org.apache.activemq.broker.region.Topic$6.run(Topic.java:662)
      	at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
      	at java.util.TimerThread.mainLoop(Unknown Source)
      	at java.util.TimerThread.run(Unknown Source)
      

      here is the server configuration:

      <beans
          xmlns="http://www.springframework.org/schema/beans"
          xmlns:amq="http://activemq.apache.org/schema/core"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
          http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
      
        <!-- Allows us to use system properties as variables in this configuration file -->
        <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
        
        <!-- Configure the ActiveMQ broker -->
        <broker
            xmlns="http://activemq.apache.org/schema/core"
            brokerName="ZyrionMessageBus" 
            useJmx="false"
            dataDirectory="${activemq.base}/../../utils/spool/jms"
            deleteAllMessagesOnStartup="false"
            advisorySupport="false"
            offlineDurableSubscriberTimeout="7200000"
            offlineDurableSubscriberTaskSchedule="1800000">
      
          [...]
      
          <!-- Configure message persistence for the broker -->
          <persistenceAdapter>
            <kahaDB directory="${activemq.base}/../../utils/spool/jms/kahadb" ignoreMissingJournalfiles="true" checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
          </persistenceAdapter>
      

      i can provide a copy of the kahadb directory if necessary to duplicate the issue. let me know if you require any additional information. thanks

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rajdavies Robert Davies
            rajib_rashid Rajib Rashid
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment