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

Hiranya Jayathilaka updated SYNAPSE-889:
----------------------------------------

    Fix Version/s:     (was: FUTURE)
                   3.0
    
> Null pointer exception is thrown, if xpath expression doesn't match with the 
> property
> -------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-889
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-889
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: NIGHTLY
>            Reporter: Vijayaratha Vijayasingam
>            Assignee: Hiranya Jayathilaka
>            Priority: Critical
>             Fix For: 3.0
>
>         Attachments: rewrite.patch
>
>
> If  property mediator's name is different from the xpath expression provided 
> in rewrite rule, which throws NPE, since resulted xpath is null..
> exception;
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2017)
> at 
> org.apache.synapse.mediators.transform.url.RewriteAction.execute(RewriteAction.java:90)
> at 
> org.apache.synapse.mediators.transform.url.RewriteRule.rewrite(RewriteRule.java:84)
>  
> conf: 
> <inSequence>
>          <property name="protocolParam" value="s" scope="default" />
>          <rewrite>
>             <rewriterule>
>                <condition>
>                   <equal xmlns="" type="url" source="protocol" value="http" />
>                </condition>
>                <action xpath="get-property('protocolParam123')" type="append" 
> fragment="protocol" />             
>             </rewriterule>
>          </rewrite>         
>          <send />
>       </inSequence>

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to