Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA0A1DB73 for ; Tue, 11 Dec 2012 16:11:23 +0000 (UTC) Received: (qmail 22441 invoked by uid 500); 11 Dec 2012 16:11:23 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 22386 invoked by uid 500); 11 Dec 2012 16:11:23 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 22366 invoked by uid 99); 11 Dec 2012 16:11:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 16:11:23 +0000 Date: Tue, 11 Dec 2012 16:11:22 +0000 (UTC) From: "Raul Kripalani (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-5864) Xml Type Conversions from byte[] are broken MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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. was: XsltBuilder.getSource(Exchange e, Object o) try to convert the payload to a Source. If you have a byte[] payload, then the following type converter will 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. > Xml Type Conversions from byte[] are broken > ------------------------------------------- > > 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. -- 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