[mule-user] Unable to use idempotent-secure-hash-filter

46 views
Skip to first unread message

Bob Craig

unread,
Oct 27, 2011, 3:59:17 PM10/27/11
to us...@mule.codehaus.org
I am trying to use the idempotent-secure-hash-filter to filter out processing jobs that I have already processed. The documentation available for idempotent-secure-hash-filter seems minimal but straightforward.

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


Andrew Perepelytsya

unread,
Oct 27, 2011, 4:23:51 PM10/27/11
to us...@mule.codehaus.org

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

Bob Craig

unread,
Oct 28, 2011, 10:42:11 AM10/28/11
to us...@mule.codehaus.org
I'm not sure I completely follow. I am running in the Mule IDE but using a deployment of Mule 3.2.0 and JDK 6. Here is the output when I start up a flow in Mule from the IDE.

**********************************************************************
* 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?

Andrew Perepelytsya

unread,
Oct 28, 2011, 10:56:19 AM10/28/11
to us...@mule.codehaus.org

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

Bob Craig

unread,
Oct 28, 2011, 11:14:27 AM10/28/11
to us...@mule.codehaus.org
Interestingly, I can use the base version - <idempotent-message-filter> without any other changes.

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>

Andrew Perepelytsya

unread,
Oct 28, 2011, 12:03:13 PM10/28/11
to us...@mule.codehaus.org

Config elements inherit from each other. Upgrade the libs, bundled jdk ones are way too broken.

Andrew

Reply all
Reply to author
Forward
0 new messages