When I follow the example shown in the documentation at [http://www.mulesoft.org/documentation/display/MULE3USER/Routing+Message+Processors#RoutingMessageProcessors-IdempotentSecureHashMessageFilter] , however, I get a SAXParseException when I try to run my flow (shown below).
This is how I am trying to invoke the filter...
<idempotent-secure-hash-filter>
<simple-text-file-store name="inews-story-store" directory="/users/bob_craig/temp" maxEntries="255"/>
</idempotent-secure-hash-filter>
Any ideas what I have wrong?
Message : Line 51 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/inews-getstories-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'idempotent-secure-hash-filter'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected.
Code : MULE_ERROR-71999
--------------------------------------------------------------------------------
Exception stack is:
1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'idempotent-secure-hash-filter'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected. (org.xml.sax.SAXParseException)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper:195 (null)
2. Line 51 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/inews-getstories-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'idempotent-secure-hash-filter'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected. (org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader:396 (null)
3. Line 51 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/inews-getstories-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'idempotent-secure-hash-filter'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected. (org.mule.api.lifecycle.InitialisationException)
org.mule.registry.AbstractRegistry:117 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/InitialisationException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'idempotent-secure-hash-filter'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":response, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-message-info-mapping}' is expected.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Are you running standalone? It seems you are not. The stacktrace lists old xerces embedded in jdk, and they are way too old. Mule standalone endorses more recent working versions, do the same for your jdk.
Andrew
**********************************************************************
* Mule ESB and Integration Platform *
* Version: 3.2.0 Build: 22917 *
* MuleSoft, Inc. *
* For more information go to http://www.mulesoft.org *
* *
* Server started: 10/28/11 9:39 AM *
* Server ID: 931c99b8-0172-11e1-b5e6-1b6c0a66165c *
* JDK: 1.6.0_26 (mixed mode) *
* OS encoding: UTF-8, Mule encoding: UTF-8 *
* OS: Mac OS X (10.7.2, x86_64) *
* Host: Bobs-MacBook-Air.local (172.24.99.13) *
* *
* Agents Running: *
* JMX Agent *
**********************************************************************
What would I do differently?
Bob,
When you run Mule standalone, i.e. install Mule distro and run from command line bin/mule, there's a bit of magic happening. Mule adjusts jdk endorsed libs to use recent xml libs. You can find these in the Mule's lib/endorsed dir. When you run in Eclipse this doesn't happen and it's your responsibility then. One of the easiest solutions is identify which jdk is used to launch java programs from eclipse and copy the libs into $JAVA_HOME/jre/lib/endorsed.
HTH,
Andrew
This generates an error...
<idempotent-secure-hash-filter>
<simple-text-file-store name="inews-story-store" directory="/users/bob_craig/temp" maxEntries="255"/>
</idempotent-secure-hash-filter>
But this works fine...
<idempotent-message-filter idExpression="#[header:invocation:queue-locator]">
<simple-text-file-store name="inews-story-store" directory="/users/bob_craig/temp" maxEntries="1000"/>
</idempotent-message-filter>
Config elements inherit from each other. Upgrade the libs, bundled jdk ones are way too broken.
Andrew