From: Tripp, B. <Bry...@uh...> - 2004-04-02 04:19:58
|
Hi Mike, Thanks for taking the time to report this, I wasn't aware of it. That's definitely something we will fix for the next release. Regards, Bryan -----Original Message----- From: Michael Harm To: hl7...@li... Sent: 01/04/2004 6:48 PM Subject: [HAPI-devel] bug: Varies class called to fix varies OBX segment in v2.1, but field 5 isn't "Varies" in v2.1 Hi. If I send a v2.1 message with an OBX segment to hapi, it crashes thusly: > [java] at ca.uhn.hl7v2.model.Varies.fixOBX5(Varies.java:130) > [java] at > ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:329) > [java] at > ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:266) > [java] at > ca.uhn.hl7v2.parser.GenericParser.parse(GenericParser.java:181) > [java] at > edu.stanford.irt.hl7dump.MyHl7Sender.parseOutbound(MyHl7Sender.java:100 > ) > [java] at > edu.stanford.irt.hl7dump.MyHl7Sender.<init>(MyHl7Sender.java:74) > [java] at > edu.stanford.irt.hl7dump.MyHl7Sender.main(MyHl7Sender.java:170) > [java] Caused by: java.lang.ClassCastException > [java] at ca.uhn.hl7v2.model.Varies.fixOBX5(Varies.java:107) > [java] ... 6 more The offending line (107) in Varies tries to cast field 5 to a Varies type, which it is in later versions of hl7. But in v2.1, it's not a Varies. Hence, class cast exception. I fixed my local copy by tossing in a catch ClassCastException statement at the bottom of fixOBX5, which just returns silently. Not sure what else it should do for v2.1.... Mike Harm mh...@st... --------------------------------------------------------------------- And I'm goin' out West, where they appreciate me. - Tom Waits, "Goin out West" ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. |