Problem:
Error in log:
2019-02-26
10:35:01,222 | INFO | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@d3f0053: startup date [Tue Feb
26 10:35:01 UTC 2019]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
2019-02-26
10:35:02,600 | ERROR | Failed to load: class path resource [activemq.xml],
reason: Line 54 in XML document from class path resource [activemq.xml] is
invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 54;
columnNumber: 48; cvc-complex-type.2.4.c: The matching wildcard is strict, but
no declaration can be found for element 'pendingMessageLimitStrategy'. |
org.apache.activemq.xbean.XBeanBrokerFactory | WrapperSimpleAppMain
Solution:
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic="> /" >
<!-- The constantPendingMessageLimitStrategy is used
to prevent
slow topic consumers to block producers and affect other
consumers
by limiting the
number of messages that are retained
For more
information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy
limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
3.Remove the ‘/’ & Restart tomcat, Active MQ
& Postgres services.