Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4667

JMX Recovery operation triggers ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.30.0
    • 2.36.0
    • Broker
    • None

    Description

      Description:

      Impossibility to replay messages from retention folders due to a ClassCastException.

      It happens when replication ha-policy is configured and after the live role switch back from the backup node to the primary node:

       

      java.lang.ClassCastException : class org.apache.activemq.artemis.core.replication.ReplicatedJournal cannot be cast to class org.apache.activemq.artemis.core.journal.impl.JournalImpl (org.apache.activemq.artemis.core.replication.ReplicatedJournal and org.apache.activemq.artemis.core.journal.impl.JournalImpl are in unnamed module of loader java.net.URLClassLoader @73d16e93)

       

      See attached screenshot of the Artemis console for additional details.

       

      Configuration details:

      • Cluster of Artemis primary/backup groups and with replication ha-policy (ZK)

       

      Reproduction scenario:

      With a brand new primary/backup group with replica :

      • Start primary and backup nodes
      • The JMX replay command works well on primary
      • Stop the primary node, backup becomes live
      • Restart the primary, it becomes live again (failback is enabled)
      • At this step, the reuse of the replay command on the primary trigger the ClassCastException

       

      Attachments

        1. ReplayWithReplicationTest.java
          6 kB
          Jean-Pascal Briquet
        2. msg-replay-classcastexception.png
          106 kB
          Jean-Pascal Briquet

        Activity

          People

            clebertsuconic Clebert Suconic
            jpbriquet Jean-Pascal Briquet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h