4 Replies Latest reply on Aug 18, 2010 12:58 AM by albert wilson

    Error: dynamicallyIncludedDestinations

    Peter Chandler Master

      Help,

       

      I set-up a networkConnector with a staticallyIncludedDestinations works great:

              <!-- The store and forward broker networks ActiveMQ will send to -->
              <networkConnectors>
                  <!-- Make a static connection to JMS Broker Host -->
                  <networkConnector name="connection_out" uri="static://(tcp://hostname:61677)"
                    networkTTL="1" 
                    dynamicOnly="true"
                    decreaseNetworkConsumerPriority="false"
                    conduitSubscriptions="true"
                    prefetchSize="10000">
                    <excludedDestinations>
                      <queue physicalName=">"/>
                      <topic physicalName=">"/>
                       </excludedDestinations>
                    <staticallyIncludedDestinations>
                      <topic physicalName="Events"></topic>
                       </staticallyIncludedDestinations>
                  </networkConnector>
              </networkConnectors>
      

       

      I just change the networkConnector to use a dynamicallyIncludedDestinations and Error:

              <!-- The store and forward broker networks ActiveMQ will send to -->
              <networkConnectors>
                  <!-- Make a static connection to JMS Broker Host -->
                  <networkConnector name="connection_out" uri="static://(tcp://hostname:61677)"
                    networkTTL="1" 
                    dynamicOnly="true"
                    decreaseNetworkConsumerPriority="false"
                    conduitSubscriptions="true"
                    prefetchSize="10000">
                    <excludedDestinations>
                      <queue physicalName=">"/>
                      <topic physicalName=">"/>
                       </excludedDestinations>
                    <dynamicallyIncludedDestinations>
                      <topic physicalName="Events"></topic>
                       </dynamicallyIncludedDestinations>
                  </networkConnector>
              </networkConnectors>
      

       

      Error:

      19:14:27,564 | ERROR | ExtenderThread-1 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=activemq-broker.xml, config=osgibundle:/META-INF/spring/*.xml))
      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 63 in XML document from URL [bundleentry://65.fwk1258351596/META-INF/spring/activemq-broker.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dynamicallyIncludedDestinations'. One of '{"http://activemq.apache.org/schema/core":staticallyIncludedDestinations, WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
           at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
           at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
           at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
           at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'dynamicallyIncludedDestinations'. One of '{"http://activemq.apache.org/schema/core":staticallyIncludedDestinations, WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
           at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
           at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
           at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
           at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
           at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
           at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
           at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1777)
           at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:685)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
           at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
           at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
           at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
           ... 18 more
      

       

      Any ideas what's wrong with the XML?

       

      ...

       

      I took the example "Example Configuration using NetworkConnector properties" out of the apache documentation  http://activemq.apache.org/networks-of-brokers.html and I get the same schema validation error? See attachment.

       

      Peter.

       

      Edited by: pchandler on Jul 27, 2010 3:23 PM