[
https://issues.apache.org/jira/browse/SYNAPSE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15303312#comment-15303312
]
Hudson commented on SYNAPSE-1005:
---------------------------------
SUCCESS: Integrated in Synapse - Trunk #5240 (See
[https://builds.apache.org/job/Synapse%20-%20Trunk/5240/])
Adding systemId, publicId and baseURL to the SchemaResourceLSInput. Applied
patch from Senduran at SYNAPSE-1005 (hiranya: rev 1745702)
*
java/modules/core/src/main/java/org/apache/synapse/util/jaxp/SchemaResourceLSInput.java
*
java/modules/core/src/main/java/org/apache/synapse/util/jaxp/SchemaResourceResolver.java
> Validate mediator throws StackOverflowError, when the schema has Cyclic
> import or include
> -----------------------------------------------------------------------------------------
>
> Key: SYNAPSE-1005
> URL: https://issues.apache.org/jira/browse/SYNAPSE-1005
> Project: Synapse
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1
> Reporter: Senduran
> Assignee: Hiranya Jayathilaka
> Labels: patch
> Fix For: 3.0
>
> Attachments: validate_mediator_cyclic_schema_fix.diff
>
>
> sample proxy service
> {code:xml}
> <proxy xmlns="http://ws.apache.org/ns/synapse" name="validateRequest"
> transports="http" startOnLoad="true">
> <target>
> <inSequence>
> <validate>
> <schema key="A.xsd"/>
> <resource location="B.xsd" key="B.xsd"/>
> <resource location="C.xsd" key="C.xsd"/>
> <resource location="D.xsd" key="D.xsd"/>
> <on-fail>
> <makefault version="soap11">
> <code
> xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/>
> <reason value="Invalid Request!!!"/>
> <role/>
> </makefault>
> <log level="full"/>
> <property name="RESPONSE" value="true"/>
> <header name="To" action="remove"/>
> <send/>
> <drop/>
> </on-fail>
> </validate>
> <property name="RESPONSE" value="true"/>
> <header name="To" action="remove"/>
> <send/>
> </inSequence>
> </target>
> <description/>
> </proxy>
> {code}
> Here A includes B, B includes C and C includes D.
> But say for example if C includes Both D and B there is a cyclic reference.
> So the following exception will be thrown
> {code}
> java.lang.StackOverflowError
> at com.ctc.wstx.sw.BaseStreamWriter.<init>(BaseStreamWriter.java:259)
> at
> com.ctc.wstx.sw.BaseNsStreamWriter.<init>(BaseNsStreamWriter.java:122)
> at
> com.ctc.wstx.sw.SimpleNsStreamWriter.<init>(SimpleNsStreamWriter.java:59)
> at
> com.ctc.wstx.stax.WstxOutputFactory.createSW(WstxOutputFactory.java:275)
> at
> com.ctc.wstx.stax.WstxOutputFactory.createXMLStreamWriter(WstxOutputFactory.java:124)
> at
> org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper.createXMLStreamWriter(XMLOutputFactoryWrapper.java:66)
> at
> org.apache.axiom.util.stax.wrapper.WrappingXMLOutputFactory.createXMLStreamWriter(WrappingXMLOutputFactory.java:90)
> at
> org.apache.axiom.util.stax.dialect.WoodstoxOutputFactoryWrapper.createXMLStreamWriter(WoodstoxOutputFactoryWrapper.java:48)
> at
> org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper.createXMLStreamWriter(XMLOutputFactoryWrapper.java:66)
> at org.apache.axiom.om.util.StAXUtils$4.run(StAXUtils.java:364)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:360)
> at
> org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:353)
> at
> org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:130)
> at
> org.apache.synapse.util.resolver.ResourceMap.resolve(ResourceMap.java:93)
> at
> org.apache.synapse.util.jaxp.SchemaResourceResolver.resolveResource(SchemaResourceResolver.java:47)
> at
> org.apache.xerces.util.DOMEntityResolverWrapper.resolveEntity(Unknown Source)
> at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]