activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: [5.4.2] New XML config issue? Not backward compatible?
Date Mon, 06 Dec 2010 21:44:52 GMT
On Mon, 2010-12-06 at 13:36 -0800, benoitx wrote:
> Hi *,
> 
> I've upgraded to 5.4.2 as we're eager to get the fix for
> https://issues.apache.org/jira/browse/AMQ-2935
> 
> Unfortunately, our broker config XML which has worked since version 4 or
> so... now does not work...
> 
> We are getting this exception at startup:
> 
> 4. Initialisation Failure: Could not create Transport. Reason:
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 45 in XML document from class path resource
> [appendium-esb-client-to-server-activemq-broker-config_client1.xml] is
> invalid; nested exception is org.xml.sax.SAXParseException:
> cvc-complex-type.2.4.a: Invalid content was found starting with element
> 'networkConnectors'. One of
> '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
> (org.mule.retry.RetryPolicyExhaustedException)
> 
>  Could somebody please point us in the right direction? What is wrong our
> config xml below...
> 
> Many thanks in advance!
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:amq="http://activemq.apache.org/schema/core"
> 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   
>   http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
> 
>     <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
> />
> 
>     <broker brokerName="appendium-esb-client-to-server-client1"
> persistent="true" useJmx="true"
> xmlns="http://activemq.apache.org/schema/core" dataDirectory="data">
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <policyEntry queue=">" memoryLimit="5mb"/>
>                     <policyEntry topic=">" memoryLimit="5mb">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy/>
>                         </dispatchPolicy>
>                         <subscriptionRecoveryPolicy>
>                             <lastImageSubscriptionRecoveryPolicy/>
>                         </subscriptionRecoveryPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> 
>         <managementContext>
>             <managementContext createConnector="false"
> jmxDomainName="esb-client-to-server-client1.activemq-jmx-domain" />
>         </managementContext>
>         
>         <transportConnectors/>
> 
>         <!-- The store and forward broker networks ActiveMQ will send
> messages to -->
>         <networkConnectors>
>             <networkConnector name="esb-client-to-esb-server-client1"
> uri="static:(tcp://localhost:27000)" dynamicOnly="true">
>                 <dynamicallyIncludedDestinations>
>                     <queue physicalName="queue.client1.from" />
>                     <queue physicalName="queue.client1.from.order" />
>                 </dynamicallyIncludedDestinations>
>             </networkConnector>
>         </networkConnectors>
> 
>         <persistenceAdapter>
> 		<amqPersistenceAdapter syncOnWrite="false"
> directory="activemq-data/esb-client-to-server-client1" maxFileLength="1000
> mb" />
>         </persistenceAdapter>
> 
>     </broker>
> </beans>

> The issue is just after networkConnectors... I had a look at the XSD between
> 5.4.1 and 5.4.2 but I cannot spot any difference...  It seems to want
> 'other'...
> 

Try reordering the elements such that 'networkConnectors' and
'persistenceAdapter' are in alphabetical order in relation to the other
elements in the config file.  This is a result of Spring 3.0 XML
validation.

Regards

> Full stacktrace:
> 
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was
> found starting with element 'networkConnectors'. One of
> '{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:417)
> 
> 	at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
> 	at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1806)
> 
> 	at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
> 	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:2755)
> 	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:511)
> 	at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
> 	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:119)
> 	at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
> 	at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> 	at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> 	at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
> 
> 	at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
> 	at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
> 	at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
> 	at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
> 	at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
> 	at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:117)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:115)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:71)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
> 	at
> org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:121)
> 	at
> org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:53)
> 	at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
> 	at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
> 	at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
> 	at
> org.mule.transport.jms.Jms11Support.createConnection(Jms11Support.java:68)
> 	at
> org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:409)
> 	at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:492)
> 	at org.mule.transport.AbstractConne...
> 

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Mime
View raw message