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. > > ------------------------------------------------------------------------------------------------------------ > > > --
