Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2272

[AMQ6, runtimeConfigurationPlugin] java.lang.ClassCastException: org.apache.activemq.broker.region.virtual.CompositeDestinationFilter cannot be cast to org.apache.activemq.broker.region.Queue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.3.x
    • JBoss A-MQ 6.3
    • broker
    • None
    • +
    • Hide

      1) start the broker with the activemq.xml attached
      important configuration in attached activemq.xml

      • runtimeConfigurationPlugin is configured
      • compositeQueue is configured

      2) produce a message to the composite queue - just to ensure everything is instantiated.

      3) uncomment the following destination policy entry and save
      <!--policyEntry topic="YYY.>" producerFlowControl="true">
      </policyEntry-->

      RESULT:
      Once the runtimeConfigurationPlugin recognises the configuration has been updated,
      it will generate the ClassCast exception in the brokers logs at ERROR log level.

      Show
      1) start the broker with the activemq.xml attached important configuration in attached activemq.xml runtimeConfigurationPlugin is configured compositeQueue is configured 2) produce a message to the composite queue - just to ensure everything is instantiated. 3) uncomment the following destination policy entry and save <!--policyEntry topic="YYY.>" producerFlowControl="true"> </policyEntry--> RESULT: Once the runtimeConfigurationPlugin recognises the configuration has been updated, it will generate the ClassCast exception in the brokers logs at ERROR log level.

      Configuration has defined the following composite queue:

      <destinationInterceptors>
                <virtualDestinationInterceptor>
                  <virtualDestinations>
                    <compositeQueue name="my.composite.queue">
                      <forwardTo>
                        <filteredDestination selector="header = 'one'" queue="my.filtered.destination"/>
                        <topic physicalName="my.topic" />
                      </forwardTo>
                    </compositeQueue>
                  </virtualDestinations>
                </virtualDestinationInterceptor>
              </destinationInterceptors>
      

      When a new destination policy is set

        <policyEntry topic="YYY.>" producerFlowControl="true">
                    </policyEntry>
      

      The following ERROR is thrown in the logs

      2019-01-24 09:30:51,685 | ERROR | r[amq] Scheduler | RuntimeConfigurationBroker       | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630371 | Failed to determine lastModified time on configuration: URL [file:etc/activemq.xml]
      java.lang.ClassCastException: org.apache.activemq.broker.region.virtual.CompositeDestinationFilter cannot be cast to org.apache.activemq.broker.region.Queue
      	at org.apache.activemq.plugin.util.PolicyEntryUtil.applyRetrospectively(PolicyEntryUtil.java:85)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.PolicyEntryProcessor.applyRetrospectively(PolicyEntryProcessor.java:56)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.PolicyEntryProcessor.addNew(PolicyEntryProcessor.java:34)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.DefaultConfigurationProcessor.applyModifications(DefaultConfigurationProcessor.java:112)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.PolicyMapProcessor.modify(PolicyMapProcessor.java:34)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.DefaultConfigurationProcessor.applyModifications(DefaultConfigurationProcessor.java:102)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.DefaultConfigurationProcessor.processChanges(DefaultConfigurationProcessor.java:64)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.DefaultConfigurationProcessor.processChanges(DefaultConfigurationProcessor.java:57)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.processChanges(RuntimeConfigurationBroker.java:167)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.processSelectiveChanges(RuntimeConfigurationBroker.java:161)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.applyModifications(RuntimeConfigurationBroker.java:146)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.access$100(RuntimeConfigurationBroker.java:52)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker$1.run(RuntimeConfigurationBroker.java:125)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630371]
      	at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_75]
      	at java.util.TimerThread.run(Timer.java:505)[:1.7.0_75]
      

            gtully@redhat.com Gary Tully
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: