2014-04-24 77 views
0

我使用Apache Camel來路由ActiveMQ消息。Apache Camel:無法爲端點創建生產者,原因:ArrayIndexOutOfBoundsException

有些時候!我得到這個例外在我的路由器:

[ERROR] DefaultErrorHandler(Camel (camel-1) thread #11 - Threads):161 - Failed delivery for (MessageId: queue_Q. ... on ExchangeId: ...). Exhausted after delivery attempt: 1 caught: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[activemq2://queue:Q.D_Test]. Reason: java.lang.ArrayIndexOutOfBoundsException: 22. Processed by failure processor: FatalFallbackErrorHandler[Channel[sendTo(Endpoint[activemqException://queue:Q.Exception_Test])]] 

和堆棧跟蹤:

org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[activemq2://queue:Q.D_Test]. Reason: java.lang.ArrayIndexOutOfBoundsException: 22 
    at org.apache.camel.component.jms.JmsProducer.initReplyManager(JmsProducer.java:107) ~[camel-jms-2.12.1.jar:2.12.1] 
    at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:177) ~[camel-jms-2.12.1.jar:2.12.1] 
    at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:142) ~[camel-jms-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline.access$100(Pipeline.java:43) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:136) [camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:83) [camel-core-2.12.1.jar:2.12.1] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_25] 
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [?:1.7.0_25] 
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [?:1.7.0_25] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_25] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_25] 
    at java.lang.Thread.run(Thread.java:724) [?:1.7.0_25] 
Caused by: java.lang.ArrayIndexOutOfBoundsException: 22 
    at java.util.ArrayList.add(ArrayList.java:412) ~[?:1.7.0_25] 
    at org.apache.camel.impl.DefaultExecutorServiceManager.onThreadPoolCreated(DefaultExecutorServiceManager.java:492) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.impl.DefaultExecutorServiceManager.newScheduledThreadPool(DefaultExecutorServiceManager.java:240) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.impl.DefaultExecutorServiceManager.newScheduledThreadPool(DefaultExecutorServiceManager.java:263) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.impl.DefaultExecutorServiceManager.newSingleThreadScheduledExecutor(DefaultExecutorServiceManager.java:232) ~[camel-core-2.12.1.jar:2.12.1] 
    at org.apache.camel.component.jms.JmsProducer.createReplyManager(JmsProducer.java:514) ~[camel-jms-2.12.1.jar:2.12.1] 
    at org.apache.camel.component.jms.JmsProducer.initReplyManager(JmsProducer.java:103) ~[camel-jms-2.12.1.jar:2.12.1] 
    ... 21 more 

爲什麼哥們?

+0

您是否使用activemq或jms組件連接到ActiveMQ?連接池怎麼樣?你正在運行什麼版本? – Ralf

+0

@Ralf:我在駱駝中使用activemq端點。我不在這臺機器上使用連接池。我只是將消息轉發給另一臺機器。 –

回答

1

你可以升級你的駱駝版本到2.12.2嗎? 我只是檢查了代碼更改,它應該修復在CAMEL-6941

相關問題