我正在设置一个简单的ActiveMQ嵌入式代理。在我尝试配置持久性适配器之前,它工作正常。我基本上只是从http://activemq.apache.org/persistence.html#Persistence-ConfiguringKahaPersistence复制配置。当我将此配置添加到我的Spring配置中时,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd">
<amq:broker useJmx="true" persistent="true" brokerName="localhost">
<amq:transportConnectors>
<amq:transportConnector name="vm" uri="vm://localhost"/>
</amq:transportConnectors>
<amq:persistenceAdapter>
<amq:kahaPersistenceAdapter directory="activemq-data" maxDataFileLength="33554432"/>
</amq:persistenceAdapter>
</amq:broker>
</beans>
Run Code Online (Sandbox Code Playgroud)
我得到错误:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'amq:persistenceAdapter'.
One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.
Run Code Online (Sandbox Code Playgroud)
当我取出amq:persistenceAdapter元素时,它可以正常工作。无论我在主体中包括哪个持久适配器,例如jdbc,journal等,都会发生相同的错误。
任何帮助将不胜感激。
谢谢。
| 归档时间: |
|
| 查看次数: |
2431 次 |
| 最近记录: |