-
Bug
-
Resolution: Not a Bug
-
Major
-
fuse-7.5-GA, fuse-7.7-GA
-
None
-
False
-
False
-
%
-
-
Undefined
-
-
-
When initializing JMS components / dynamic endpoints under a load (for example when spinning up multiple routes with dynamic JMS producers at the same time) under Spring Boot 2 with @Bean annotated JMS configuration components, some endpoints fail with:
09:55:12.291 [Camel (MyCamel) thread #34 - timer://foo-33] WARN o.a.c.component.timer.TimerConsumer - Error processing exchange. Exchange[ID-dhawkins-remote-csb-1609599302970-0-3034]. Caused by: [java.lang.IllegalArgumentException - connectionFactory must be specified]
java.lang.IllegalArgumentException: connectionFactory must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:321)
at org.apache.camel.component.jms.JmsConfiguration.createConnectionFactory(JmsConfiguration.java:1656)
at org.apache.camel.component.jms.JmsConfiguration.getConnectionFactory(JmsConfiguration.java:782)
at org.apache.camel.component.jms.JmsConfiguration.createTemplateConnectionFactory(JmsConfiguration.java:1673)
at org.apache.camel.component.jms.JmsConfiguration.getTemplateConnectionFactory(JmsConfiguration.java:835)
at org.apache.camel.component.jms.JmsConfiguration.createInOnlyTemplate(JmsConfiguration.java:683)
at org.apache.camel.component.jms.JmsEndpoint.createInOnlyTemplate(JmsEndpoint.java:316)
at org.apache.camel.component.jms.JmsProducer.getInOnlyTemplate(JmsProducer.java:496)
at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:416)
at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:394)
at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:157)
at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178)
at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:439)
at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
The same code seems to run fine under older Camel versions with Spring Boot 1. I tried disabling lazy initialization explicitly with @Lazy(false) on the jms configuration beans and lazy-init="false" in the context, but still saw the error.