camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: TypeConverter issue
Date Mon, 17 Dec 2012 17:37:17 GMT
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 <
arnoud.glimmerveen@nl.thalesgroup.com> 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.
>
> ------------------------------------------------------------------------------------------------------------
>
>
>


--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message