fhir2 compilation errors

Hello folks;

Am running in to some compilation errors while building fhir2 module on windows environment.

Could this be caused by some recent commits made or could it be because of the environment am running on?

Thanks

cc @ibacher @varung31

1 Like

@reagan have you seen these before?

1 Like

@herbert24 I have encountered some of these errors randomly…Probably due to the formatter but not so sure…I usually just run mvn checkout . and then run the mvn clean install…However be careful if you have already made some changes that u intend on commiting…You may want to first stage those changes before you do mvn checkout . since it removes all unstaged changes…

1 Like

There seem to be a single test failure as seen in this log https://pastebin.com/WqNV38Sc. however am getting different logs with what @gcliff is getting,not sure where you were running on updated master branch

1 Like

Am sure the error has been resolved since it was a test failure from fhir narrative and has been resolved via here, waiting @gitcliff to confirm but this side all is well

1 Like

works fine now :+1:

1 Like

Just to fill in some gaps, we use Project Lombok to generate the setters that the compiler is complaining about not finding. In theory, Lombok loads itself into the compilation chain by abusing the Java Annotation Processor API. I’m not sure exactly why, but for whatever reason, that mechanism did not kick in and so the resulting class files did not have the setter defined, hence the build errors. I’m happy it resolved itself though…

3 Likes

hello @ibacher

i compiling the fhir2 module and runnning into a couple of errors minus making any changes in the code .When i look into the logs i see

1. org.hibernate.boot.registry.classloading.spi.ClassLoadingException: HHH010003: JDBC Driver class not found: org.postgresql.Driver

2. Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: HHH010003: JDBC Driver class not found: org.postgresql.Driver

3. Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.postgresql.Driver]

4. Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.postgresql.Driver

may be we can aslo configure the fhir2 module to support postgres

cc @aman

@gcliff , can you tell me how can I reproduce this issue ?

you just do a mvn clean install in the root folder of the module as seen here https://pastebin.com/3F51E0EB

1 Like

@gcliff , Adding this dependency in https://github.com/openmrs/openmrs-module-fhir2/blob/master/api-2.2/pom.xml solves the issue.

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.2.4</version>
    </dependency>

But maybe @ibacher , can tell whether this dependency is needed or not. From the logs it appears that this driver was not found.

1 Like

So I’m a bit suspicious that this is a genuine error in the FHIR2 module in part because I can’t reproduce it locally, but also neither can Travis nor Bamboo, both which gets run on every commit. It even builds successfully on Windows.

Hello @ibacher @varung31

I am writing intergration tests for the person r3 resource, however part of the tests are failing , i have been debugging and hitting a dead end yet i have tried to write the tests appropriatley and set up the the right datasets as aseen here in the pr

I would appreciate any hints or pointers here …

Thanks

Hey @gcliff, I have added a couple of comments which should resolve 2 out of the 5 errors. I need to look further to assist for the rest. Meanwhile, @ibacher when we delete the person resource, we should also be deleting the corresponding patient. Do we have that functionality in place?

1 Like

@varung31 thanks for the feedback :+1:

I would’ve assumed this was already implemented by Hibernate since the Patient object is a subclass of Person, but I haven’t really tested it out.

1 Like