[ 
https://issues.apache.org/activemq/browse/CAMEL-3277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-3277.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6.0

trunk: 1027380.

Thanks Lars for the patch.

> Threading issue which lets converter loading abort
> --------------------------------------------------
>
>                 Key: CAMEL-3277
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3277
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.4.0
>         Environment: SMX 4
>            Reporter: Lars Heinemann
>            Assignee: Claus Ibsen
>             Fix For: 2.6.0
>
>         Attachments: patch.diff
>
>
> The type converter loading is not threadsafe and fails sometimes. That will 
> end up with around 17 type converters loaded only which will probably let 
> your camel routes fail with conversion errors like:
> {noformat}
> 07:04:31,112 | ERROR | qtp25205731-2783 | DefaultErrorHandler | 
> rg.apache.camel.processor.Logger 248 | 68 - org.apache.camel.camel-core - 
> 2.4.0.fuse-00-00 | Failed delivery for exchangeId: 
> 53e23457-5551-4487-9fc4-87dd33687f0b. Exhausted after delivery attempt: 1 
> caught: java.lang.ClassCastException: 
> org.apache.camel.converter.stream.InputStreamCache cannot be cast to 
> org.w3c.dom.Node
> java.lang.ClassCastException: 
> org.apache.camel.converter.stream.InputStreamCache cannot be cast to 
> org.w3c.dom.Node
> at 
> com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:116)[:1.6.0_17]
> at 
> com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:98)[:1.6.0_17]
> at 
> com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:180)[:1.6.0_17]
> at 
> org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:598)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]
> at 
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:570)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]
> at 
> org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:122)[68:org.apache.camel.camel-core:2.4.0.fuse-00-00]
> {noformat}
> Tracking the issue down showed that several type converter loaders share the 
> same registry object and fail to load all converters every once a while. That 
> can be fixed by making the load method synchronized...see attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to