Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5360

Simple JMS pub-sub not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.0
    • Fix Version/s: None
    • Component/s: Extensions
    • Labels:

      Description

      A simple JMS pub-sub flow using RabbitMQ does not work.

      1. Install/setup RabbitMQ
      2. Create a JMSConnectionFactoryProvider, and configure it to work with RabbitMQ (including the required JARs amqp-client and rabbitmq-jms)
      3. Create a flow with GenerateFlowFile -> PublishJMS to publish something on a queue
      4. Create a ConsumeJMS processor that attempts to recover what was just published

      Result: when the message is consumed, the ClassLoader does not have the JMS libraries.

      2018-06-28 15:47:27,161 ERROR [Timer-Driven Process Thread-9] o.apache.nifi.jms.processors.ConsumeJMS ConsumeJMS[id=01641047-1441-10a4-ce22-23d392689dd9] ConsumeJMS[id=01641047-1441-10a4-ce22-23d392689dd9] failed to process session due to org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is com.rabbitmq.jms.util.RMQJMSException: com.rabbitmq.jms.client.message.RMQTextMessage; Processor Administratively Yielded for 1 sec: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is com.rabbitmq.jms.util.RMQJMSException: com.rabbitmq.jms.client.message.RMQTextMessageorg.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is com.rabbitmq.jms.util.RMQJMSException: com.rabbitmq.jms.client.message.RMQTextMessage               at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)               at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)               at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:497)               at org.apache.nifi.jms.processors.JMSConsumer.consume(JMSConsumer.java:85)               at org.apache.nifi.jms.processors.ConsumeJMS.rendezvousWithJms(ConsumeJMS.java:181)               at org.apache.nifi.jms.processors.ConsumeJMS.rendezvousWithJms(ConsumeJMS.java:59)               at org.apache.nifi.jms.processors.AbstractJMSProcessor.onTrigger(AbstractJMSProcessor.java:157)               at org.apache.nifi.jms.processors.ConsumeJMS.onTrigger(ConsumeJMS.java:59)               at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)               at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1147)               at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:175)               at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)               at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)               at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)               at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)               at java.lang.Thread.run(Thread.java:748)Caused by: com.rabbitmq.jms.util.RMQJMSException: com.rabbitmq.jms.client.message.RMQTextMessage               at com.rabbitmq.jms.client.RMQMessage.instantiateRmqMessage(RMQMessage.java:1070)               at com.rabbitmq.jms.client.RMQMessage.fromMessage(RMQMessage.java:1030)               at com.rabbitmq.jms.client.RMQMessage.convertJmsMessage(RMQMessage.java:871)               at com.rabbitmq.jms.client.RMQMessage.convertMessage(RMQMessage.java:865)               at com.rabbitmq.jms.client.RMQMessageConsumer.receive(RMQMessageConsumer.java:331)               at com.rabbitmq.jms.client.RMQMessageConsumer.receive(RMQMessageConsumer.java:246)               at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:95)               at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:85)               at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:494)               ... 16 common frames omittedCaused by: java.lang.ClassNotFoundException: com.rabbitmq.jms.client.message.RMQTextMessage               at java.net.URLClassLoader.findClass(URLClassLoader.java:381)               at java.lang.ClassLoader.loadClass(ClassLoader.java:424)               at java.lang.ClassLoader.loadClass(ClassLoader.java:357)               at java.lang.Class.forName0(Native Method)               at java.lang.Class.forName(Class.java:348)               at com.rabbitmq.jms.client.RMQMessage.instantiateRmqMessage(RMQMessage.java:1064)               ... 24 common frames omitted

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kelseyrider Kelsey Rider
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: