[mule-user] Problem running XSLT flow in standalone Mule that works fine in Studio

31 views
Skip to first unread message

Bob Craig

unread,
Oct 21, 2011, 3:38:55 PM10/21/11
to us...@mule.codehaus.org
I am trying to do a simple workflow that reads the contents of a file, does an XSLT transform on that file, then outputs the transform to another file.

When I use Mule Studio to construct the workflow, it works as I expect.

However, when I copy the exact configuration from Mule Studio and put it into my mule-config.xml on my standalone Mule instance, I get a SAXException (below).

I was getting this same error on a more complex flow, so I tried to reduce to the minimum variation (to eliminate the problem then work back toward what I had to identify what was causing the problem). Since this works in Mule Studio and not in standalone Mule, I'm not sure what I could be doing wrong.

Note, I have the August beta of Mule Studio and 3.2.0 of standalone Mule.

Here is the workflow that I am trying to run...

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.1/mule-xml.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.1/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd ">

<flow name="testNSMLtoPolopolyImport">

<file:inbound-endpoint path="/Users/bob_craig/Temp/xslt" moveToDirectory="/Users/bob_craig/Temp/xslt/processed" pollingFrequency="10000" fileAge="5000" reverseOrder="false" disableTransportTransformer="false" doc:name="Read NSML file" doc:description="Read/write a file from the filesystem"/>

<mulexml:xslt-transformer xsl-file="/Users/bob_craig/Documents/Development/MPD-PoC/NSMLtoPUA.xml" ignoreBadInput="false" doc:name="Convert NSML to PUA" doc:description="Transform XML using XSLT">
</mulexml:xslt-transformer>

<file:outbound-endpoint path="/Users/bob_craig/Temp/xslt" outputPattern="#[header:originalFilename].pua.xml" responseTimeout="10000" encoding="UTF-8" disableTransportTransformer="false" doc:name="Write PUA file" doc:description="Read/write a file from the filesystem"/>

</flow>
</mule>

And here is the exception I am getting as soon as I try to run Mule...

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/bob_craig/Documents/Development/Mule/lib/boot/mule-module-logging-3.2.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/bob_craig/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
INFO 2011-10-21 14:31:35,815 [main] org.mule.MuleServer: Mule Server initializing...
INFO 2011-10-21 14:31:36,137 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker
INFO 2011-10-21 14:31:36,258 [main] org.mule.config.spring.MuleApplicationContext: Refreshing org.mule.config.spring.MuleApplicationContext@1c2c9103: startup date [Fri Oct 21 14:31:36 CDT 2011]; root of context hierarchy
ERROR 2011-10-21 14:31:38,021 [main] org.mule.MuleServer:
********************************************************************************
Message : Line 617 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/mule-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'xqueryTransformerType' is mixed, but its base type is not.
Code : MULE_ERROR-71999
--------------------------------------------------------------------------------
Exception stack is:
1. cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'xqueryTransformerType' is mixed, but its base type is not. (org.xml.sax.SAXParseException)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper:195 (null)
2. Line 617 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/mule-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'xqueryTransformerType' is mixed, but its base type is not. (org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader:396 (null)
3. Line 617 in XML document from URL [file:/Users/bob_craig/Documents/Development/Mule/connector/MuleProject/mule-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'xqueryTransformerType' is mixed, but its base type is not. (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: cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'xqueryTransformerType' is mixed, but its base type is not.
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)
********************************************************************************

ERROR 2011-10-21 14:31:38,025 [main] org.mule.MuleServer:
********************************************************************************
* A Fatal error has occurred while the server was running: *
* cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that *
* of its base must both be mixed or both be element-only. Type *
* 'xqueryTransformerType' is mixed, but its base type is not. *
* (org.xml.sax.SAXParseException) *
* *
* The error is fatal, the system will shutdown *
********************************************************************************

Any suggestions about what I should do differently?

Thanks,
Bob

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Bob Craig

unread,
Oct 21, 2011, 3:43:25 PM10/21/11
to us...@mule.codehaus.org
Since this forum software refuses to honor the whitespace formatting that I entered and made the post completely unreadable, I am attaching a document with the same information.
XSLTErrorInMuleButNotStudio.rtf

David Dossot

unread,
Oct 21, 2011, 5:54:15 PM10/21/11
to us...@mule.codehaus.org
Could it be because you're running a config for Mule 3.1 on Mule 3.2?

Bob Craig

unread,
Oct 21, 2011, 9:06:50 PM10/21/11
to us...@mule.codehaus.org
Thanks David - from the error message I was getting the last thing I was thinking about was any change in behavior between 3.1 and 3.2. But when I changed the schema definition for mule-xml, it started working.

Thanks again for the tip!

Reply all
Reply to author
Forward
0 new messages