build errors in webservices rest module

Hello all;

There are some test failures during a mvn clean install ,they are coming from the new introduced changes from this commit

Thanks

@ibacher @dkayiwa

I’m actually much more likely to place the blame on the upgraded test libraries in 2.4 since I wrote this code :grin:. Still, fix on its way.

1 Like

thanks @ibacher for the timely response & feedback :v:

@gcliff This is now fixed.

1 Like

:+1: works fine now

Hello @ibacher i seem to get these error again during maven build https://pastebin.com/bJkH4Gi1

Have you changed anything locally?

@ibacher yes i have

And what were those changes? See, although that error occurs in the tests I newly wrote, it’s not caused by any of the code I wrote. In particular, it’s thrown here and is most likely caused by exactly what the error describes, that is, having two classes that expose the same resource with the same order on the classpath at the same time.

Am adding TaskDefinitionResource2_4 & TaskActionResource2_4 resources

@ibacher from your explanation above it makes sense because the ServerLogResource2_4 extends BaseDelegatingResource class and so are the two resources am introducing

@gcliff I think the first step, then, is to modify the existing classes to change this:

@Resource(name = RestConstants.VERSION_1 + "/taskaction", supportedClass = TaskAction.class, supportedOpenmrsVersions = {
        "1.8.*", "1.9.*", "1.10.*", "1.11.*", "1.12.*", "2.0.*", "2.1.*", "2.2.*", "2.3.*", "2.4.*" })

To:

@Resource(name = RestConstants.VERSION_1 + "/taskaction", supportedClass = TaskAction.class, supportedOpenmrsVersions = {
        "1.8.*", "1.9.*", "1.10.*", "1.11.*", "1.12.*", "2.0.*", "2.1.*", "2.2.*", "2.3.*" })

I had to do something similar with the ServiceLog2_4 vs ServiceLog1_8.

thanks @ibacher it does fix it …

Allow me to digress abit here …

i keep on getting this error when i run the latest platform 2.4.0-SNAPSHOT with a few modules like the legacy ui, rest webservices and fhir in order to test changes i made in the new rest webservice sub module 2_4

For those modules to run on platform 2.4, you need to compile and run the latest snapshot version of each.

thanks @dkayiwa let me do that

@dkayiwa it worked,thanks

Hello @ibacher @dkayiwa .

On introducing the new resources ie TaskDefinitionResource2_4 & TaskActionResource2_4 depending on core 2.4 of which i deactivated their dependency on core 2.4 in their respective 1_8 core versions,though i seem to loose them and couple of other resources in the swagger API documentation .Been looking this and am not sure what could be the cause here, requesting for your thoughts .

Thanks

@ibacher @dkayiwa this is the commit of the work in progress

@ibacher @dkayiwa i made some changes in the resources so that they can both extend the TaskActionResource1_8 & TaskDefinitionResource1_8 respectively but still facing the same blocker of the resources not showing up in the swagger api documentation

Did you get a chance to look at this? https://wiki.openmrs.org/display/docs/Documenting+REST+Resources