[jira] [Comment Edited] (CAMEL-5469) CxfRsProducer is not thread safe

2018-02-14 Thread Alex Furmanski (JIRA)

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

Alex Furmanski edited comment on CAMEL-5469 at 2/14/18 9:08 AM:


FYI I have encountered this exception in Camel 2.15
{noformat}
java.lang.RuntimeException: java.util.ConcurrentModificationException
at 
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:233)
at 
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:164)
at 
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:90)
at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at 
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:167)
at 
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:304)
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:162)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at 
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
at 
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
at 
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:375)
at 
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:343)
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)
at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201)
at 
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
... 7 more
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
at java.util.ArrayList$Itr.next(ArrayList.java:859)
at 
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.applyFeatures(JAXRSClientFactoryBean.java:408)
at 
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.initClient(JAXRSClientFactoryBean.java:372)
at 
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:225)
... 30 more
{noformat}


was (Author: batwad):
FYI I have encountered this exception in Camel 2.15

{noformat}
java.util.concurrent.ExecutionException: 
org.apache.camel.CamelExecutionException: Exception occurred during execution 
on the exchange: Exchange[Message: hello world]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.example.ConcurrencyTest.testConcurrently(ConcurrencyTest.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4Cla

[jira] [Commented] (CAMEL-5469) CxfRsProducer is not thread safe

2018-02-13 Thread Alex Furmanski (JIRA)

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

Alex Furmanski commented on CAMEL-5469:
---

FYI I have encountered this exception in Camel 2.15

{noformat}
java.util.concurrent.ExecutionException: 
org.apache.camel.CamelExecutionException: Exception occurred during execution 
on the exchange: Exchange[Message: hello world]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.example.ConcurrencyTest.testConcurrently(ConcurrencyTest.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at 
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: hello world]
at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1635)
at 
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:645)
at 
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:471)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:133)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
at com.example.ConcurrencyTest.test(ConcurrencyTest.java:25)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.util.ConcurrentModificationException
at 
org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWebClient(JAXRSClientFactoryBean.java:233)
at 
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProduce

[jira] [Commented] (CAMEL-8151) Support a custom transport client in camel-elasticsearch

2015-01-06 Thread Alex Furmanski (JIRA)

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

Alex Furmanski commented on CAMEL-8151:
---

I agree; the client configuration options are very limited.  Another problem I 
have run in to with the TransportClient is that you can only specify one IP 
address, so there is no resiliency when that node goes down.  I'd like to be 
able to configure a list of hosts, or use the sniffing feature of the client so 
that it can discover the rest of the cluster automatically.

> Support a custom transport client in camel-elasticsearch
> 
>
> Key: CAMEL-8151
> URL: https://issues.apache.org/jira/browse/CAMEL-8151
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-elasticsearch
>Affects Versions: 2.14.0
>Reporter: Derek Abdine
>
> The camel-elasticsearch client does not support a customizable 
> TransportClient. It currently configures the client with hard-coded values 
> when the endpoint is created.
> This is problematic when fine-grain control over client creation is required. 
> Also, this causes issues for the health of the camel build, as the current 
> unit tests use a local client as a result which will spin up a full 
> elasticsearch server during the build instead of relying on a mock object for 
> the tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)