You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/12/23 08:18:00 UTC

[jira] [Created] (CAMEL-15985) camel-jms - toD under heavy load can cause NPE when connection factory configured on JMS component level

Claus Ibsen created CAMEL-15985:
-----------------------------------

             Summary: camel-jms - toD under heavy load can cause NPE when connection factory configured on JMS component level
                 Key: CAMEL-15985
                 URL: https://issues.apache.org/jira/browse/CAMEL-15985
             Project: Camel
          Issue Type: Improvement
          Components: camel-jms
            Reporter: Claus Ibsen
             Fix For: 3.8.0


Reported on an older Camel 2.x version but there is a potential problem when a new JmsEndpoint / JmsProducer is created via toD and it creates a JmsInOnlyTemplate that seems to have a race condition causing a NPE in ConnectionFactory.

Using toD("jms:queue:${property.queuename}) in a route which normally works fine but under high load it sometimes fails with:

(stacktrace for Camel 2.x)

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)





--
This message was sent by Atlassian Jira
(v8.3.4#803005)