我想在我的activemq中加载amon monlets。我有activeMQ 5.8.0v和amon-2.0.0。
从用户指南我尝试部署monlets,他们说使用<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<package>com.acme.monlets</package>
</camelContext>
但是当我启动activemq时,它会给出以下异常。
2013-08-01 19:57:23,874 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@41d13c26: startup date [Thu Aug 01 19:57:23 IST 2013]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2013-08-01 19:57:25,036 |错误|无法加载:类路径资源[activemq.xml],原因:来自类路径资源[activemq.xml]的XML文档中的第162行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:162; columnNumber:73; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素&came; CONTlContext&#39;的声明。 | org.apache.activemq.xbean.XBeanBrokerFactory |主要 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自类路径资源[activemq.xml]的XML文档中的第162行无效;嵌套异常是org.xml.sax.SAXParseException; lineNumber:162; columnNumber:73; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素&came; CONTlContext&#39;的声明。 在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) 在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) 在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:131) 在org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:444) 在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:64) 在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:52) 在org.apache.activemq.xbean.XBeanBrokerFactory $ 1.(XBeanBrokerFactory.java:101) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:101) 在org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65) 在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71) 在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) 在org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:125) 在org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:84) 在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 在org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150) 在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57) 在org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:601) 在org.apache.activemq.console.Main.runTaskClass(Main.java:262) 在org.apache.activemq.console.Main.main(Main.java:115) 引起:org.xml.sax.SAXParseException; lineNumber:162; columnNumber:73; cvc-complex-type.2.4.c:匹配的通配符是严格的,但是没有找到元素&came; CONTlContext&#39;的声明。 at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) 在com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator $ XSIErrorReporter.reportError(XMLSchemaValidator.java:453) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3232) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1912) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl $ FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489) 在com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) 在com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) 在com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237) 在com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300) 在org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) 在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ......还有26个
请帮忙
答案 0 :(得分:0)
您需要将Camel命名空间添加到XML文件的顶部,例如类似
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
您可以在Apache ActiveMQ附带的conf / camel.xml文件中看到一个示例