[ https://issues.apache.org/jira/browse/NIFI-4976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Villard resolved NIFI-4976. ---------------------------------- Resolution: Fixed Fix Version/s: 1.6.0 > ConsumeJMS occasionally failing when reading TextMessage from IBM MQ > -------------------------------------------------------------------- > > Key: NIFI-4976 > URL: https://issues.apache.org/jira/browse/NIFI-4976 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions > Reporter: Mark Payne > Assignee: Mark Payne > Priority: Major > Fix For: 1.6.0 > > > When reading from IBM MQ we will occasionally encounter a stack trace like > the following: > {code:java} > 2018-02-27 11:26:53,138 WARN [Timer-Driven Process Thread-186] > o.a.n.c.t.ContinuallyRunProcessorTask > org.apache.nifi.jms.processors.MessageBodyToBytesConverter$MessageConversionException: > Failed to convert BytesMessage to byte[] > at > org.apache.nifi.jms.processors.MessageBodyToBytesConverter.toBytes(MessageBodyToBytesConverter.java:42) > at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:84) > at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:65) > at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:494) > at org.apache.nifi.jms.processors.JMSConsumer.consume(JMSConsumer.java:65) > at > org.apache.nifi.jms.processors.ConsumeJMS.rendezvousWithJms(ConsumeJMS.java:119) > at > org.apache.nifi.jms.processors.AbstractJMSProcessor.onTrigger(AbstractJMSProcessor.java:136) > at org.apache.nifi.jms.processors.ConsumeJMS.onTrigger(ConsumeJMS.java:57) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1118) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) > 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:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCMQ1049: The > character set '1208(UTF-8) Unmappable Action: REPORT Unmappable Replacement: > 63' cannot convert some or all of the string '[B@14c194bd' > at sun.reflect.GeneratedConstructorAccessor1012.newInstance(Unknown Source) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319) > at > com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226) > at > com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromBytes(WMQUtils.java:382) > at > com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromByteBuffer(WMQUtils.java:421) > at > com.ibm.msg.client.wmq.common.internal.messages.WMQTextMessage.getText(WMQTextMessage.java:240) > at > com.ibm.msg.client.jms.internal.JmsTextMessageImpl.getText(JmsTextMessageImpl.java:205) > at com.ibm.jms.JMSTextMessage.getText(JMSTextMessage.java:124) > at > org.apache.nifi.jms.processors.MessageBodyToBytesConverter.toBytes(MessageBodyToBytesConverter.java:40) > ... 19 common frames omitted > Caused by: java.nio.charset.MalformedInputException: Input length = 1 > at java.nio.charset.CoderResult.throwException(CoderResult.java:281) > at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:816) > at com.ibm.mq.jmqi.system.JmqiCodepage.bytesToString(JmqiCodepage.java:690) > at > com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromBytes(WMQUtils.java:375) > ... 24 common frames omitted{code} > Unfortunately, if using Client Acknowledge, we end up not acknowledging the > message, since we can't read it, so it stays on the queue, and we constantly > attempt to pull it again, causing the processor to essentially become 'stuck'. > If such an issue arises, where we cannot retrieve the content of the message, > we are better off to log an ERROR with the stack trace and then acknowledge > the message even without the content. -- This message was sent by Atlassian JIRA (v7.6.3#76005)