Hi

I have corrected the version numbers and could successfully compile.

However when I am trying to run the class I have getting following errors.

log4j:WARN No appenders could be found for logger
(ca.uhn.hl7v2.parser.DefaultModelClassFactory).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoSuchMethodError:
ca.uhn.hl7v2.validation.impl.ValidationContextFactory.defaultValidation()Lca/uhn/hl7v2/validation/ValidationContext;
at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:109)
at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:100)
at
org.openmrs.module.hapiexample.CreateAMessage.main(CreateAMessage.java:33)


Regards
Sara Fatima



On Tue, May 20, 2014 at 4:03 PM, Christian Ohr <christian....@gmail.com>wrote:

> Try running mvn dependency:tree in your project and check if there is any
> old hapi library in the classpath. HapiContext exist as of version 2.1.
> Sometimes mvn help:effective-pom also helps.
>
> Christian
>
>
> 2014-05-20 11:40 GMT+02:00 Sara Fatima <sara.mirz...@gmail.com>:
>
>> Hi
>> I have changed the HAPI base version to 2.2 as shown below. However it
>> still doesn't seem to work and i am getting the same error.
>> Do we need to add any JAR files while we are using maven too?
>>
>> <dependency>
>>   <groupId>ca.uhn.hapi</groupId>
>>   <artifactId>hapi-base</artifactId>
>>   <version>2.2</version>
>> </dependency>
>>
>> <!-- These are structure JARs for HL7 v2.1 and 2.5.1 (as an example) -->
>> <dependency>
>>   <groupId>ca.uhn.hapi</groupId>
>>   <artifactId>hapi-structures-v21</artifactId>
>>   <version>2.2</version>
>> </dependency>
>> <dependency>
>>   <groupId>ca.uhn.hapi</groupId>
>>   <artifactId>hapi-structures-v251</artifactId>
>>   <version>2.2</version>
>> </dependency>
>>
>> Regards
>> Sara Fatima
>>
>>
>>
>> On Tue, May 20, 2014 at 11:21 AM, Sara Fatima <sara.mirz...@gmail.com>wrote:
>>
>>> Hi
>>>
>>>
>>>
>>> I am facing few errors while using HAPI.
>>>
>>>
>>>
>>> These are the changes I have done into the pom.xml , I have also
>>> attached a screen shot of the error screen.
>>>
>>>
>>>
>>> <dependency>
>>>
>>>   <groupId>ca.uhn.hapi</groupId>
>>>
>>>   <artifactId>*hapi*-base</artifactId>
>>>
>>>   <version>2.1</version>
>>>
>>> </dependency>
>>>
>>>
>>>
>>> <!-- These are structure JARs for HL7 v2.1 and 2.5.1 (as an example) -->
>>>
>>> <dependency>
>>>
>>>   <groupId>ca.uhn.hapi</groupId>
>>>
>>>   <artifactId>*hapi*-structures-v21</artifactId>
>>>
>>>   <version>2.2</version>
>>>
>>> </dependency>
>>>
>>> <dependency>
>>>
>>>   <groupId>ca.uhn.hapi</groupId>
>>>
>>>   <artifactId>*hapi*-structures-v251</artifactId>
>>>
>>>   <version>2.2</version>
>>>
>>> </dependency>
>>>
>>>
>>>
>>> <repository>
>>>
>>>             <id>*hapi*-*sf*</id>
>>>
>>>             <name>HAPI *Sourceforge* Repository</name>
>>>
>>>             <url>http://repo1.maven.org</url>
>>>
>>>         </repository>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>> Regards
>>> Sara Fatima
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Hl7api-devel mailing list
>> Hl7api-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to