Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15985

camel-jms - toD under heavy load can cause NPE when connection factory configured on JMS component level

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • 3.8.0
    • camel-jms
    • None
    • Unknown

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: