activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Pavlovich <mattr...@gmail.com>
Subject Re: start BrokerService error....
Date Thu, 04 Sep 2014 01:09:19 GMT
What version of ActiveMQ jars do you have listed in your dependencies? 

On Sep 1, 2014, at 9:37 AM, b-brother <yingchao.zyc@alibaba-inc.com> wrote:

> first , I have copied file activemq.xml from src package.
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <beans
>  xmlns="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.xsd
>  http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
> 
> 
>    <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>        <property name="locations">
>            <value>file:${activemq.conf}/credentials.properties</value>
>        </property>
>    </bean>
> 
> 
>    <bean id="logQuery"
> class="org.fusesource.insight.log.log4j.Log4jLogQuery"
>          lazy-init="false" scope="singleton"
>          init-method="start" destroy-method="stop">
>    </bean>
> 
> 
>    <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="localhost" dataDirectory="${activemq.data}">
> 
>        <destinationPolicy>
>            <policyMap>
>              <policyEntries>
>                <policyEntry topic=">" >
> 
>                  <pendingMessageLimitStrategy>
>                    <constantPendingMessageLimitStrategy limit="1000"/>
>                  </pendingMessageLimitStrategy>
>                </policyEntry>
>              </policyEntries>
>            </policyMap>
>        </destinationPolicy>
> 
> 
> 
>        <managementContext>
>            <managementContext createConnector="false"/>
>        </managementContext>
> 
> 
>        <persistenceAdapter>
>            <kahaDB directory="${activemq.data}/kahadb"/>
>        </persistenceAdapter>
> 
> 
> 
>          <systemUsage>
>            <systemUsage>
>                <memoryUsage>
>                    <memoryUsage percentOfJvmHeap="70" />
>                </memoryUsage>
>                <storeUsage>
>                    <storeUsage limit="100 gb"/>
>                </storeUsage>
>                <tempUsage>
>                    <tempUsage limit="50 gb"/>
>                </tempUsage>
>            </systemUsage>
>        </systemUsage>
> 
> 
>        <transportConnectors>
> 
>            <transportConnector name="openwire"
> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>            <transportConnector name="amqp"
> uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>            <transportConnector name="stomp"
> uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>            <transportConnector name="mqtt"
> uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>            <transportConnector name="ws"
> uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
>        </transportConnectors>
> 
> 
>        <shutdownHooks>
>            <bean xmlns="http://www.springframework.org/schema/beans"
> class="org.apache.activemq.hooks.SpringContextHook" />
>        </shutdownHooks>
> 
>    </broker>
> 
> 
>    <import resource="jetty.xml"/>
> 
> </beans>
> 
> 
> second, I write code like this :
> 
> BrokerService broker =
> BrokerFactory.createBroker("xbean:com/alibaba/activemq/run/activemq.xml");  
> 		  
> broker.addConnector("tcp://localhost:61616");
> 		 
> broker.start();
> 
> but, an exception happened ...
> INFO  | main | Refreshing
> org.apache.activemq.xbean.XBeanBrokerFactory$1@74ee003d: startup date [Mon
> Sep 01 22:32:58 CST 2014]; root of context hierarchy
> ERROR | main | Failed to load: class path resource
> [com/alibaba/activemq/run/activemq.xml], reason: Line 7 in XML document from
> class path resource [com/alibaba/activemq/run/activemq.xml] is invalid;
> nested exception is org.xml.sax.SAXParseException; systemId:
> http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 7;
> columnNumber: 55; TargetNamespace.1: Expecting namespace
> 'http://activemq.apache.org/schema/core', but the target namespace of the
> schema document is 'http://activemq.org/config/1.0'.
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 7 in XML document from class path resource
> [com/alibaba/activemq/run/activemq.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException; systemId:
> http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 7;
> columnNumber: 55; TargetNamespace.1: Expecting namespace
> 'http://activemq.apache.org/schema/core', but the target namespace of the
> schema document is 'http://activemq.org/config/1.0'.
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
> 	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:130)
> 	at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
> 	at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
> 	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:103)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:103)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:85)
> 	at com.alibaba.activemq.run.Runner.main(Runner.java:11)
> Caused by: org.xml.sax.SAXParseException; systemId:
> http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 7;
> columnNumber: 55; TargetNamespace.1: Expecting namespace
> 'http://activemq.apache.org/schema/core', but the target namespace of the
> schema document is 'http://activemq.org/config/1.0'.
> 	at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> 	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at
> org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
> Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> 	at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
> 	... 16 more
> Exception in thread "main"
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 7 in XML document from class path resource
> [com/alibaba/activemq/run/activemq.xml] is invalid; nested exception is
> org.xml.sax.SAXParseException; systemId:
> http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 7;
> columnNumber: 55; TargetNamespace.1: Expecting namespace
> 'http://activemq.apache.org/schema/core', but the target namespace of the
> schema document is 'http://activemq.org/config/1.0'.
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
> 	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:130)
> 	at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
> 	at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
> 	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:103)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:103)
> 	at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
> 	at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:85)
> 	at com.alibaba.activemq.run.Runner.main(Runner.java:11)
> Caused by: org.xml.sax.SAXParseException; systemId:
> http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 7;
> columnNumber: 55; TargetNamespace.1: Expecting namespace
> 'http://activemq.apache.org/schema/core', but the target namespace of the
> schema document is 'http://activemq.org/config/1.0'.
> 	at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> 	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at
> org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
> Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
> Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> 	at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> 	at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
> 	at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
> 	... 16 more
> 
> 
> I don't know why .. and I had got anything from Google and StackOverflow.
> Can I get an answer in here ?
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/start-BrokerService-error-tp4685213.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message