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 > > |