ActiveMQ broker configuration error when specifying persistenceAdapter: "One of '{WC[##other:"http:/
- by Joe
I am setting up a simple ActiveMQ embedded broker. It works fine, until I try to configure a persistence adapter. I am basically just copying the configuration from http://activemq.apache.org/persistence.html#Persistence-ConfiguringKahaPersistence. When I add this configuration to my Spring configuration, like so:
<?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>
I get the error:
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.
When I take out the amq:persistenceAdapter element, it works fine. The same error happens no matter which persistence adapter I include in the body, e.g. jdbc, journal, etc.
Any help would be greatly appreciated.
Thanks.