Solved this myself.
The AbstractMethodError was because of a CP conflict. Had an old version of
HAPI hiding out.
If you want to use HAPI and **only** need to handle the pipe format of HL7
you only need the hapi-<version>-base.jar . The xerces, xalan, and xml tools
jars are only necessary if you’re using the XML features. Note that the
GenericParser requires the XML support because it instantiates both an
XMLParser and a PipeParser. Instead of GenericParser, you should use
PIpeParser.
HTH.
*From:* Jonathan Bartels [mailto:jonath...@mirthcorp.com]
*Sent:* Tuesday, November 09, 2010 11:11 AM
*To:* hl7api-devel@lists.sourceforge.net
*Subject:* Use HAPI without XML related JARs
I’m chasing a classpath conflict between HAPI and another module in my
project, the presence of the xerces JAR for HAPI causes a problem with the
SAXParserFactory class lookup. I think the easiest way to eliminate this is
to remove the XML related JARs from my HAPI lib directory. I am not and do
not plan on using the XML parser or any other XML features of HAPI.
I replaced a GenericParser with a PipeParser since the GenericParser
instantiates an XMLParser. It **almost** works without any of the XML
related JARs. I can get rid of everything except Xerces, which is whats
causing the conflict.
The error I get is:
java.lang.AbstractMethodError:
ca.uhn.hl7v2.parser.Parser.parse(Lca/uhn/hl7v2/model/Message;Ljava/lang/String;)V
at
ca.uhn.hl7v2.model.AbstractMessage.parse(AbstractMessage.java:184)
at
com.mirth.hl7api.consumer.HL7MessageConsumer.parse(HL7MessageConsumer.java:38)
at
com.mirth.hl7api.consumer.HL7MessageConsumer.<init>(HL7MessageConsumer.java:28)
I’m digging through the HAPI source and I’m not able to tell where an XML
related class is being referenced.
Is it possible to use HAPI without any XML dependencies? If so how?
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel