You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Isuru Udana Loku Narangoda (JIRA)" <ji...@apache.org> on 2013/09/07 19:55:51 UTC

[jira] [Updated] (SYNAPSE-976) Validate Mediator contentAware issue

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

Isuru Udana Loku Narangoda updated SYNAPSE-976:
-----------------------------------------------

    Attachment: SYNAPSE-976.patch

Please find the patch to fix this issue from the attachment.
                
> Validate Mediator contentAware issue
> ------------------------------------
>
>                 Key: SYNAPSE-976
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-976
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Isuru Udana Loku Narangoda
>            Assignee: Hiranya Jayathilaka
>            Priority: Minor
>         Attachments: SYNAPSE-976.patch
>
>
> When contentaware mediator is not present in the <on-fail> branch, following NPE thrown,
> 2013-09-07 22:47:42,695 [-] [PassThroughMessageProcessor-1] ERROR ValidateMediator Error accessing source element : s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1]
> java.lang.NullPointerException
> 	at org.apache.synapse.util.AXIOMUtils.asSource(AXIOMUtils.java:47)
> 	at org.apache.synapse.mediators.builtin.ValidateMediator.getValidationSource(ValidateMediator.java:301)
> 	at org.apache.synapse.mediators.builtin.ValidateMediator.mediate(ValidateMediator.java:117)
> 	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
> 	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:50)
> 	at org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:61)
> 	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
> 	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:50)
> 	at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131)
> 	at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:211)
> 	at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
> 	at org.apache.synapse.core.relay.ServiceRequestEarlyBuilder.invokeMessageReceiver(ServiceRequestEarlyBuilder.java:105)
> 	at org.apache.synapse.core.relay.ServiceRequestEarlyBuilder.invoke(ServiceRequestEarlyBuilder.java:78)
> 	at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:335)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:308)
> 	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:250)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:156)
> 	at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:412)
> 	at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:207)
> 	at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> Following is the synapse configuration.
> <definitions xmlns="http://ws.apache.org/ns/synapse">
>     <sequence name="main">
>         <in>
>             <validate>
>                 <schema key="validate_schema"/>
>                 <on-fail>
>                     <log level="custom">
>                        <property name="MSG" value="ON FAIL"/>
>                     </log>
>                     <send/> 
>                 </on-fail>
>             </validate>
>         </in>
>         <send/>
>     </sequence>
>     <localEntry key="validate_schema">
>         <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>                    xmlns="http://services.samples" elementFormDefault="qualified"
>                    attributeFormDefault="unqualified" targetNamespace="http://services.samples">
>             <xs:element name="getQuote">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element name="request">
>                             <xs:complexType>
>                                 <xs:sequence>
>                                     <xs:element name="stocksymbol" type="xs:string"/>
>                                 </xs:sequence>
>                             </xs:complexType>
>                         </xs:element>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </localEntry>
> </definitions>
> So isContentAware should be set to true in Validate Mediator.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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