camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11609) camel-univocity-parsers: marshaller not thread safe
Date Thu, 27 Jul 2017 21:02:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16103904#comment-16103904
] 

ASF GitHub Bot commented on CAMEL-11609:
----------------------------------------

GitHub user onders86 opened a pull request:

    https://github.com/apache/camel/pull/1855

    CAMEL-11609:thread-safety if headers get modified on the fly

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/onders86/camel CAMEL-11609

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1855.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1855
    
----
commit d6ae2bfd0ba2bb7826e7b342094406a3daf4a85b
Author: onders86 <ondersezgin@gmail.com>
Date:   2017-07-27T20:54:18Z

    CAMEL-11609:thread-safety if headers get modified on the fly

----


> camel-univocity-parsers: marshaller not thread safe
> ---------------------------------------------------
>
>                 Key: CAMEL-11609
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11609
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-csv
>    Affects Versions: 2.19.1
>            Reporter: Daniel Baldes
>
> org.apache.camel.dataformat.univocity.Marshaller.java is not thread safe.
> When this.adaptheaders is true, this.headers is modified in the wirteRow() method. This
can lead to ConcurrentModificationExceptions (see below) and jumbled headers, occasionally.
> I use a {{UnivocityCsvDataFormat}} for marshalling CSV in a route which is called in
parallel. The DataFormat creates a Marshaller with adaptheaders == true when headers are not
specified in the format.
> {code}java.util.ConcurrentModificationException: null
>             at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
>             at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742)
>             at org.apache.camel.dataformat.univocity.Marshaller.writeRow(Marshaller.java:95)
>             at org.apache.camel.dataformat.univocity.Marshaller.marshal(Marshaller.java:67)
>             at org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat.marshal(AbstractUniVocityDataFormat.java:94)
>             at org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:69)
>             at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
>             at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:541)
>             at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
>             at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
>             at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
>             at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
>             at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>             at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:124)
>             at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:436)
>             at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:119)
>             at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:541)
>             at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
>             at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
>             at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:137)
>             at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:133)
>             at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>             at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message