ActiveMQ
  1. ActiveMQ
  2. AMQ-1383

org.apache.activemq.transport.InactivityMonitor$1 cannot be cast to edu.emory.mathcs.backport.java.util.concurrent.Delayed

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 5.1.0
    • Component/s: Transport
    • Labels:
      None
    • Environment:

      MS Vista, JDK 1.6, ActiveMq 4.1.1

      Description

      Came back into office this morning and spotted this, can't tell if my application continued as usual as i have only very little activity in the application.

      Exception in thread "ActiveMQ Transport: tcp://XXX/YYY:61616" java.lang.ClassCastException: org.apache.activemq.transport.InactivityMonitor$1 cannot be cast to edu.emory.mathcs.backport.java.util.concurrent.Delayed
      at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolExecutor.java:189)
      at edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507)
      at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379)
      at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecutor.java:707)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582)
      at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55)
      at org.apache.activemq.transport.InactivityMonitor.stopMonitorThreads(InactivityMonitor.java:176)
      at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:149)
      at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:97)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:150)
      at java.lang.Thread.run(Unknown Source)

      There are no Sub-Tasks for this issue.

        Activity

        Hide
        Xavier Hanin added a comment -

        I have exactly the same issue in the exact same environment (MS Vista, JDK 1.6, ActiveMq 4.1.1). It seems to happen when I kill abruptly a client connected to the broker.

        Show
        Xavier Hanin added a comment - I have exactly the same issue in the exact same environment (MS Vista, JDK 1.6, ActiveMq 4.1.1). It seems to happen when I kill abruptly a client connected to the broker.
        Hide
        Ulrich added a comment -

        Actually, after investigating a bit further, i found out that my client seems to loose connection to the broker,too. (Due to some network problems).

        However, i have added an exception listener to my application, but i don't receive this exception through my exception listener?!

        Show
        Ulrich added a comment - Actually, after investigating a bit further, i found out that my client seems to loose connection to the broker,too. (Due to some network problems). However, i have added an exception listener to my application, but i don't receive this exception through my exception listener?!
        Hide
        Jason Anderson added a comment -

        I can reproduce this by stopping the server while clients are still connected

        Show
        Jason Anderson added a comment - I can reproduce this by stopping the server while clients are still connected
        Hide
        Matvey Aizenshtat added a comment -

        I have pretty the same error with ActiveMQ 4.1.0, JDK 1.5.0, WinXP SP2.

        The only difference seems to be in the error msg:

        15.10.2007 11:10:15 org.apache.activemq.broker.BrokerService stop
        INFO: ActiveMQ Message Broker (localhost, ID:sunrise-1826-1192432151093-1:0) is shutting down
        15.10.2007 11:10:16 org.apache.activemq.broker.TransportConnector stop
        INFO: Connector tcp://sunrise:61616 Stopped
        15.10.2007 11:10:16 org.apache.activemq.broker.TransportConnector stop
        INFO: Connector vm://localhost Stopped
        15.10.2007 11:10:16 org.apache.activemq.util.ServiceStopper logError
        SEVERE: Could not stop service: org.apache.activemq.store.journal.JournalPersistenceAdapter@15fb38. Reason: java.lang.ClassCastException: org.apache.activemq.store.journal.JournalPersistenceAdapter$1
        java.lang.ClassCastException: org.apache.activemq.store.journal.JournalPersistenceAdapter$1
        at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolExecutor.java:189)
        at edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507)
        at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379)
        at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecutor.java:707)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582)
        at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55)
        at org.apache.activemq.store.journal.JournalPersistenceAdapter.stop(JournalPersistenceAdapter.java:238)
        at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:42)
        at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:443)
        at src.EmbeddedBrokerTest.stopBroker(EmbeddedBrokerTest.java:19)
        at src.EmbeddedBrokerTest.main(EmbeddedBrokerTest.java:53)
        15.10.2007 11:10:16 org.apache.activemq.broker.BrokerService stop
        INFO: ActiveMQ JMS Message Broker (localhost, ID:sunrise-1826-1192432151093-1:0) stopped
        error occured: org.apache.activemq.store.journal.JournalPersistenceAdapter$1

        Show
        Matvey Aizenshtat added a comment - I have pretty the same error with ActiveMQ 4.1.0, JDK 1.5.0, WinXP SP2. The only difference seems to be in the error msg: 15.10.2007 11:10:15 org.apache.activemq.broker.BrokerService stop INFO: ActiveMQ Message Broker (localhost, ID:sunrise-1826-1192432151093-1:0) is shutting down 15.10.2007 11:10:16 org.apache.activemq.broker.TransportConnector stop INFO: Connector tcp://sunrise:61616 Stopped 15.10.2007 11:10:16 org.apache.activemq.broker.TransportConnector stop INFO: Connector vm://localhost Stopped 15.10.2007 11:10:16 org.apache.activemq.util.ServiceStopper logError SEVERE: Could not stop service: org.apache.activemq.store.journal.JournalPersistenceAdapter@15fb38. Reason: java.lang.ClassCastException: org.apache.activemq.store.journal.JournalPersistenceAdapter$1 java.lang.ClassCastException: org.apache.activemq.store.journal.JournalPersistenceAdapter$1 at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.compareTo(ScheduledThreadPoolExecutor.java:189) at edu.emory.mathcs.backport.java.util.PriorityQueue.remove(PriorityQueue.java:507) at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.remove(DelayQueue.java:379) at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.remove(ScheduledThreadPoolExecutor.java:707) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.remove(ThreadPoolExecutor.java:1582) at org.apache.activemq.thread.Scheduler.cancel(Scheduler.java:55) at org.apache.activemq.store.journal.JournalPersistenceAdapter.stop(JournalPersistenceAdapter.java:238) at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:42) at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:443) at src.EmbeddedBrokerTest.stopBroker(EmbeddedBrokerTest.java:19) at src.EmbeddedBrokerTest.main(EmbeddedBrokerTest.java:53) 15.10.2007 11:10:16 org.apache.activemq.broker.BrokerService stop INFO: ActiveMQ JMS Message Broker (localhost, ID:sunrise-1826-1192432151093-1:0) stopped error occured: org.apache.activemq.store.journal.JournalPersistenceAdapter$1
        Hide
        Lari Hotari added a comment -

        I think that the problem is caused by using other than backport-util-concurrent 2.1 on the client (or server).

        Show
        Lari Hotari added a comment - I think that the problem is caused by using other than backport-util-concurrent 2.1 on the client (or server).

          People

          • Assignee:
            Rob Davies
            Reporter:
            Ulrich
          • Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development