You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Raj karan (JIRA)" <ji...@apache.org> on 2017/05/17 17:41:04 UTC

[jira] [Comment Edited] (NIFI-3927) Extract HL7 Attributes throwing NULLpointerException

    [ https://issues.apache.org/jira/browse/NIFI-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16014459#comment-16014459 ] 

Raj karan edited comment on NIFI-3927 at 5/17/17 5:41 PM:
----------------------------------------------------------

I can not expect to have pipe at the end of every segment, because these messages are generated by other application. Moreover I have tried adding pipe at the end of every segment and still it didn't behave as expected. I am not sure how I am going to add CRLF characters after every segment.

Just tried to parse below message:
MSH|^~\&||HNA500|||20170516093451||ADT^A04|K2231425589T4274075232X165108||2.3||||||8859/1|
EVN|A04|20170516093300|||IDWH9999^Meyers^Sid^^^^^External Identifier^Personnel^^External Identifier|
PID|1|WH999991^^WH PIN^PIN|WH999991^WH PIN^PIN|3583070390^0Ontario Health Insurance Number^HCN^HBO CPI SOURCE|Demo^Insight^Flow^^Current||19830609|Female|^^^^Preferred~Jauernig^Baby^^^Previous||474804 Dodge LineBeachville^Ontario^N0J1A0^Canada^homeBeachville (Oxford) 2628||(509)008-0421^Home^Tel^^^^Primary Phone||English|Single||999999900^^LHSC Visit Number^Visit Number|||||||0||Employed|

Every segment ends with pipe (|) and no segment repeated..


was (Author: rajkaran):
I can not expect to have pipe at the end of every segment, because these messages are generated by other application. Moreover I have tried adding pipe at the end of every segment and still it didn't behave as expected. I am not sure how I am going to add CRLF characters after every segment.

Just tried to parse below message:
MSH|^~\&||HNA500|||20170516093451||ADT^A04|K2231425589T4274075232X165108||2.3||||||8859/1|
EVN|A04|20170516093300|||IDWH9999^Meyers^Sid^^^^^^External Identifier^Personnel^^^External Identifier|
PID|1|WH999991^^^WH PIN^PIN|WH999991^^^WH PIN^PIN|3583070390^0^^Ontario Health Insurance Number^HCN^HBO CPI SOURCE|Demo^Insight^Flow^^^^Current||19830609|Female|^^^^^^Preferred~Jauernig^Baby^^^^^Previous||474804 Dodge Line^^Beachville^Ontario^N0J1A0^Canada^home^^Beachville (Oxford) 2628||(509)008-0421^Home^Tel^^^^^^Primary Phone||English|Single||999999900^^^LHSC Visit Number^Visit Number|||||||0||Employed|

Every segment ends with pipe (|) and no segment repeated..

> Extract HL7 Attributes throwing NULLpointerException
> ----------------------------------------------------
>
>                 Key: NIFI-3927
>                 URL: https://issues.apache.org/jira/browse/NIFI-3927
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.0.0
>         Environment: NiFi with HortonWorks
>            Reporter: Raj karan
>            Assignee: Joey Frazee
>         Attachments: null pointer.png, resultWithDefault.txt, source.txt, when not ended with pipe.png
>
>
> I have an HL7 file which I want to put in HBase, So I am parsing this file through ExtractHL7Attributes processor. With the default value for every property processor works with no error but resultant attributes file only have one segment. When I sets `Use Segment Names` property true it throws NULLPointerException.
> Stack trace:
> 2017-05-17 11:11:58,390 INFO [Heartbeat Monitor Thread-1] o.a.n.c.c.h.AbstractHeartbeatMonitor Finished processing 1 heartbeats in 4756 nanos
> 2017-05-17 11:11:58,847 ERROR [Timer-Driven Process Thread-2] o.a.n.p.hl7.ExtractHL7Attributes ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] Failed to extract attributes from StandardFlowFileRecord[uuid=73a649fe-261c-40d2-bad7-b0bc595c0158,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1495030753601-25550, container=default, section=974], offset=912561, length=288],offset=0,name=source.txt,size=288] due to ca.uhn.hl7v2.HL7Exception: The HL7 version 2.3
> EVN is not recognized: ca.uhn.hl7v2.HL7Exception: The HL7 version 2.3
> EVN is not recognized
> 2017-05-17 11:11:58,848 ERROR [Timer-Driven Process Thread-2] o.a.n.p.hl7.ExtractHL7Attributes 
> ca.uhn.hl7v2.HL7Exception: The HL7 version 2.3
> EVN is not recognized
> 	at ca.uhn.hl7v2.parser.Parser.assertVersionExists(Parser.java:527) ~[hapi-base-2.2.jar:na]
> 	at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:208) ~[hapi-base-2.2.jar:na]
> 	at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:1018) ~[hapi-base-2.2.jar:na]
> 	at org.apache.nifi.processors.hl7.ExtractHL7Attributes.onTrigger(ExtractHL7Attributes.java:195) ~[nifi-hl7-processors-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.0.0.2.0.2.0-17.jar:1.0.0.2.0.2.0-17]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_77]
> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_77]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_77]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_77]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
> 2017-05-17 11:11:58,852 ERROR [Timer-Driven Process Thread-1] o.a.n.p.hl7.ExtractHL7Attributes ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] failed to process due to java.lang.NullPointerException; rolling back session: java.lang.NullPointerException
> 2017-05-17 11:11:58,852 ERROR [Timer-Driven Process Thread-1] o.a.n.p.hl7.ExtractHL7Attributes 
> java.lang.NullPointerException: null
> 2017-05-17 11:11:58,852 ERROR [Timer-Driven Process Thread-1] o.a.n.p.hl7.ExtractHL7Attributes ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] failed to process session due to java.lang.NullPointerException: java.lang.NullPointerException
> 2017-05-17 11:11:58,852 ERROR [Timer-Driven Process Thread-1] o.a.n.p.hl7.ExtractHL7Attributes 
> java.lang.NullPointerException: null
> 2017-05-17 11:11:58,852 WARN [Timer-Driven Process Thread-1] o.a.n.p.hl7.ExtractHL7Attributes ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] Processor Administratively Yielded for 1 sec due to processing failure
> 2017-05-17 11:11:58,852 WARN [Timer-Driven Process Thread-1] o.a.n.c.t.ContinuallyRunProcessorTask Administratively Yielding ExtractHL7Attributes[id=bea89fef-86db-1094-ffff-ffff81c2e524] due to uncaught Exception: java.lang.NullPointerException
> 2017-05-17 11:11:58,852 WARN [Timer-Driven Process Thread-1] o.a.n.c.t.ContinuallyRunProcessorTask 
> java.lang.NullPointerException: null



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)