synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SYNAPSE-440) XML > 4000 chars published through SimpleURLRegistry gets StackOverflow
Date Tue, 09 Sep 2008 10:21:44 GMT

     [ https://issues.apache.org/jira/browse/SYNAPSE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved SYNAPSE-440.
-------------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.3

> XML > 4000 chars published through SimpleURLRegistry gets StackOverflow
> -----------------------------------------------------------------------
>
>                 Key: SYNAPSE-440
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-440
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2
>         Environment: WinXP, Java6, Standard Synapse 1.2 binary
>            Reporter: Jason Royals
>             Fix For: 1.3
>
>         Attachments: synapse-jira-440.zip
>
>
> Consider the following config:
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>     <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
>         <parameter name="root">file:./repository/conf/registry/</parameter>
>         <parameter name="cachableDuration">5000</parameter>
>     </registry>
>     <proxy name="MyService" transports="http">
>         <description>A cool service.</description>
>         <target inSequence="mediators/insequence.xml"
>                 outSequence="mediators/outsequence.xml"
>                 faultSequence="mediators/faultsequence.xml"
>                 endpoint="mediators/endpoint.xml"/>
> 		<publishWSDL key="public-api/service.wsdl"/>
>     </proxy>
> </definitions>
> If "service.wsdl" is quite small, this config works perfectly.  
> Now add to the wsdl some comments, or a new type, or anything such that the size of the
schema is now > 4000 characters.  Start Synapse and this is what you'll get:
> 2008-09-09 [main] FATAL ServerManager Synaps startup failed...
> java.lang.StackOverflowError
>         at org.apache.axiom.om.impl.llom.OMNodeImpl.setComplete(OMNodeImpl.java:181)
>         at org.apache.axiom.om.impl.llom.OMNodeImpl.setComplete(OMNodeImpl.java:181)
>         at org.apache.axiom.om.impl.llom.OMNodeImpl.setComplete(OMNodeImpl.java:181)
>         at org.apache.axiom.om.impl.llom.OMNodeImpl.setComplete(OMNodeImpl.java:181)
> ... and on it goes
> I have a JUnit test which exposes the problem, and sequence of operations to make it
fail in this way, and will attach to the issue.
> Regarding the cause, I did get down and dirty with Axiom and Woodstox and I'm still not
sure if its the way ProxyService uses Axiom, or if it is how Axiom uses Woodstox (which has
a 4000 character stream buffer - no coincidence I'm sure).  I do know that when the 4000 (or
thereabouts) character limit is reached, Woodstox seems to start from the top of the WSDL
again and Axiom processes it all again, and again, and again.  Woodstox doesn't appear to
get the next "page" of 4000 characters (or maybe it is not being given he opportunity) and
repeats what it just did again, and so on.  It _only_ happens through the SimpleURLRegistry
so far as I can tell, by _not_ using the SimpleURLRegistry everything seems OK.
> Workaround for this is to replace "key" with "uri" in the "publishWSDL" element and point
directly to the wsdl.  It seems that if we don't go through SimpleURLRegistry, everything
works fine.
> Cheers,
> Jason

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message