That's it! Great that it is already addressed. Thanks for looking in to it!
Regards, Arnoud. > -----Original Message----- > From: Christian Müller [mailto:[email protected]] > Sent: Monday, 17 December, 2012 18:37 > To: [email protected] > Subject: Re: TypeConverter issue > > is this covered by this JIRA [1]? > > [1] https://issues.apache.org/jira/browse/CAMEL-5864 > > Best, > Christian > > On Mon, Dec 17, 2012 at 1:59 PM, GLIMMERVEEN Arnoud < > [email protected]> wrote: > > > Hi, > > > > I've noticed an issue with TypeConverters while using the XSLT > > component, though I think it is unrelated to the XSLT component itself. > > In my route I have an Exchange where the body is a marshaled XML > > structure (body is of type byte[]) and I send that Exchange to an XSLT > > endpoint. The XSLT endpoint will try to convert the body to a > > javax.xml.transform.Source using XsltBuilder. XsltBuilder looks up a > > TypeConverter and calls the convertTo method (see XsltBuilder.java:461). > > Apparently there are multiple converters that could convert a byte[] > > to a Source and upon multiple executions of the application different > > converters are used. At least one of these converters however requires > the Exchange: > > XmlConverter.toStreamSource(byte[] in, Exchange exchange). If this > > converter is selected at lookup, a null pointer exception will be > > thrown when calling the convertTo method of that TypeConverter. > > > > I think a null check on the exchange parameter should be added to the > > type converter I mentioned. Other type converter methods in > > XmlConverter could have the same issue. Any thoughts? > > > > Regards, > > > > Arnoud > > > > P.S. I use Camel 2.10.2. > > > > > > > > > > > > ---------------------------------------------------------------------- > > -------------------------------------- > > Disclaimer: > > > > If you are not the intended recipient of this email, please notify the > > sender and delete it. > > Any unauthorized copying, disclosure or distribution of this email or > > its > > attachment(s) is forbidden. > > Thales Nederland BV will not accept liability for any damage caused by > > this email or its attachment(s). > > Thales Nederland BV is seated in Hengelo and is registered at the > > Chamber of Commerce under number 06061578. > > > > ---------------------------------------------------------------------- > > -------------------------------------- > > > > > > > > > -- ------------------------------------------------------------------------------------------------------------ Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ------------------------------------------------------------------------------------------------------------
