You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2012/12/11 17:35:21 UTC
[jira] [Updated] (CAMEL-5864) Pre-XSLT and Validator Type
Conversions from byte[] may easily fail
[ https://issues.apache.org/jira/browse/CAMEL-5864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raul Kripalani updated CAMEL-5864:
----------------------------------
Description:
XsltBuilder.getSource(Exchange e, Object o) tries to convert the payload to a Source.
If you have a byte[] payload, then the following type converter will likely be picked:
{code}
InstanceMethodTypeConverter: public javax.xml.transform.sax.SAXSource
org.apache.camel.converter.jaxp.XmlConverter.toSAXSource(byte[],org.apache.camel.Exchange)
throws java.io.IOException,org.xml.sax.SAXException,javax.xml.transform.TransformerException
{code}
This type converter requires the Exchange (InstanceMethodTypeConverter.useExchange == true), but line 461 of XsltBuilder doesn't pass it on.
Therefore, a NullPointerException happens because the conversion method tries to access the Exchange.
was:
XsltBuilder.getSource(Exchange e, Object o) tries to convert the payload to a Source.
If you have a byte[] payload, then the following type converter will likely be picked:
{code}
InstanceMethodTypeConverter: public javax.xml.transform.sax.SAXSource
org.apache.camel.converter.jaxp.XmlConverter.toSAXSource(byte[],org.apache.camel.Exchange)
throws java.io.IOException,org.xml.sax.SAXException,javax.xml.transform.TransformerException
{code}
This type converter requires the Exchange (InstanceMethodTypeConverter.useExchange == true), but line 461 of XsltBuilder doesn't pass it on.
Therefore, a NullPointerException happens.
Summary: Pre-XSLT and Validator Type Conversions from byte[] may easily fail (was: Xml Type Conversions from byte[] are broken)
> Pre-XSLT and Validator Type Conversions from byte[] may easily fail
> -------------------------------------------------------------------
>
> Key: CAMEL-5864
> URL: https://issues.apache.org/jira/browse/CAMEL-5864
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-xslt
> Affects Versions: 2.10.3
> Reporter: Raul Kripalani
> Priority: Blocker
>
> XsltBuilder.getSource(Exchange e, Object o) tries to convert the payload to a Source.
> If you have a byte[] payload, then the following type converter will likely be picked:
> {code}
> InstanceMethodTypeConverter: public javax.xml.transform.sax.SAXSource
> org.apache.camel.converter.jaxp.XmlConverter.toSAXSource(byte[],org.apache.camel.Exchange)
> throws java.io.IOException,org.xml.sax.SAXException,javax.xml.transform.TransformerException
> {code}
> This type converter requires the Exchange (InstanceMethodTypeConverter.useExchange == true), but line 461 of XsltBuilder doesn't pass it on.
> Therefore, a NullPointerException happens because the conversion method tries to access the Exchange.
--
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