You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(3) |
Aug
(13) |
Sep
(28) |
Oct
(33) |
Nov
(8) |
Dec
(1) |
2003 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(25) |
May
(21) |
Jun
(13) |
Jul
(12) |
Aug
(14) |
Sep
(6) |
Oct
(6) |
Nov
(16) |
Dec
(6) |
2004 |
Jan
(5) |
Feb
(7) |
Mar
(13) |
Apr
(17) |
May
(24) |
Jun
(14) |
Jul
(14) |
Aug
(8) |
Sep
(3) |
Oct
(8) |
Nov
(14) |
Dec
(26) |
2005 |
Jan
(18) |
Feb
(12) |
Mar
(29) |
Apr
(9) |
May
(4) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(12) |
Oct
|
Nov
(12) |
Dec
|
2006 |
Jan
(46) |
Feb
(18) |
Mar
(11) |
Apr
(13) |
May
(12) |
Jun
(27) |
Jul
(34) |
Aug
(45) |
Sep
(27) |
Oct
(13) |
Nov
(26) |
Dec
(22) |
2007 |
Jan
(21) |
Feb
(29) |
Mar
(32) |
Apr
(6) |
May
(11) |
Jun
(13) |
Jul
(14) |
Aug
(11) |
Sep
(15) |
Oct
(7) |
Nov
(30) |
Dec
(16) |
2008 |
Jan
(11) |
Feb
(14) |
Mar
(5) |
Apr
(18) |
May
(12) |
Jun
(11) |
Jul
(5) |
Aug
(12) |
Sep
(3) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
2009 |
Jan
(18) |
Feb
(6) |
Mar
(9) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(44) |
Aug
(49) |
Sep
(14) |
Oct
(21) |
Nov
(11) |
Dec
(22) |
2010 |
Jan
(12) |
Feb
(13) |
Mar
(5) |
Apr
(6) |
May
(15) |
Jun
(15) |
Jul
(14) |
Aug
(20) |
Sep
(17) |
Oct
(36) |
Nov
(19) |
Dec
(7) |
2011 |
Jan
(8) |
Feb
(14) |
Mar
(21) |
Apr
(12) |
May
(6) |
Jun
(12) |
Jul
(17) |
Aug
(6) |
Sep
(13) |
Oct
(15) |
Nov
(26) |
Dec
(9) |
2012 |
Jan
(25) |
Feb
(13) |
Mar
(31) |
Apr
(10) |
May
(16) |
Jun
(21) |
Jul
(61) |
Aug
(38) |
Sep
(16) |
Oct
(13) |
Nov
(37) |
Dec
(26) |
2013 |
Jan
(20) |
Feb
(26) |
Mar
(34) |
Apr
(32) |
May
(27) |
Jun
(56) |
Jul
(16) |
Aug
(38) |
Sep
(35) |
Oct
(17) |
Nov
(11) |
Dec
(7) |
2014 |
Jan
(36) |
Feb
(13) |
Mar
(25) |
Apr
|
May
(27) |
Jun
(33) |
Jul
(34) |
Aug
|
Sep
(4) |
Oct
(11) |
Nov
(42) |
Dec
(2) |
2015 |
Jan
(5) |
Feb
(6) |
Mar
(11) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(8) |
Dec
(19) |
2016 |
Jan
(8) |
Feb
(12) |
Mar
(6) |
Apr
(5) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2017 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
(14) |
Aug
(10) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(9) |
Mar
(2) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(8) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2019 |
Jan
(10) |
Feb
(2) |
Mar
(6) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
(9) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(11) |
Dec
|
2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
From: James A. <ja...@ja...> - 2014-10-14 21:55:10
|
Hi Tim, Strangely I'm not seeing the same behaviour when I created a unit test to try this out. Do you see the same results with the following? @Test public void testEncodeDoesntChangeStructure() throws HL7Exception { String message = "MSH|^~\\&|SYSTEM|XXX|CLOVERLEAF|XXX|20141001170652|RISTECH|ORM^O01|1262|T|2.4|||||||||\r" + "PID|1||1234567^^^XXX^PI~100000000^^^NLMINBIZA^NNNLD||TEST&&TEST^T^^^^^L||19761201|M|TEST^^^||STREET 10&STREET&10^^CITY^^1234^NLD^M||^PRN^PH^^31|^WPN^PH^^31||||14205|188780348|||||||||||||\r" + "PD1||||||||||||||||||\r" + "PV1||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|||||||||||14205|||||||||||||||||||||||||20141001152757|||||||V\r" + "ORC|NW|66955^EPC|743||Arrived||^^^20141001130500^^R||20141001170652|RISTECH^RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I|\r" + "OBR|1|66955^EPC|743|^^^1052000729^DMSA UPTAKESCAN^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI||743|743|E32||||NM|Arrived||^^^20141001130500^^R||||^test|||||20141001130500||||||||^^^1052000729^DMSA UPTAKE SCAN^L|\r" + "ORC|NW|66955^EPC|743||Planned||^^^20141001110500^^R||20141001170652|RISTECH^RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I|\r" + "OBR|1|66955^EPC|743|^^^1052000728^INJECTION DMSA^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI||743|743|E33||||NM|Planned||^^^20141001110500^^R||||^test|||||20141001110500||||||||^^^1052000728^INJECTION DMSA^L|\r" + "OBX|1|ST|WEIGHT^Weight patient (kg):||70|KG\r" + "OBX|2|ST|LENGTH^Length patient (cm):||180|CM\r"; ca.uhn.hl7v2.model.v24.message.ORM_O01 orm = new ca.uhn.hl7v2.model.v24.message.ORM_O01(); orm.parse(message); message.toString(); ourLog.info(orm.printStructure()); int orderCount = orm.getORDERReps(); for (int i = 0; i < orderCount; i++) { ourLog.info("order("+i+") #OBX : " + orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); if (i == 0) { assertEquals(0, orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); } if (i == 1) { assertEquals(2, orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); } } } On Tue, Oct 14, 2014 at 4:45 AM, Tim de Wit <t.c...@gm...> wrote: > hi all, > > i'm busy developing an ORM-interface using Hapi v2.2 and encountered some > very strange behaviour when reading out OBX segments from the following > multiple-order ORM_O01 message: > > > MSH|^~\&|SYSTEM|XXX|CLOVERLEAF|XXX|20141001170652|RISTECH|ORM^O01|1262|T|2.4 > ||||||||| > > PID|1||1234567^^^XXX^PI~100000000^^^NLMINBIZA^NNNLD||TEST&&TEST^T^^^^^L||197 > 61201|M|TEST^^^||STREET > > 10&STREET&10^^CITY^^1234^NLD^M||^PRN^PH^^31|^WPN^PH^^31||||14205|188780348|| > ||||||||||| > PD1|||||||||||||||||| > > PV1||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|||||||||||14205| > ||||||||||||||||||||||||20141001152757|||||||V > > ORC|NW|66955^EPC|743||Arrived||^^^20141001130500^^R||20141001170652|RISTECH^ > > RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| > 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| > OBR|1|66955^EPC|743|^^^1052000729^DMSA UPTAKE > > SCAN^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ > > ^^NPI||743|743|E32||||NM|Arrived||^^^20141001130500^^R||||^test|||||20141001 > 130500||||||||^^^1052000729^DMSA UPTAKE SCAN^L| > > ORC|NW|66955^EPC|743||Planned||^^^20141001110500^^R||20141001170652|RISTECH^ > > RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| > 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| > OBR|1|66955^EPC|743|^^^1052000728^INJECTION > > DMSA^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ > > ^^NPI||743|743|E33||||NM|Planned||^^^20141001110500^^R||||^test|||||20141001 > 110500||||||||^^^1052000728^INJECTION DMSA^L| > OBX|1|ST|WEIGHT^Weight patient (kg):||70|KG > OBX|2|ST|LENGTH^Length patient (cm):||180|CM > > This message contains two orders (2x ORC+OBR), with the first order having > no OBX and the second having two OBX segments. The following code: > > ORM_O01 orm = (ORM_O01) message; > //System.out.println(orm.toString()); > int orderCount = orm.getORDERReps(); > for (int i = 0; i < orderCount; i++) { > System.out.println("order("+i+") #OBX : " + > orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); > } > > gives the expected output: > order(0) #OBX : 0 > order(1) #OBX : 2 > > However... if i uncomment the .toString() line, i get the following wrong > output: > order(0) #OBX : 1 > order(1) #OBX : 2 > The same thing also happens if i use > "System.out.println(message.toString())" instead. > > Any ideas what i'm doing wrong? > > kind regards, > > Tim de Wit > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |
From: Tim de W. <t.c...@gm...> - 2014-10-14 08:50:14
|
hi all, i'm busy developing an ORM-interface using Hapi v2.2 and encountered some very strange behaviour when reading out OBX segments from the following multiple-order ORM_O01 message: MSH|^~\&|SYSTEM|XXX|CLOVERLEAF|XXX|20141001170652|RISTECH|ORM^O01|1262|T|2.4 ||||||||| PID|1||1234567^^^XXX^PI~100000000^^^NLMINBIZA^NNNLD||TEST&&TEST^T^^^^^L||197 61201|M|TEST^^^||STREET 10&STREET&10^^CITY^^1234^NLD^M||^PRN^PH^^31|^WPN^PH^^31||||14205|188780348|| ||||||||||| PD1|||||||||||||||||| PV1||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI|||||||||||14205| ||||||||||||||||||||||||20141001152757|||||||V ORC|NW|66955^EPC|743||Arrived||^^^20141001130500^^R||20141001170652|RISTECH^ RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| OBR|1|66955^EPC|743|^^^1052000729^DMSA UPTAKE SCAN^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ ^^NPI||743|743|E32||||NM|Arrived||^^^20141001130500^^R||||^test|||||20141001 130500||||||||^^^1052000729^DMSA UPTAKE SCAN^L| ORC|NW|66955^EPC|743||Planned||^^^20141001110500^^R||20141001170652|RISTECH^ RADIOLOGY^TECHNOLOGIST.^^||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^^^NPI| 101001103^^^101001^^^^^NUCLEAR MEDICINE||||||||||||||||I| OBR|1|66955^EPC|743|^^^1052000728^INJECTION DMSA^L|R|20141001152757||||||||||1106199999^GENERAL^SPECIALIST^^^^^^VEKTIS^^ ^^NPI||743|743|E33||||NM|Planned||^^^20141001110500^^R||||^test|||||20141001 110500||||||||^^^1052000728^INJECTION DMSA^L| OBX|1|ST|WEIGHT^Weight patient (kg):||70|KG OBX|2|ST|LENGTH^Length patient (cm):||180|CM This message contains two orders (2x ORC+OBR), with the first order having no OBX and the second having two OBX segments. The following code: ORM_O01 orm = (ORM_O01) message; //System.out.println(orm.toString()); int orderCount = orm.getORDERReps(); for (int i = 0; i < orderCount; i++) { System.out.println("order("+i+") #OBX : " + orm.getORDER(i).getORDER_DETAIL().getOBSERVATIONReps()); } gives the expected output: order(0) #OBX : 0 order(1) #OBX : 2 However... if i uncomment the .toString() line, i get the following wrong output: order(0) #OBX : 1 order(1) #OBX : 2 The same thing also happens if i use "System.out.println(message.toString())" instead. Any ideas what i'm doing wrong? kind regards, Tim de Wit |
From: James A. <ja...@ja...> - 2014-09-10 21:39:28
|
Hi Harvey, The datatypes change a little but from version to version of HL7. If you're using version 2.2 MSH-3 is ST, whereas in version 2.3 it is HD (which is what the code above is expecting). If you're using HL7 2.2 you can call getSendingApplication().setValue("foo"); directly. Cheers, James On Wed, Sep 10, 2014 at 3:15 PM, King Harvey <har...@gm...> wrote: > > Good afternoon, > > I am trying to create an HL7 message using the HAPI library and I was > hoping to get some insight about the way your examples are creating them. > The first question at the moment deals with the following lines: > MSH mshSegment = adt.getMSH(); > mshSegment.getSendingApplication().getNamespaceID().setValue( > "TestSendingSystem"); > > How/why are you chaining getNamespaceID() if the getSendingApplication > method is of type ST? This class does not inherit the HD class nor does the > MSH class. Thank you for your attention and I apologize in advance if I've > overlooked the reasoning. Does it have something to do with Serializable? > |
From: Mike M. <mi...@th...> - 2014-09-10 00:33:25
|
James, Thanks for that, I can confirm that this test now passes. I also found the following dependencies on the pom are not required for test panel builds: <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>1.8.5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.netbeans.api</groupId> <artifactId>org-netbeans-swing-outline</artifactId> <version>RELEASE73</version> <classifier>sources</classifier> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> <optional>true</optional> </dependency> -Mike On Wed, Sep 10, 2014 at 7:39 AM, James Agnew <ja...@ja...> wrote: > Hi Mike, > > That assert looks like it's just an old artifact that should have been > removed. I've removed it from the repo and also applied your correction to > the readerinputstream. With those two changes, the tests all pass for me. > Can you give it a whirl? (and thanks for the fix!) > > Cheers, > James > > On Mon, Sep 8, 2014 at 12:49 AM, Mike Mills <mi...@th...> wrote: > >> Hello, >> >> I have just checked out hapi-testpanel and tried to compile/test. >> >> The test code fails to compile for >> class ByteCapturingMinLowerLayerProtocolWrapperTest. >> >> It is missing the org.openide.util.io.ReaderInputStream class. >> >> A simple code change of line 53 from >> >> >> InputStream iis = new ReaderInputStream(new StringReader(expected)); >> >> to: >> >> InputStream iis = new ByteArrayInputStream(expected.getBytes()); >> >> removes use of the offending class and the test compiles and works. >> >> >> I still get a failure of this test: >> >> PrefsTest.testRecentFiles() >> >> It fails with an Assertion Error (java assertion not junit): >> >> java.lang.AssertionError >> at >> ca.uhn.hl7v2.testpanel.controller.Prefs.getRecentMessageXmlFiles(Prefs.java:391) >> at >> ca.uhn.hl7v2.testpanel.controller.PrefsTest.testRecentFiles(PrefsTest.java:28) >> >> Can anyone point me in the correct direction to fix this? >> >> Kind regards, >> >> -Mike >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce >> Perforce version control. Predictably reliable. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > |
From: James A. <ja...@ja...> - 2014-09-09 21:39:42
|
Hi Mike, That assert looks like it's just an old artifact that should have been removed. I've removed it from the repo and also applied your correction to the readerinputstream. With those two changes, the tests all pass for me. Can you give it a whirl? (and thanks for the fix!) Cheers, James On Mon, Sep 8, 2014 at 12:49 AM, Mike Mills <mi...@th...> wrote: > Hello, > > I have just checked out hapi-testpanel and tried to compile/test. > > The test code fails to compile for > class ByteCapturingMinLowerLayerProtocolWrapperTest. > > It is missing the org.openide.util.io.ReaderInputStream class. > > A simple code change of line 53 from > > > InputStream iis = new ReaderInputStream(new StringReader(expected)); > > to: > > InputStream iis = new ByteArrayInputStream(expected.getBytes()); > > removes use of the offending class and the test compiles and works. > > > I still get a failure of this test: > > PrefsTest.testRecentFiles() > > It fails with an Assertion Error (java assertion not junit): > > java.lang.AssertionError > at > ca.uhn.hl7v2.testpanel.controller.Prefs.getRecentMessageXmlFiles(Prefs.java:391) > at > ca.uhn.hl7v2.testpanel.controller.PrefsTest.testRecentFiles(PrefsTest.java:28) > > Can anyone point me in the correct direction to fix this? > > Kind regards, > > -Mike > > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Mike M. <mi...@th...> - 2014-09-08 05:12:10
|
Hello, I have just checked out hapi-testpanel and tried to compile/test. The test code fails to compile for class ByteCapturingMinLowerLayerProtocolWrapperTest. It is missing the org.openide.util.io.ReaderInputStream class. A simple code change of line 53 from InputStream iis = new ReaderInputStream(new StringReader(expected)); to: InputStream iis = new ByteArrayInputStream(expected.getBytes()); removes use of the offending class and the test compiles and works. I still get a failure of this test: PrefsTest.testRecentFiles() It fails with an Assertion Error (java assertion not junit): java.lang.AssertionError at ca.uhn.hl7v2.testpanel.controller.Prefs.getRecentMessageXmlFiles(Prefs.java:391) at ca.uhn.hl7v2.testpanel.controller.PrefsTest.testRecentFiles(PrefsTest.java:28) Can anyone point me in the correct direction to fix this? Kind regards, -Mike |
From: James A. <ja...@ja...> - 2014-07-30 21:32:27
|
Hi Sara, HAPI is expecting an HTTP 200 response (not 201) and an HL7 content type (not text/plain), per the HL7 over HTTP specification. It may be worth checking with OpenHIE developers whether it can be configured to send the needed content type and status code. If not, you may end up having to code up a client manually.. Or you could try modifying the HL7 over HTTP library to be more lenient I suppose. Cheers, James On Wed, Jul 30, 2014 at 1:21 PM, Sara Fatima <sar...@gm...> wrote: > Hi all, > > I am using Hapi over http > <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> example to > send PIX message to OpenHIE, since OpenHIE expects an XML request, I have > passed DefaultXMLParser object to HOHClientSimple. > > But at line IReceivable<Message> receivable = > client.sendAndReceiveMessage(sendable); I am facing below exception. > ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: > text/plain. > > To my knowledge OpenHIE responds with a HTTP 201 status if the sending was > successful. However I am not clear what hapi is expecting as a response. > Could someone guide me with this? > > Thanks & Regards > Sara Fatima > > > > ------------------------------------------------------------------------------ > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Sara F. <sar...@gm...> - 2014-07-30 20:21:19
|
Hi all, I am using Hapi over http <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> example to send PIX message to OpenHIE, since OpenHIE expects an XML request, I have passed DefaultXMLParser object to HOHClientSimple. But at line IReceivable<Message> receivable = client.sendAndReceiveMessage(sendable); I am facing below exception. ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: text/plain. To my knowledge OpenHIE responds with a HTTP 201 status if the sending was successful. However I am not clear what hapi is expecting as a response. Could someone guide me with this? Thanks & Regards Sara Fatima |
From: James A. <ja...@ja...> - 2014-07-24 12:20:02
|
This just means that the server is replying with the wrong content type. Next step would be to find out why the server isn't using an HL7 content type in their response. sent from my phone. On Jul 23, 2014 1:14 PM, "Sara Fatima" <sar...@gm...> wrote: > Hi James, > > As you suggested, I am passing DefaultXMLParser object to HohClientSimple > constructor. > > // Create a parser > Parser parser = new DefaultXMLParser(); > // Create a client > HohClientSimple client = new HohClientSimple(host,port,uri,parser); > > However at below line, > IReceivable<Message> receivable = client.sendAndReceiveMessage(sendable); > > I am facing the same NonHL7ResponseException, > ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: > text/plain > at > ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) > at > ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) > at > ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) > at > ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) > > Could you suggest what could be going wrong? > > Thanks & Regards > Sara Fatima > > > > On Wed, Jul 23, 2014 at 1:33 AM, James Agnew <ja...@ja...> wrote: > >> Hi Sara, >> >> To send XML encoded messages, you need to pass an instance of >> DefaultXMLParser into the constructor of HohClientSimple. The client >> internally uses whatever parser it is passed (the sample you linked to uses >> a pipe parser) to encode the message object. >> >> Cheers, >> James >> >> >> On Tue, Jul 22, 2014 at 3:33 PM, Sara Fatima <sar...@gm...> >> wrote: >> >>> Hi all, >>> >>> I am using this example >>> <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> to send >>> hl7 message over http. My aim is to send a PIX message to an OpenHIE end >>> point. The message is being send to the below host: >>> >>> - Host: iol.sandbox.ohie.org >>> - Port: 5001 >>> - Basic auth details: >>> - username: admin >>> - password: admin >>> - HTTP method: POST >>> - HTTP Path: /ws/rest/v1/patients/ >>> >>> However at the below line IReceivable<Message> receivable = >>> client.sendAndReceiveMessage(sendable); I am facing an exception. >>> This is the exception which I am facing: >>> >>> >>> ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: >>> text/plain >>> at >>> ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) >>> at >>> ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) >>> at >>> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) >>> at >>> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) >>> at >>> ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) >>> at >>> ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) >>> at >>> org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:164) >>> at >>> org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) >>> at >>> org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) >>> at >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>> at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) >>> >>> I understand that OpenHIE is expecting the message to be in XML format, >>> so I did the below, >>> >>> //Converting the hl7 message into xml >>> Parser pipeParser = new PipeParser(); >>> String encodedMessage = pipeParser.encode(adt); >>> System.out.println(encodedMessage); >>> pipeParser = new DefaultXMLParser(); >>> String xmlMessage = pipeParser.encode(adt); >>> ISendable sendable = new MessageSendable(xmlMessage); // However here >>> it is expecting a Message object, hence I cannot provide xmlMessage. >>> Could someone guide me how I could resolve this issue? >>> Thanks & Regards >>> Sara Fatima >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Want fast and easy access to all the code in your enterprise? Index and >>> search up to 200,000 lines of code with a free copy of Black Duck >>> Code Sight - the same software that powers the world's largest code >>> search on Ohloh, the Black Duck Open Hub! Try it now. >>> http://p.sf.net/sfu/bds >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> > |
From: Sara F. <sar...@gm...> - 2014-07-23 17:14:12
|
Hi James, As you suggested, I am passing DefaultXMLParser object to HohClientSimple constructor. // Create a parser Parser parser = new DefaultXMLParser(); // Create a client HohClientSimple client = new HohClientSimple(host,port,uri,parser); However at below line, IReceivable<Message> receivable = client.sendAndReceiveMessage(sendable); I am facing the same NonHL7ResponseException, ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: text/plain at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) at ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) at ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) Could you suggest what could be going wrong? Thanks & Regards Sara Fatima On Wed, Jul 23, 2014 at 1:33 AM, James Agnew <ja...@ja...> wrote: > Hi Sara, > > To send XML encoded messages, you need to pass an instance of > DefaultXMLParser into the constructor of HohClientSimple. The client > internally uses whatever parser it is passed (the sample you linked to uses > a pipe parser) to encode the message object. > > Cheers, > James > > > On Tue, Jul 22, 2014 at 3:33 PM, Sara Fatima <sar...@gm...> > wrote: > >> Hi all, >> >> I am using this example >> <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> to send >> hl7 message over http. My aim is to send a PIX message to an OpenHIE end >> point. The message is being send to the below host: >> >> - Host: iol.sandbox.ohie.org >> - Port: 5001 >> - Basic auth details: >> - username: admin >> - password: admin >> - HTTP method: POST >> - HTTP Path: /ws/rest/v1/patients/ >> >> However at the below line IReceivable<Message> receivable = >> client.sendAndReceiveMessage(sendable); I am facing an exception. >> This is the exception which I am facing: >> >> >> ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: >> text/plain >> at >> ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) >> at >> ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) >> at >> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) >> at >> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) >> at >> ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) >> at >> ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) >> at >> org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:164) >> at >> org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) >> at >> org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) >> >> I understand that OpenHIE is expecting the message to be in XML format, >> so I did the below, >> >> //Converting the hl7 message into xml >> Parser pipeParser = new PipeParser(); >> String encodedMessage = pipeParser.encode(adt); >> System.out.println(encodedMessage); >> pipeParser = new DefaultXMLParser(); >> String xmlMessage = pipeParser.encode(adt); >> ISendable sendable = new MessageSendable(xmlMessage); // However here >> it is expecting a Message object, hence I cannot provide xmlMessage. >> Could someone guide me how I could resolve this issue? >> Thanks & Regards >> Sara Fatima >> >> >> >> ------------------------------------------------------------------------------ >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > |
From: James A. <ja...@ja...> - 2014-07-22 20:04:09
|
Hi Sara, To send XML encoded messages, you need to pass an instance of DefaultXMLParser into the constructor of HohClientSimple. The client internally uses whatever parser it is passed (the sample you linked to uses a pipe parser) to encode the message object. Cheers, James On Tue, Jul 22, 2014 at 3:33 PM, Sara Fatima <sar...@gm...> wrote: > Hi all, > > I am using this example > <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> to send > hl7 message over http. My aim is to send a PIX message to an OpenHIE end > point. The message is being send to the below host: > > - Host: iol.sandbox.ohie.org > - Port: 5001 > - Basic auth details: > - username: admin > - password: admin > - HTTP method: POST > - HTTP Path: /ws/rest/v1/patients/ > > However at the below line IReceivable<Message> receivable = > client.sendAndReceiveMessage(sendable); I am facing an exception. > This is the exception which I am facing: > > > ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: > text/plain > at > ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) > at > ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) > at > ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) > at > ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) > at > org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:164) > at > org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) > at > org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) > > I understand that OpenHIE is expecting the message to be in XML format, so > I did the below, > > //Converting the hl7 message into xml > Parser pipeParser = new PipeParser(); > String encodedMessage = pipeParser.encode(adt); > System.out.println(encodedMessage); > pipeParser = new DefaultXMLParser(); > String xmlMessage = pipeParser.encode(adt); > ISendable sendable = new MessageSendable(xmlMessage); // However here it > is expecting a Message object, hence I cannot provide xmlMessage. > Could someone guide me how I could resolve this issue? > Thanks & Regards > Sara Fatima > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Sara F. <sar...@gm...> - 2014-07-22 19:33:33
|
Hi all, I am using this example <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> to send hl7 message over http. My aim is to send a PIX message to an OpenHIE end point. The message is being send to the below host: - Host: iol.sandbox.ohie.org - Port: 5001 - Basic auth details: - username: admin - password: admin - HTTP method: POST - HTTP Path: /ws/rest/v1/patients/ However at the below line IReceivable<Message> receivable = client.sendAndReceiveMessage(sendable); I am facing an exception. This is the exception which I am facing: ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: text/plain at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233) at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279) at ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55) at ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161) at org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:164) at org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) I understand that OpenHIE is expecting the message to be in XML format, so I did the below, //Converting the hl7 message into xml Parser pipeParser = new PipeParser(); String encodedMessage = pipeParser.encode(adt); System.out.println(encodedMessage); pipeParser = new DefaultXMLParser(); String xmlMessage = pipeParser.encode(adt); ISendable sendable = new MessageSendable(xmlMessage); // However here it is expecting a Message object, hence I cannot provide xmlMessage. Could someone guide me how I could resolve this issue? Thanks & Regards Sara Fatima |
From: Christian O. <chr...@gm...> - 2014-07-22 12:28:59
|
No, unfortunately HAPI doesn't support batch messages Christian 2014-07-22 10:52 GMT+02:00 Pablo León <pab...@ho...>: > Hi, > > If so, where can I find an usage example? > > Regards, > > Pablo. > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |
From: James A. <ja...@ja...> - 2014-07-22 12:27:02
|
Hi Pablo, Unfortunately not. We've never had any systems here that use it, so we've never been able to play with batch mode. I don't think it would be hard to implement though if anyone felt inclined to give it a shot.. :) James On Tue, Jul 22, 2014 at 4:52 AM, Pablo León <pab...@ho...> wrote: > Hi, > > If so, where can I find an usage example? > > Regards, > > Pablo. > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |
From: Pablo L. <pab...@ho...> - 2014-07-22 08:52:49
|
Hi, If so, where can I find an usage example? Regards, Pablo. |
From: James A. <ja...@ja...> - 2014-07-22 01:49:14
|
Hi Ian, I was able to recreate this, and it's a bug all right. I'll put a fix in, but I was able to work around it in the current version of HAPI by using a newly created parser that had validation disabled. The following snippet (which is kind of weird but does demonstrate a workaround..) works for me: ADT_AXX msg = new ADT_AXX(); String message = "MSH|^~\\&|NES|NINTENDO|AGNEW|CORNERCUBICLE|20010101000000||ADT^A01|Q123456789T123456789X123456|P|2.3\r\n" + "PID|2||123456789|0123456789^AA^^JP|BROS^MARIO^^^^||19850101000000|M|||123 FAKE STREET^MARIO \\T\\ LUIGI BROS PLACE^TOADSTOOL KINGDOM^NES^A1B2C3^JP^HOME^^1234|1234|(555)555-0123^HOME^JP:1234567|||S|MSH|12345678|||||||0|||||N\r\n" ; msg.parse(message); msg.addNonstandardSegment("ZZZ"); GenericSegment zzz = (GenericSegment) msg.get("ZZZ"); zzz.parse("ZZZ|1|2"); DefaultHapiContext ctx = new DefaultHapiContext(); ctx.setValidationContext(new ValidationContextImpl()); String out = ctx.getPipeParser().encode(msg); ourLog.info(out); Cheers, James On Mon, Jul 21, 2014 at 7:37 PM, Ian Vowles <Ian...@he...> wrote: > In the current transformation I am working on I thought I would try using > the ADT_AXX superstructure, since multiple ADT types need to be handled. > Some complexity was present, given that the inbound has several > Z-Segments, which I have built definitions for, and the outbound has one of > a different structure to the inbounds. > > Snippets from the code dealing with them are shown below. The hl7In > mentioned is of ADT_AXX type. > > ADT_AXX hl7Out = new ADT_AXX(); > hl7Out.setValidationContext(new NoValidation()); > ZPX zpxIn = new ZPX(hl7In.getParent(), > hl7In.getModelClassFactory()); > ZVX zvxIn = new ZVX(hl7In.getParent(), > hl7In.getModelClassFactory()); > GenericSegment zSeg; > try { > zSeg = (GenericSegment) hl7In.getINSURANCE().get("ZPX"); > zpxIn.parse(zSeg.encode()); > } catch (HL7Exception ex) { > // Problem finding zpx leave it empty > } > try { > zSeg = (GenericSegment) hl7In.getINSURANCE().get("ZVX"); > zvxIn.parse(zSeg.encode()); > } catch (HL7Exception ex) { > // Problem finding zvx, leave it empty > } > > hl7Out.addNonstandardSegment("ZPD"); > GenericSegment zpdGen = (GenericSegment) hl7Out.get("ZPD"); > ZpdEdis zpdOut = new ZpdEdis(hl7Out.getParent(), > hl7Out.getModelClassFactory()); > SegmentTranslation.processZpd(zpxIn, hl7In.getPV1(), zvxIn, > zpdOut); > zpdGen.parse(zpdOut.encode()); > > All of this works very nicely, and all was proceeding through test cases > for different message types with me reviewing the content of a > .printstructure(). > I got a nasty surprise when I finally came to .encode() the result: > > java.lang.NullPointerException > at > java.util.Collections$UnmodifiableCollection.<init>(Collections.java:994) > at > java.util.Collections$UnmodifiableSet.<init>(Collections.java:1066) > at java.util.Collections.unmodifiableSet(Collections.java:1056) > at > ca.uhn.hl7v2.model.AbstractSuperMessage.getStructuresWhichChildAppliesTo(AbstractSuperMessage.java:78) > at > ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.checkStructure(OnlyAllowableSegmentsInSuperstructureRule.java:71) > at > ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.apply(OnlyAllowableSegmentsInSuperstructureRule.java:55) > at > ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.apply(OnlyAllowableSegmentsInSuperstructureRule.java:46) > at > ca.uhn.hl7v2.validation.AbstractValidator.testMessageRules(AbstractValidator.java:98) > at > ca.uhn.hl7v2.validation.AbstractValidator.validate(AbstractValidator.java:82) > at > ca.uhn.hl7v2.parser.Parser.assertMessageValidates(Parser.java:611) > at ca.uhn.hl7v2.parser.Parser.encode(Parser.java:275) > at ca.uhn.hl7v2.parser.PipeParser.encode(PipeParser.java:1003) > at > ca.uhn.hl7v2.model.AbstractMessage.encode(AbstractMessage.java:207) > at > au.gov.qld.health.sit.transform.hl7.HbcisNormAdtTxEdisTest.testTransformA01(HbcisNormAdtTxEdisTest.java:81) > > Doing a .setValidationContext(new NoVAlidation) on the result message does > not prevent the error. > > Is there anything I can do to enable this result to .encode()? The > prinstructure() shows everything exactly as I want it. > > Thanks > Ian > > > ******************************************************************************** > This email, including any attachments sent with it, is confidential and > for the sole use of the intended recipient(s). This confidentiality is not > waived or lost, if you receive it and you are not the intended > recipient(s), or if it is transmitted/received in error. > Any unauthorised use, alteration, disclosure, distribution or review of > this email is strictly prohibited. The information contained in this > email, including any attachment sent with it, may be subject to a statutory > duty of confidentiality if it relates to health service matters. > If you are not the intended recipient(s), or if you have received this > email in error, you are asked to immediately notify the sender by telephone > collect on Australia +61 1800 198 175 or by return email. You should also > delete this email, and any copies, from your computer system network and > destroy any hard copies produced. > If not an intended recipient of this email, you must not copy, distribute > or take any action(s) that relies on it; any form of disclosure, > modification, distribution and/or publication of this email is also > prohibited. > Although Queensland Health takes all reasonable steps to ensure this email > does not contain malicious software, Queensland Health does not accept > responsibility for the consequences if any person's computer inadvertently > suffers any disruption to services, loss of information, harm or is > infected with a virus, other malicious computer programme or code that may > occur as a consequence of receiving this email. > Unless stated otherwise, this email represents only the views of the > sender and not the views of the Queensland Government. > > ********************************************************************************** > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |
From: Ian V. <Ian...@he...> - 2014-07-21 23:53:40
|
In the current transformation I am working on I thought I would try using the ADT_AXX superstructure, since multiple ADT types need to be handled. Some complexity was present, given that the inbound has several Z-Segments, which I have built definitions for, and the outbound has one of a different structure to the inbounds. Snippets from the code dealing with them are shown below. The hl7In mentioned is of ADT_AXX type. ADT_AXX hl7Out = new ADT_AXX(); hl7Out.setValidationContext(new NoValidation()); ZPX zpxIn = new ZPX(hl7In.getParent(), hl7In.getModelClassFactory()); ZVX zvxIn = new ZVX(hl7In.getParent(), hl7In.getModelClassFactory()); GenericSegment zSeg; try { zSeg = (GenericSegment) hl7In.getINSURANCE().get("ZPX"); zpxIn.parse(zSeg.encode()); } catch (HL7Exception ex) { // Problem finding zpx leave it empty } try { zSeg = (GenericSegment) hl7In.getINSURANCE().get("ZVX"); zvxIn.parse(zSeg.encode()); } catch (HL7Exception ex) { // Problem finding zvx, leave it empty } hl7Out.addNonstandardSegment("ZPD"); GenericSegment zpdGen = (GenericSegment) hl7Out.get("ZPD"); ZpdEdis zpdOut = new ZpdEdis(hl7Out.getParent(), hl7Out.getModelClassFactory()); SegmentTranslation.processZpd(zpxIn, hl7In.getPV1(), zvxIn, zpdOut); zpdGen.parse(zpdOut.encode()); All of this works very nicely, and all was proceeding through test cases for different message types with me reviewing the content of a .printstructure(). I got a nasty surprise when I finally came to .encode() the result: java.lang.NullPointerException at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:994) at java.util.Collections$UnmodifiableSet.<init>(Collections.java:1066) at java.util.Collections.unmodifiableSet(Collections.java:1056) at ca.uhn.hl7v2.model.AbstractSuperMessage.getStructuresWhichChildAppliesTo(AbstractSuperMessage.java:78) at ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.checkStructure(OnlyAllowableSegmentsInSuperstructureRule.java:71) at ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.apply(OnlyAllowableSegmentsInSuperstructureRule.java:55) at ca.uhn.hl7v2.validation.builder.support.OnlyAllowableSegmentsInSuperstructureRule.apply(OnlyAllowableSegmentsInSuperstructureRule.java:46) at ca.uhn.hl7v2.validation.AbstractValidator.testMessageRules(AbstractValidator.java:98) at ca.uhn.hl7v2.validation.AbstractValidator.validate(AbstractValidator.java:82) at ca.uhn.hl7v2.parser.Parser.assertMessageValidates(Parser.java:611) at ca.uhn.hl7v2.parser.Parser.encode(Parser.java:275) at ca.uhn.hl7v2.parser.PipeParser.encode(PipeParser.java:1003) at ca.uhn.hl7v2.model.AbstractMessage.encode(AbstractMessage.java:207) at au.gov.qld.health.sit.transform.hl7.HbcisNormAdtTxEdisTest.testTransformA01(HbcisNormAdtTxEdisTest.java:81) Doing a .setValidationContext(new NoVAlidation) on the result message does not prevent the error. Is there anything I can do to enable this result to .encode()? The prinstructure() shows everything exactly as I want it. Thanks Ian ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |
From: James A. <ja...@ja...> - 2014-07-21 19:04:04
|
Hi Sara, The following 4 lines: [INFO] org.openmrs.module:IHEInteroperability-omod:jar:1.0-SNAPSHOT [INFO] +- org.openmrs.module:IHEInteroperability-api:jar:1. 0-SNAPSHOT:compile [INFO] | \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.5.6:compile ..show that Slf4j is still being included. I'd check that your exclusion is in the right spot. I also notice these lines- They suggest to me that you have other SLF4j dependencies right in your base project. It might be worth talking to someone who knows something about OpenMRS to see if it deploys on the version of Tomcat you're using. [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided James On Sun, Jul 20, 2014 at 12:33 AM, Sara Fatima <sar...@gm...> wrote: > Here is the dependency tree > > \Users\SARA\IHEModule\IHEInteroperability>mvn dependency:tree > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Build Order: > [INFO] > [INFO] IHEInteroperability Module > [INFO] IHEInteroperability Module API > [INFO] IHEInteroperability Module OMOD > Downloading: > http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ > apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml > [WARNING] Could not transfer metadata > org.apache.maven.plugins:maven-compiler-pl > ugin/maven-metadata.xml from/to openmrs-repo ( > http://mavenrepo.openmrs.org/nexus > /content/repositories/public): mavenrepo.openmrs.org > [INFO] > [INFO] > ------------------------------------------------------------------------ > [INFO] Building IHEInteroperability Module 1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ > IHEInteroperability > --- > [INFO] org.openmrs.module:IHEInteroperability:pom:1.0-SNAPSHOT > [INFO] > [INFO] > ------------------------------------------------------------------------ > [INFO] Building IHEInteroperability Module API 1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ > IHEInteroperability- > api --- > [INFO] org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT > [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided > [INFO] | +- commons-collections:commons-collections:jar:3.2:provided > [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided > [INFO] | +- commons-io:commons-io:jar:1.4:provided > [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided > [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided > [INFO] | +- log4j:log4j:jar:1.2.15:provided > [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided > [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided > [INFO] | | \- > org.springframework:spring-expression:jar:3.0.2.RELEASE:provided > > [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided > [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided > [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided > [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided > [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided > [INFO] | +- asm:asm-commons:jar:2.2.3:provided > [INFO] | | \- asm:asm-tree:jar:2.2.3:provided > [INFO] | +- asm:asm-util:jar:2.2.3:provided > [INFO] | +- cglib:cglib-nodep:jar:2.2:provided > [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided > [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided > [INFO] | +- stax:stax:jar:1.2.0:provided > [INFO] | +- stax:stax-api:jar:1.0.1:provided > [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided > [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided > [INFO] | | +- antlr:antlr:jar:2.7.6:provided > [INFO] | | \- asm:asm:jar:1.5.3:provided > [INFO] | +- dom4j:dom4j:jar:1.6.1:provided > [INFO] | +- c3p0:c3p0:jar:0.9.1:provided > [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided > [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided > [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided > [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided > [INFO] | +- javax.mail:mail:jar:1.4.1:provided > [INFO] | | \- javax.activation:activation:jar:1.1:provided > [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided > [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided > [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided > [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided > [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided > [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided > [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided > [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided > [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided > [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided > [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided > [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided > [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided > [INFO] | | \- > org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro > vided > [INFO] | +- jfree:jfreechart:jar:1.0.12:provided > [INFO] | | \- jfree:jcommon:jar:1.0.15:provided > [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided > [INFO] | +- taglibs:request:jar:1.0.1:provided > [INFO] | +- taglibs:response:jar:1.0.1:provided > [INFO] | +- taglibs:standard:jar:1.1.2:provided > [INFO] | +- taglibs:page:jar:1.0.1:provided > [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided > [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided > [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test > [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test > [INFO] +- org.openmrs.test:openmrs-test:pom:1.8.0:test > [INFO] | +- org.springframework:spring-test:jar:3.0.2.RELEASE:test > [INFO] | +- junit:junit:jar:4.8.1:test > [INFO] | +- org.databene:databene-benerator:jar:0.5.9:test > [INFO] | | +- org.databene:databene-webdecs:jar:0.4.9:test > [INFO] | | | +- org.apache.poi:poi:jar:3.5-beta5:test > [INFO] | | | \- org.freemarker:freemarker:jar:2.3.9:test > [INFO] | | +- org.databene:databene-commons:jar:0.4.9:test > [INFO] | | | \- commons-logging:commons-logging:jar:1.1:test > [INFO] | | | +- logkit:logkit:jar:1.0.1:test > [INFO] | | | \- avalon-framework:avalon-framework:jar:4.1.3:test > [INFO] | | +- org.databene:databene-gui:jar:0.1.9:test > [INFO] | | +- net.sourceforge.jtds:jtds:jar:1.2.2:test > [INFO] | | +- org.apache.derby:derbyclient:jar:10.4.2.0:test > [INFO] | | \- postgresql:postgresql:jar:8.3-603.jdbc4:test > [INFO] | +- com.h2database:h2:jar:1.2.135:test > [INFO] | +- org.dbunit:dbunit:jar:2.4.7:test > [INFO] | \- xmlunit:xmlunit:jar:1.3:test > [INFO] \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile > [INFO] +- org.slf4j:slf4j-api:jar:1.5.6:compile > [INFO] +- commons-lang:commons-lang:jar:2.6:compile > [INFO] +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile > [INFO] \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile > [INFO] > [INFO] > ------------------------------------------------------------------------ > [INFO] Building IHEInteroperability Module OMOD 1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > Downloading: > http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ > openmrs/module/IHEInteroperability-api/1.0-SNAPSHOT/maven-metadata.xml > [WARNING] Could not transfer metadata > org.openmrs.module:IHEInteroperability-api > :1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( > http://mavenrepo.openmrs. > org/nexus/content/repositories/public): mavenrepo.openmrs.org > [WARNING] Failure to transfer > org.openmrs.module:IHEInteroperability-api:1.0-SNA > PSHOT/maven-metadata.xml from > http://mavenrepo.openmrs.org/nexus/content/reposit > ories/public was cached in the local repository, resolution will not be > reattemp > ted until the update interval of openmrs-repo has elapsed or updates are > forced. > Original error: Could not transfer metadata > org.openmrs.module:IHEInteroperabil > ity-api:1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( > http://mavenrepo.o > penmrs.org/nexus/content/repositories/public): mavenrepo.openmrs.org > [INFO] > [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ > IHEInteroperability- > omod --- > [INFO] org.openmrs.module:IHEInteroperability-omod:jar:1.0-SNAPSHOT > [INFO] +- > org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT:compile > [INFO] | \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile > [INFO] | +- org.slf4j:slf4j-api:jar:1.5.6:compile > [INFO] | +- commons-lang:commons-lang:jar:2.6:compile > [INFO] | +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile > [INFO] | \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile > [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided > [INFO] | +- commons-collections:commons-collections:jar:3.2:provided > [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided > [INFO] | +- commons-io:commons-io:jar:1.4:provided > [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided > [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided > [INFO] | +- log4j:log4j:jar:1.2.15:provided > [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided > [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided > [INFO] | | \- > org.springframework:spring-expression:jar:3.0.2.RELEASE:provided > > [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided > [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided > [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided > [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided > [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided > [INFO] | +- asm:asm-commons:jar:2.2.3:provided > [INFO] | | \- asm:asm-tree:jar:2.2.3:provided > [INFO] | +- asm:asm-util:jar:2.2.3:provided > [INFO] | +- cglib:cglib-nodep:jar:2.2:provided > [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided > [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided > [INFO] | +- stax:stax:jar:1.2.0:provided > [INFO] | +- stax:stax-api:jar:1.0.1:provided > [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided > [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided > [INFO] | | +- antlr:antlr:jar:2.7.6:provided > [INFO] | | \- asm:asm:jar:1.5.3:provided > [INFO] | +- dom4j:dom4j:jar:1.6.1:provided > [INFO] | +- c3p0:c3p0:jar:0.9.1:provided > [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided > [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided > [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided > [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided > [INFO] | +- javax.mail:mail:jar:1.4.1:provided > [INFO] | | \- javax.activation:activation:jar:1.1:provided > [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided > [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided > [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided > [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided > [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided > [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided > [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided > [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided > [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided > [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided > [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided > [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided > [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided > [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided > [INFO] | | \- > org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro > vided > [INFO] | +- jfree:jfreechart:jar:1.0.12:provided > [INFO] | | \- jfree:jcommon:jar:1.0.15:provided > [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided > [INFO] | +- taglibs:request:jar:1.0.1:provided > [INFO] | +- taglibs:response:jar:1.0.1:provided > [INFO] | +- taglibs:standard:jar:1.1.2:provided > [INFO] | +- taglibs:page:jar:1.0.1:provided > [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided > [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided > [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test > [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test > [INFO] \- org.openmrs.test:openmrs-test:pom:1.8.0:test > [INFO] +- org.springframework:spring-test:jar:3.0.2.RELEASE:test > [INFO] +- junit:junit:jar:4.8.1:test > [INFO] +- org.databene:databene-benerator:jar:0.5.9:test > [INFO] | +- org.databene:databene-webdecs:jar:0.4.9:test > [INFO] | | +- org.apache.poi:poi:jar:3.5-beta5:test > [INFO] | | \- org.freemarker:freemarker:jar:2.3.9:test > [INFO] | +- org.databene:databene-commons:jar:0.4.9:test > [INFO] | | \- commons-logging:commons-logging:jar:1.1:test > [INFO] | | +- logkit:logkit:jar:1.0.1:test > [INFO] | | \- avalon-framework:avalon-framework:jar:4.1.3:test > [INFO] | +- org.databene:databene-gui:jar:0.1.9:test > [INFO] | +- net.sourceforge.jtds:jtds:jar:1.2.2:test > [INFO] | +- org.apache.derby:derbyclient:jar:10.4.2.0:test > [INFO] | \- postgresql:postgresql:jar:8.3-603.jdbc4:test > [INFO] +- com.h2database:h2:jar:1.2.135:test > [INFO] +- org.dbunit:dbunit:jar:2.4.7:test > [INFO] \- xmlunit:xmlunit:jar:1.3:test > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] IHEInteroperability Module ........................ SUCCESS [8.803s] > [INFO] IHEInteroperability Module API .................... SUCCESS [5.242s] > [INFO] IHEInteroperability Module OMOD ................... SUCCESS > [12.881s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 44.572s > [INFO] Finished at: Sat Jul 19 00:14:12 IST 2014 > [INFO] Final Memory: 10M/24M > [INFO] > ------------------------------------------------------------------------ > On 20 Jul 2014 00:56, "James Agnew" <ja...@ja...> wrote: > >> That exclusion should be correct- Can you post your dependency tree? >> >> The heart of this is that you don't want conflicting versions of SLF4j to >> be in the WAR/EAR file you are deploying.. And to add to that from the >> stack trace you posted it looks like maybe Tomcat is bundling a 1.6.x copy >> in itself, which would mean you are probably best not including any version >> at all in your WAR. >> >> James >> >> >> On Sat, Jul 19, 2014 at 6:49 AM, Sara Fatima <sar...@gm...> >> wrote: >> >>> Hi all, >>> >>> I am trying to send HL7 message over HTTP using this example >>> <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html>. I have >>> changed the below line to Parser parser = >>> PipeParser.getInstanceWithNoValidation(); to >>> Parser parser = new GenericParser(); as I am working with HAPI 2.0. >>> >>> I have added the below dependency also. >>> >>> >>> >>> <dependency> >>> <groupId>ca.uhn.hapi</groupId> >>> >>> >>> >>> >>> >>> <artifactId>hapi-hl7overhttp</artifactId> >>> >>> >>> >>> >>> >>> <version>2.2</version> >>> >>> >>> >>> >>> </dependency> >>> >>> >>> >>> >>> However at below line I am getting an error. >>> >>> HohClientSimple client = new HohClientSimple(host, port, uri, parser); >>> >>> Error is: >>> >>> SLF4J: The requested version 1.6 by your slf4j binding is not compatible >>> with [1.5.5, 1.5.6] >>> SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further >>> details. >>> ERROR - LoggingAdvice.invoke(126) |2014-07-19 16:14:18,189| An error >>> occurred while executing this method. Error message: loader constraint >>> violation: when resolving method >>> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >>> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >>> current class, org/slf4j/LoggerFactory, and the class loader (instance of >>> org/apache/catalina/loader/WebappClassLoader) for resolved class, >>> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >>> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >>> the signature >>> java.lang.LinkageError: loader constraint violation: when resolving >>> method >>> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >>> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >>> current class, org/slf4j/LoggerFactory, and the class loader (instance of >>> org/apache/catalina/loader/WebappClassLoader) for resolved class, >>> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >>> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >>> the signature >>> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) >>> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) >>> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) >>> at >>> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) >>> at >>> ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) >>> at >>> org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:104) >>> at >>> org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) >>> at >>> org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) >>> at >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>> at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) >>> at >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>> at >>> org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) >>> at >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>> at >>> org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) >>> at >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >>> at >>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) >>> at sun.proxy.$Proxy213.savePatient(Unknown Source) >>> at >>> org.openmrs.web.controller.patient.ShortPatientFormController.saveShortPatient(ShortPatientFormController.java:239) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >>> at java.lang.reflect.Method.invoke(Unknown Source) >>> at >>> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) >>> at >>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) >>> at >>> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) >>> at >>> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) >>> at >>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) >>> at >>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) >>> at >>> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) >>> I tried adding exclusions but that didnt help, >>> <dependency> >>> <groupId>ca.uhn.hapi</groupId> >>> <artifactId>hapi-hl7overhttp</artifactId> >>> <version>2.2</version> >>> <exclusions> >>> <exclusion> >>> <groupId>org.slf4j</groupId> >>> <artifactId>slf4j-api</artifactId> >>> </exclusion> >>> <exclusion> >>> <groupId>log4j</groupId> >>> <artifactId>log4j</artifactId> >>> </exclusion> >>> </exclusions> >>> </dependency> >>> >>> Could someone guide me where I could probably be going wrong in using >>> this example? >>> >>> Thanks & Regards >>> Sara Fatima >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Want fast and easy access to all the code in your enterprise? Index and >>> search up to 200,000 lines of code with a free copy of Black Duck >>> Code Sight - the same software that powers the world's largest code >>> search on Ohloh, the Black Duck Open Hub! Try it now. >>> http://p.sf.net/sfu/bds >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> |
From: Sara F. <sar...@gm...> - 2014-07-20 04:33:30
|
Here is the dependency tree \Users\SARA\IHEModule\IHEInteroperability>mvn dependency:tree [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] IHEInteroperability Module [INFO] IHEInteroperability Module API [INFO] IHEInteroperability Module OMOD Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl ugin/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.openmrs.org/nexus /content/repositories/public): mavenrepo.openmrs.org [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability --- [INFO] org.openmrs.module:IHEInteroperability:pom:1.0-SNAPSHOT [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module API 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability- api --- [INFO] org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided [INFO] | +- commons-collections:commons-collections:jar:3.2:provided [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided [INFO] | +- commons-io:commons-io:jar:1.4:provided [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided [INFO] | +- log4j:log4j:jar:1.2.15:provided [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-expression:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided [INFO] | +- asm:asm-commons:jar:2.2.3:provided [INFO] | | \- asm:asm-tree:jar:2.2.3:provided [INFO] | +- asm:asm-util:jar:2.2.3:provided [INFO] | +- cglib:cglib-nodep:jar:2.2:provided [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided [INFO] | +- stax:stax:jar:1.2.0:provided [INFO] | +- stax:stax-api:jar:1.0.1:provided [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided [INFO] | | +- antlr:antlr:jar:2.7.6:provided [INFO] | | \- asm:asm:jar:1.5.3:provided [INFO] | +- dom4j:dom4j:jar:1.6.1:provided [INFO] | +- c3p0:c3p0:jar:0.9.1:provided [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided [INFO] | +- javax.mail:mail:jar:1.4.1:provided [INFO] | | \- javax.activation:activation:jar:1.1:provided [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro vided [INFO] | +- jfree:jfreechart:jar:1.0.12:provided [INFO] | | \- jfree:jcommon:jar:1.0.15:provided [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided [INFO] | +- taglibs:request:jar:1.0.1:provided [INFO] | +- taglibs:response:jar:1.0.1:provided [INFO] | +- taglibs:standard:jar:1.1.2:provided [INFO] | +- taglibs:page:jar:1.0.1:provided [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.test:openmrs-test:pom:1.8.0:test [INFO] | +- org.springframework:spring-test:jar:3.0.2.RELEASE:test [INFO] | +- junit:junit:jar:4.8.1:test [INFO] | +- org.databene:databene-benerator:jar:0.5.9:test [INFO] | | +- org.databene:databene-webdecs:jar:0.4.9:test [INFO] | | | +- org.apache.poi:poi:jar:3.5-beta5:test [INFO] | | | \- org.freemarker:freemarker:jar:2.3.9:test [INFO] | | +- org.databene:databene-commons:jar:0.4.9:test [INFO] | | | \- commons-logging:commons-logging:jar:1.1:test [INFO] | | | +- logkit:logkit:jar:1.0.1:test [INFO] | | | \- avalon-framework:avalon-framework:jar:4.1.3:test [INFO] | | +- org.databene:databene-gui:jar:0.1.9:test [INFO] | | +- net.sourceforge.jtds:jtds:jar:1.2.2:test [INFO] | | +- org.apache.derby:derbyclient:jar:10.4.2.0:test [INFO] | | \- postgresql:postgresql:jar:8.3-603.jdbc4:test [INFO] | +- com.h2database:h2:jar:1.2.135:test [INFO] | +- org.dbunit:dbunit:jar:2.4.7:test [INFO] | \- xmlunit:xmlunit:jar:1.3:test [INFO] \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile [INFO] +- org.slf4j:slf4j-api:jar:1.5.6:compile [INFO] +- commons-lang:commons-lang:jar:2.6:compile [INFO] +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile [INFO] \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module OMOD 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ openmrs/module/IHEInteroperability-api/1.0-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata org.openmrs.module:IHEInteroperability-api :1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.openmrs. org/nexus/content/repositories/public): mavenrepo.openmrs.org [WARNING] Failure to transfer org.openmrs.module:IHEInteroperability-api:1.0-SNA PSHOT/maven-metadata.xml from http://mavenrepo.openmrs.org/nexus/content/reposit ories/public was cached in the local repository, resolution will not be reattemp ted until the update interval of openmrs-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.openmrs.module:IHEInteroperabil ity-api:1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.o penmrs.org/nexus/content/repositories/public): mavenrepo.openmrs.org [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability- omod --- [INFO] org.openmrs.module:IHEInteroperability-omod:jar:1.0-SNAPSHOT [INFO] +- org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT:compile [INFO] | \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.5.6:compile [INFO] | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile [INFO] | \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided [INFO] | +- commons-collections:commons-collections:jar:3.2:provided [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided [INFO] | +- commons-io:commons-io:jar:1.4:provided [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided [INFO] | +- log4j:log4j:jar:1.2.15:provided [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-expression:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided [INFO] | +- asm:asm-commons:jar:2.2.3:provided [INFO] | | \- asm:asm-tree:jar:2.2.3:provided [INFO] | +- asm:asm-util:jar:2.2.3:provided [INFO] | +- cglib:cglib-nodep:jar:2.2:provided [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided [INFO] | +- stax:stax:jar:1.2.0:provided [INFO] | +- stax:stax-api:jar:1.0.1:provided [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided [INFO] | | +- antlr:antlr:jar:2.7.6:provided [INFO] | | \- asm:asm:jar:1.5.3:provided [INFO] | +- dom4j:dom4j:jar:1.6.1:provided [INFO] | +- c3p0:c3p0:jar:0.9.1:provided [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided [INFO] | +- javax.mail:mail:jar:1.4.1:provided [INFO] | | \- javax.activation:activation:jar:1.1:provided [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro vided [INFO] | +- jfree:jfreechart:jar:1.0.12:provided [INFO] | | \- jfree:jcommon:jar:1.0.15:provided [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided [INFO] | +- taglibs:request:jar:1.0.1:provided [INFO] | +- taglibs:response:jar:1.0.1:provided [INFO] | +- taglibs:standard:jar:1.1.2:provided [INFO] | +- taglibs:page:jar:1.0.1:provided [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test [INFO] \- org.openmrs.test:openmrs-test:pom:1.8.0:test [INFO] +- org.springframework:spring-test:jar:3.0.2.RELEASE:test [INFO] +- junit:junit:jar:4.8.1:test [INFO] +- org.databene:databene-benerator:jar:0.5.9:test [INFO] | +- org.databene:databene-webdecs:jar:0.4.9:test [INFO] | | +- org.apache.poi:poi:jar:3.5-beta5:test [INFO] | | \- org.freemarker:freemarker:jar:2.3.9:test [INFO] | +- org.databene:databene-commons:jar:0.4.9:test [INFO] | | \- commons-logging:commons-logging:jar:1.1:test [INFO] | | +- logkit:logkit:jar:1.0.1:test [INFO] | | \- avalon-framework:avalon-framework:jar:4.1.3:test [INFO] | +- org.databene:databene-gui:jar:0.1.9:test [INFO] | +- net.sourceforge.jtds:jtds:jar:1.2.2:test [INFO] | +- org.apache.derby:derbyclient:jar:10.4.2.0:test [INFO] | \- postgresql:postgresql:jar:8.3-603.jdbc4:test [INFO] +- com.h2database:h2:jar:1.2.135:test [INFO] +- org.dbunit:dbunit:jar:2.4.7:test [INFO] \- xmlunit:xmlunit:jar:1.3:test [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] IHEInteroperability Module ........................ SUCCESS [8.803s] [INFO] IHEInteroperability Module API .................... SUCCESS [5.242s] [INFO] IHEInteroperability Module OMOD ................... SUCCESS [12.881s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44.572s [INFO] Finished at: Sat Jul 19 00:14:12 IST 2014 [INFO] Final Memory: 10M/24M [INFO] ------------------------------------------------------------------------ On 20 Jul 2014 00:56, "James Agnew" <ja...@ja...> wrote: > That exclusion should be correct- Can you post your dependency tree? > > The heart of this is that you don't want conflicting versions of SLF4j to > be in the WAR/EAR file you are deploying.. And to add to that from the > stack trace you posted it looks like maybe Tomcat is bundling a 1.6.x copy > in itself, which would mean you are probably best not including any version > at all in your WAR. > > James > > > On Sat, Jul 19, 2014 at 6:49 AM, Sara Fatima <sar...@gm...> > wrote: > >> Hi all, >> >> I am trying to send HL7 message over HTTP using this example >> <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html>. I have >> changed the below line to Parser parser = >> PipeParser.getInstanceWithNoValidation(); to >> Parser parser = new GenericParser(); as I am working with HAPI 2.0. >> >> I have added the below dependency also. >> >> >> <dependency> >> <groupId>ca.uhn.hapi</groupId> >> >> >> >> <artifactId>hapi-hl7overhttp</artifactId> >> >> >> >> <version>2.2</version> >> >> >> </dependency> >> >> >> >> However at below line I am getting an error. >> >> HohClientSimple client = new HohClientSimple(host, port, uri, parser); >> >> Error is: >> >> SLF4J: The requested version 1.6 by your slf4j binding is not compatible >> with [1.5.5, 1.5.6] >> SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further >> details. >> ERROR - LoggingAdvice.invoke(126) |2014-07-19 16:14:18,189| An error >> occurred while executing this method. Error message: loader constraint >> violation: when resolving method >> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >> current class, org/slf4j/LoggerFactory, and the class loader (instance of >> org/apache/catalina/loader/WebappClassLoader) for resolved class, >> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >> the signature >> java.lang.LinkageError: loader constraint violation: when resolving >> method >> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >> current class, org/slf4j/LoggerFactory, and the class loader (instance of >> org/apache/catalina/loader/WebappClassLoader) for resolved class, >> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >> the signature >> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) >> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) >> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) >> at >> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) >> at >> ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) >> at >> org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:104) >> at >> org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) >> at >> org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at >> org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at >> org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) >> at >> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) >> at sun.proxy.$Proxy213.savePatient(Unknown Source) >> at >> org.openmrs.web.controller.patient.ShortPatientFormController.saveShortPatient(ShortPatientFormController.java:239) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) >> at >> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) >> at >> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) >> at >> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) >> at >> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) >> at >> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) >> at >> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) >> I tried adding exclusions but that didnt help, >> <dependency> >> <groupId>ca.uhn.hapi</groupId> >> <artifactId>hapi-hl7overhttp</artifactId> >> <version>2.2</version> >> <exclusions> >> <exclusion> >> <groupId>org.slf4j</groupId> >> <artifactId>slf4j-api</artifactId> >> </exclusion> >> <exclusion> >> <groupId>log4j</groupId> >> <artifactId>log4j</artifactId> >> </exclusion> >> </exclusions> >> </dependency> >> >> Could someone guide me where I could probably be going wrong in using >> this example? >> >> Thanks & Regards >> Sara Fatima >> >> >> >> ------------------------------------------------------------------------------ >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > |
From: James A. <ja...@ja...> - 2014-07-19 19:27:06
|
That exclusion should be correct- Can you post your dependency tree? The heart of this is that you don't want conflicting versions of SLF4j to be in the WAR/EAR file you are deploying.. And to add to that from the stack trace you posted it looks like maybe Tomcat is bundling a 1.6.x copy in itself, which would mean you are probably best not including any version at all in your WAR. James On Sat, Jul 19, 2014 at 6:49 AM, Sara Fatima <sar...@gm...> wrote: > Hi all, > > I am trying to send HL7 message over HTTP using this example > <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html>. I have > changed the below line to Parser parser = > PipeParser.getInstanceWithNoValidation(); to > Parser parser = new GenericParser(); as I am working with HAPI 2.0. > > I have added the below dependency also. > > <dependency> > <groupId>ca.uhn.hapi</groupId> > > > <artifactId>hapi-hl7overhttp</artifactId> > > > <version>2.2</version> > > </dependency> > > > However at below line I am getting an error. > > HohClientSimple client = new HohClientSimple(host, port, uri, parser); > > Error is: > > SLF4J: The requested version 1.6 by your slf4j binding is not compatible > with [1.5.5, 1.5.6] > SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further > details. > ERROR - LoggingAdvice.invoke(126) |2014-07-19 16:14:18,189| An error > occurred while executing this method. Error message: loader constraint > violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > java.lang.LinkageError: loader constraint violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) > at > ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) > at > org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:104) > at > org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) > at > org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) > at sun.proxy.$Proxy213.savePatient(Unknown Source) > at > org.openmrs.web.controller.patient.ShortPatientFormController.saveShortPatient(ShortPatientFormController.java:239) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) > at > org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) > at > org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) > at > org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) > at > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) > at > org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) > at > org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) > I tried adding exclusions but that didnt help, > <dependency> > <groupId>ca.uhn.hapi</groupId> > <artifactId>hapi-hl7overhttp</artifactId> > <version>2.2</version> > <exclusions> > <exclusion> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-api</artifactId> > </exclusion> > <exclusion> > <groupId>log4j</groupId> > <artifactId>log4j</artifactId> > </exclusion> > </exclusions> > </dependency> > > Could someone guide me where I could probably be going wrong in using this > example? > > Thanks & Regards > Sara Fatima > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Jens V. <jen...@gm...> - 2014-07-19 11:13:07
|
Its stated in the log from maven Den 19/07/2014 12.50 skrev "Sara Fatima" <sar...@gm...>: > Hi all, > > I am trying to send HL7 message over HTTP using this example > <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html>. I have > changed the below line to Parser parser = > PipeParser.getInstanceWithNoValidation(); to > Parser parser = new GenericParser(); as I am working with HAPI 2.0. > > I have added the below dependency also. > > <dependency> > <groupId>ca.uhn.hapi</groupId> > > <artifactId>hapi-hl7overhttp</artifactId> > > <version>2.2</version> > </dependency> > > > However at below line I am getting an error. > > HohClientSimple client = new HohClientSimple(host, port, uri, parser); > > Error is: > > SLF4J: The requested version 1.6 by your slf4j binding is not compatible > with [1.5.5, 1.5.6] > SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further > details. > ERROR - LoggingAdvice.invoke(126) |2014-07-19 16:14:18,189| An error > occurred while executing this method. Error message: loader constraint > violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > java.lang.LinkageError: loader constraint violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) > at > ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) > at > org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:104) > at > org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) > at > org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) > at sun.proxy.$Proxy213.savePatient(Unknown Source) > at > org.openmrs.web.controller.patient.ShortPatientFormController.saveShortPatient(ShortPatientFormController.java:239) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) > at > org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) > at > org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) > at > org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) > at > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) > at > org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) > at > org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) > I tried adding exclusions but that didnt help, > <dependency> > <groupId>ca.uhn.hapi</groupId> > <artifactId>hapi-hl7overhttp</artifactId> > <version>2.2</version> > <exclusions> > <exclusion> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-api</artifactId> > </exclusion> > <exclusion> > <groupId>log4j</groupId> > <artifactId>log4j</artifactId> > </exclusion> > </exclusions> > </dependency> > > Could someone guide me where I could probably be going wrong in using this > example? > > Thanks & Regards > Sara Fatima > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Sara F. <sar...@gm...> - 2014-07-19 10:49:14
|
Hi all, I am trying to send HL7 message over HTTP using this example <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html>. I have changed the below line to Parser parser = PipeParser.getInstanceWithNoValidation(); to Parser parser = new GenericParser(); as I am working with HAPI 2.0. I have added the below dependency also. <dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-hl7overhttp</artifactId> <version>2.2</version> </dependency> However at below line I am getting an error. HohClientSimple client = new HohClientSimple(host, port, uri, parser); Error is: SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. ERROR - LoggingAdvice.invoke(126) |2014-07-19 16:14:18,189| An error occurred while executing this method. Error message: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in the signature java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in the signature at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) at ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) at org.openmrs.module.IHEInteroperability.SendMessageUtility.hl7OverHttp(SendMessageUtility.java:104) at org.openmrs.module.IHEInteroperability.api.impl.IHEInteroperabilityServiceImpl.afterReturning(IHEInteroperabilityServiceImpl.java:79) at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at sun.proxy.$Proxy213.savePatient(Unknown Source) at org.openmrs.web.controller.patient.ShortPatientFormController.saveShortPatient(ShortPatientFormController.java:239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) I tried adding exclusions but that didnt help, <dependency> <groupId>ca.uhn.hapi</groupId> <artifactId>hapi-hl7overhttp</artifactId> <version>2.2</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> </exclusions> </dependency> Could someone guide me where I could probably be going wrong in using this example? Thanks & Regards Sara Fatima |
From: Sara F. <sar...@gm...> - 2014-07-18 18:53:09
|
Hi James, I am trying to add the exclusion. Meanwhile I also did a mvn dependency:tree and here is what I got. C:\Users\SARA\IHEModule\IHEInteroperability>mvn dependency:tree [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] IHEInteroperability Module [INFO] IHEInteroperability Module API [INFO] IHEInteroperability Module OMOD Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml [WARNING] Could not transfer metadata org.apache.maven.plugins:maven-compiler-pl ugin/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.openmrs.org/nexus /content/repositories/public): mavenrepo.openmrs.org [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability --- [INFO] org.openmrs.module:IHEInteroperability:pom:1.0-SNAPSHOT [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module API 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability- api --- [INFO] org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided [INFO] | +- commons-collections:commons-collections:jar:3.2:provided [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided [INFO] | +- commons-io:commons-io:jar:1.4:provided [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided [INFO] | +- log4j:log4j:jar:1.2.15:provided [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-expression:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided [INFO] | +- asm:asm-commons:jar:2.2.3:provided [INFO] | | \- asm:asm-tree:jar:2.2.3:provided [INFO] | +- asm:asm-util:jar:2.2.3:provided [INFO] | +- cglib:cglib-nodep:jar:2.2:provided [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided [INFO] | +- stax:stax:jar:1.2.0:provided [INFO] | +- stax:stax-api:jar:1.0.1:provided [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided [INFO] | | +- antlr:antlr:jar:2.7.6:provided [INFO] | | \- asm:asm:jar:1.5.3:provided [INFO] | +- dom4j:dom4j:jar:1.6.1:provided [INFO] | +- c3p0:c3p0:jar:0.9.1:provided [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided [INFO] | +- javax.mail:mail:jar:1.4.1:provided [INFO] | | \- javax.activation:activation:jar:1.1:provided [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro vided [INFO] | +- jfree:jfreechart:jar:1.0.12:provided [INFO] | | \- jfree:jcommon:jar:1.0.15:provided [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided [INFO] | +- taglibs:request:jar:1.0.1:provided [INFO] | +- taglibs:response:jar:1.0.1:provided [INFO] | +- taglibs:standard:jar:1.1.2:provided [INFO] | +- taglibs:page:jar:1.0.1:provided [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.test:openmrs-test:pom:1.8.0:test [INFO] | +- org.springframework:spring-test:jar:3.0.2.RELEASE:test [INFO] | +- junit:junit:jar:4.8.1:test [INFO] | +- org.databene:databene-benerator:jar:0.5.9:test [INFO] | | +- org.databene:databene-webdecs:jar:0.4.9:test [INFO] | | | +- org.apache.poi:poi:jar:3.5-beta5:test [INFO] | | | \- org.freemarker:freemarker:jar:2.3.9:test [INFO] | | +- org.databene:databene-commons:jar:0.4.9:test [INFO] | | | \- commons-logging:commons-logging:jar:1.1:test [INFO] | | | +- logkit:logkit:jar:1.0.1:test [INFO] | | | \- avalon-framework:avalon-framework:jar:4.1.3:test [INFO] | | +- org.databene:databene-gui:jar:0.1.9:test [INFO] | | +- net.sourceforge.jtds:jtds:jar:1.2.2:test [INFO] | | +- org.apache.derby:derbyclient:jar:10.4.2.0:test [INFO] | | \- postgresql:postgresql:jar:8.3-603.jdbc4:test [INFO] | +- com.h2database:h2:jar:1.2.135:test [INFO] | +- org.dbunit:dbunit:jar:2.4.7:test [INFO] | \- xmlunit:xmlunit:jar:1.3:test [INFO] \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile [INFO] +- org.slf4j:slf4j-api:jar:1.5.6:compile [INFO] +- commons-lang:commons-lang:jar:2.6:compile [INFO] +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile [INFO] \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building IHEInteroperability Module OMOD 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/ openmrs/module/IHEInteroperability-api/1.0-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata org.openmrs.module:IHEInteroperability-api :1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.openmrs. org/nexus/content/repositories/public): mavenrepo.openmrs.org [WARNING] Failure to transfer org.openmrs.module:IHEInteroperability-api:1.0-SNA PSHOT/maven-metadata.xml from http://mavenrepo.openmrs.org/nexus/content/reposit ories/public was cached in the local repository, resolution will not be reattemp ted until the update interval of openmrs-repo has elapsed or updates are forced. Original error: Could not transfer metadata org.openmrs.module:IHEInteroperabil ity-api:1.0-SNAPSHOT/maven-metadata.xml from/to openmrs-repo ( http://mavenrepo.o penmrs.org/nexus/content/repositories/public): mavenrepo.openmrs.org [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ IHEInteroperability- omod --- [INFO] org.openmrs.module:IHEInteroperability-omod:jar:1.0-SNAPSHOT [INFO] +- org.openmrs.module:IHEInteroperability-api:jar:1.0-SNAPSHOT:compile [INFO] | \- ca.uhn.hapi:hapi-hl7overhttp:jar:2.2:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.5.6:compile [INFO] | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile [INFO] | \- org.bouncycastle:bcmail-jdk16:jar:1.46:compile [INFO] +- org.openmrs.api:openmrs-api:jar:1.8.0:provided [INFO] | +- commons-collections:commons-collections:jar:3.2:provided [INFO] | +- commons-beanutils:commons-beanutils:jar:1.7.0:provided [INFO] | +- commons-io:commons-io:jar:1.4:provided [INFO] | +- org.azeckoski:reflectutils:jar:0.9.14:provided [INFO] | +- org.apache.velocity:velocity:jar:1.6.2:provided [INFO] | +- log4j:log4j:jar:1.2.15:provided [INFO] | +- org.springframework:spring-core:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-asm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-beans:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-context:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-expression:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-aop:jar:3.0.2.RELEASE:provided [INFO] | | \- aopalliance:aopalliance:jar:1.0:provided [INFO] | +- org.springframework:spring-orm:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-tx:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-jdbc:jar:3.0.2.RELEASE:provided [INFO] | +- org.antlr:antlr-runtime:jar:3.2:provided [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided [INFO] | +- asm:asm-commons:jar:2.2.3:provided [INFO] | | \- asm:asm-tree:jar:2.2.3:provided [INFO] | +- asm:asm-util:jar:2.2.3:provided [INFO] | +- cglib:cglib-nodep:jar:2.2:provided [INFO] | +- ca.uhn.hapi:hapi:jar:0.5:provided [INFO] | +- org.openmrs.simpleframework:simple-xml:jar:1.6.1-mod:provided [INFO] | +- stax:stax:jar:1.2.0:provided [INFO] | +- stax:stax-api:jar:1.0.1:provided [INFO] | +- org.openmrs.hibernate:hibernate:jar:3.2.5.ga-mod:provided [INFO] | | +- javax.transaction:jta:jar:1.0.1B:provided [INFO] | | +- antlr:antlr:jar:2.7.6:provided [INFO] | | \- asm:asm:jar:1.5.3:provided [INFO] | +- dom4j:dom4j:jar:1.6.1:provided [INFO] | +- c3p0:c3p0:jar:0.9.1:provided [INFO] | +- net.sf.ehcache:ehcache-core:jar:2.2.0:provided [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.5.6:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.6:provided [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided [INFO] | +- javax.mail:mail:jar:1.4.1:provided [INFO] | | \- javax.activation:activation:jar:1.1:provided [INFO] | +- org.openmrs.liquibase:liquibase-core:jar:1.9.4-mod:provided [INFO] | +- xerces:xercesImpl:jar:2.8.0:provided [INFO] | +- xml-apis:xml-apis:jar:1.3.03:provided [INFO] | \- xml-resolver:xml-resolver:jar:1.1:provided [INFO] +- org.openmrs.web:openmrs-web:jar:1.8.0:provided [INFO] | +- javax.servlet:servlet-api:jar:2.5:provided [INFO] | +- javax.servlet:jsp-api:jar:2.0:provided [INFO] | +- javax.servlet:jstl:jar:1.1.2:provided [INFO] | +- org.openmrs.directwebremoting:dwr:jar:2.0.5-mod:provided [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.1:provided [INFO] | +- net.sf.saxon:saxon:jar:8.7:provided [INFO] | +- net.sf.saxon:saxon-dom:jar:8.7:provided [INFO] | +- org.springframework:spring-web:jar:3.0.2.RELEASE:provided [INFO] | +- org.springframework:spring-webmvc:jar:3.0.2.RELEASE:provided [INFO] | | \- org.springframework:spring-context-support:jar:3.0.2.RELEASE:pro vided [INFO] | +- jfree:jfreechart:jar:1.0.12:provided [INFO] | | \- jfree:jcommon:jar:1.0.15:provided [INFO] | +- mysql:mysql-connector-java:jar:5.1.8:provided [INFO] | +- taglibs:request:jar:1.0.1:provided [INFO] | +- taglibs:response:jar:1.0.1:provided [INFO] | +- taglibs:standard:jar:1.1.2:provided [INFO] | +- taglibs:page:jar:1.0.1:provided [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:provided [INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:provided [INFO] +- org.openmrs.api:openmrs-api:test-jar:tests:1.8.0:test [INFO] +- org.openmrs.web:openmrs-web:test-jar:tests:1.8.0:test [INFO] \- org.openmrs.test:openmrs-test:pom:1.8.0:test [INFO] +- org.springframework:spring-test:jar:3.0.2.RELEASE:test [INFO] +- junit:junit:jar:4.8.1:test [INFO] +- org.databene:databene-benerator:jar:0.5.9:test [INFO] | +- org.databene:databene-webdecs:jar:0.4.9:test [INFO] | | +- org.apache.poi:poi:jar:3.5-beta5:test [INFO] | | \- org.freemarker:freemarker:jar:2.3.9:test [INFO] | +- org.databene:databene-commons:jar:0.4.9:test [INFO] | | \- commons-logging:commons-logging:jar:1.1:test [INFO] | | +- logkit:logkit:jar:1.0.1:test [INFO] | | \- avalon-framework:avalon-framework:jar:4.1.3:test [INFO] | +- org.databene:databene-gui:jar:0.1.9:test [INFO] | +- net.sourceforge.jtds:jtds:jar:1.2.2:test [INFO] | +- org.apache.derby:derbyclient:jar:10.4.2.0:test [INFO] | \- postgresql:postgresql:jar:8.3-603.jdbc4:test [INFO] +- com.h2database:h2:jar:1.2.135:test [INFO] +- org.dbunit:dbunit:jar:2.4.7:test [INFO] \- xmlunit:xmlunit:jar:1.3:test [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] IHEInteroperability Module ........................ SUCCESS [8.803s] [INFO] IHEInteroperability Module API .................... SUCCESS [5.242s] [INFO] IHEInteroperability Module OMOD ................... SUCCESS [12.881s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44.572s [INFO] Finished at: Sat Jul 19 00:14:12 IST 2014 [INFO] Final Memory: 10M/24M [INFO] ------------------------------------------------------------------------ I think this may help figure out what exactly I am missing out on? Thanks & Regards Sara Fatima On Thu, Jul 17, 2014 at 2:02 AM, James Agnew <ja...@ja...> wrote: > This should be fairly simple, it just means that you have a version of > slf4j-api that is too new (probably because HAPI is pulling it in). If you > explicitly add a dependency in your pom.xml for slf4j-api the specifies a > 1.5.x version (you should be able to find one in your OpenHIE pom) it'll > use the older version. > > You -might- need to actually explicitly do a dependency exclusion to get > it to not include slf4j-api 1.6.x.. mvn dependency:tree would help figure > out where that's coming from. > > Cheers, > James > > > On Wed, Jul 16, 2014 at 1:47 PM, Sara Fatima <sar...@gm...> > wrote: > >> Hi all, >> >> I am working on sending hl7 message to OpenHIE <http://demo.ohie.org/> >> over HTTP, I am using this example of HAPI. >> <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> >> Since I am working with hapi v2.0 I have changed the below line of code >> >>> Parser parser = PipeParser.getInstanceWithNoValidation(); to >> >> Parser parser = new GenericParser(); >> >> as it was added only in v2.2. >> However I am still not getting a successful result. At the below line I >> am facing an exception, >> >>> HohClientSimple client = new HohClientSimple(host, port, uri, parser); >> >> >> Exception: >> SLF4J: The requested version 1.6 by your slf4j binding is not compatible >> with [1.5.5, 1.5.6] >> SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further >> details. >> ERROR - LoggingAdvice.invoke(126) |2014-07-16 23:02:01,792| An error >> occurred while executing this method. Error message: loader constraint >> violation: when resolving method >> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >> current class, org/slf4j/LoggerFactory, and the class loader (instance of >> org/apache/catalina/loader/WebappClassLoader) for resolved class, >> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >> the signature >> java.lang.LinkageError: loader constraint violation: when resolving >> method >> "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" >> the class loader (instance of org/openmrs/module/ModuleClassLoader) of the >> current class, org/slf4j/LoggerFactory, and the class loader (instance of >> org/apache/catalina/loader/WebappClassLoader) for resolved class, >> org/slf4j/impl/StaticLoggerBinder, have different Class objects for the >> type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in >> the signature >> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) >> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) >> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) >> at >> ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) >> at >> ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) >> >> Could someone guide me how I could overcome this error? >> >> >> Thanks & Regards >> Sara Fatima >> >> >> >> ------------------------------------------------------------------------------ >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > |
From: James A. <ja...@ja...> - 2014-07-16 20:32:44
|
This should be fairly simple, it just means that you have a version of slf4j-api that is too new (probably because HAPI is pulling it in). If you explicitly add a dependency in your pom.xml for slf4j-api the specifies a 1.5.x version (you should be able to find one in your OpenHIE pom) it'll use the older version. You -might- need to actually explicitly do a dependency exclusion to get it to not include slf4j-api 1.6.x.. mvn dependency:tree would help figure out where that's coming from. Cheers, James On Wed, Jul 16, 2014 at 1:47 PM, Sara Fatima <sar...@gm...> wrote: > Hi all, > > I am working on sending hl7 message to OpenHIE <http://demo.ohie.org/> > over HTTP, I am using this example of HAPI. > <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> > Since I am working with hapi v2.0 I have changed the below line of code > >> Parser parser = PipeParser.getInstanceWithNoValidation(); to > > Parser parser = new GenericParser(); > > as it was added only in v2.2. > However I am still not getting a successful result. At the below line I am > facing an exception, > >> HohClientSimple client = new HohClientSimple(host, port, uri, parser); > > > Exception: > SLF4J: The requested version 1.6 by your slf4j binding is not compatible > with [1.5.5, 1.5.6] > SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further > details. > ERROR - LoggingAdvice.invoke(126) |2014-07-16 23:02:01,792| An error > occurred while executing this method. Error message: loader constraint > violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > java.lang.LinkageError: loader constraint violation: when resolving method > "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" > the class loader (instance of org/openmrs/module/ModuleClassLoader) of the > current class, org/slf4j/LoggerFactory, and the class loader (instance of > org/apache/catalina/loader/WebappClassLoader) for resolved class, > org/slf4j/impl/StaticLoggerBinder, have different Class objects for the > type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in > the signature > at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) > at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) > at > ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) > at > ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) > > Could someone guide me how I could overcome this error? > > > Thanks & Regards > Sara Fatima > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Sara F. <sar...@gm...> - 2014-07-16 18:14:43
|
Hi all, I am working on sending hl7 message to OpenHIE <http://demo.ohie.org/> over HTTP, I am using this example of HAPI. <http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html> Since I am working with hapi v2.0 I have changed the below line of code > Parser parser = PipeParser.getInstanceWithNoValidation(); to Parser parser = new GenericParser(); as it was added only in v2.2. However I am still not getting a successful result. At the below line I am facing an exception, > HohClientSimple client = new HohClientSimple(host, port, uri, parser); Exception: SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. ERROR - LoggingAdvice.invoke(126) |2014-07-16 23:02:01,792| An error occurred while executing this method. Error message: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in the signature java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type taticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory; used in the signature at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.<clinit>(AbstractRawClient.java:54) at ca.uhn.hl7v2.hoh.hapi.client.HohClientSimple.<init>(HohClientSimple.java:40) Could someone guide me how I could overcome this error? Thanks & Regards Sara Fatima |