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

runtime config - namespace prefix causes npe on config load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.9.0
    • 5.9.1, 5.10.0
    • Broker
    • None

    Description

      With namespace prefix - the broker node cannot be resolved in the xml config and the runtime config plugin errors out.

      java.lang.IllegalArgumentException: Unexpected node type: null
      	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:311)
      	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:284)
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.loadConfiguration(RuntimeConfigurationBroker.java:662)
      	at org.apache.activemq.plugin.RuntimeConfigurationBroker.start(RuntimeConfigurationBroker.java:142)
      	at org.apache.activemq.broker.BrokerService$5.start(BrokerService.java:2144)
      	at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:648)
      	at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:632)
      	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:568)
      	at org.apache.activemq.RuntimeConfigTestSupport.startBroker(RuntimeConfigTestSupport.java:52)
      

      xml of the form:

      <tag0:beans xmlns:tag0="http://www.springframework.org/schema/beans"
                  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">
        <tag0:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
          <tag0:property name="properties">
            <tag0:bean class="org.apache.activemq.CustomPropertiesBean"/>
          </tag0:property>
        </tag0:bean>
        <amq:broker xmlns:amq="http://activemq.apache.org/schema/core" start="false" dataDirectory="${data}" persistent="false"
                    brokerName="${broker-name}">
          <amq:destinationPolicy>
            <amq:policyMap>
              <amq:policyEntries>
                <amq:policyEntry topic=">" producerFlowControl="true">
                  <amq:pendingMessageLimitStrategy>
                    <amq:constantPendingMessageLimitStrategy limit="1000"/>
                  </amq:pendingMessageLimitStrategy>
                </amq:policyEntry>
                <amq:policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"/>
              </amq:policyEntries>
            </amq:policyMap>
          </amq:destinationPolicy>
          <amq:managementContext>
            <amq:managementContext createConnector="false"/>
          </amq:managementContext>
          <amq:plugins>
            <amq:jaasAuthenticationPlugin configuration="karaf"/>
            <amq:runtimeConfigurationPlugin checkPeriod="1000"/>
          </amq:plugins>
          <amq:systemUsage>
            <amq:systemUsage>
              <amq:memoryUsage>
                <amq:memoryUsage limit="64 mb"/>
              </amq:memoryUsage>
              <amq:storeUsage>
                <amq:storeUsage limit="100 gb"/>
              </amq:storeUsage>
              <amq:tempUsage>
                <amq:tempUsage limit="50 gb"/>
              </amq:tempUsage>
            </amq:systemUsage>
          </amq:systemUsage>
          <amq:transportConnectors>
            <amq:transportConnector name="openwire" uri="tcp://0.0.0.0:0?maximumConnections=1000"/>
          </amq:transportConnectors>
        </amq:broker>
      </tag0:beans>

      Attachments

        Activity

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: