我正在使用Apache Camel路由ActiveMQ消息。
有时候!我在路由器中遇到此异常:
[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])]]
和stacktrace:
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
为什么是好友?!