InvalidActivationKeyException in AttachmentResource

Tags: #<Tag:0x00007f0f19d694b0> #<Tag:0x00007f0f19d69348>

Hello, i have been working on this ticket where by i need to document attachmentResource in attachment module unfortunately for me to be able to get help of methods used to document any resource like getGetModel ,getCREATEModel and getUPDATEModel for docs and swagger docs , we need to be having 2.20.0+ according to this wiki.

i went ahead and updated the from 2.17.0 to 2.28.0 followup ticket is here ticket. then i got errors full logs. so cant tell where the problem could come from. Besides that i tried updating openmrsVersion from 1.10.5 to 1.10.6 but also got the similar issue it seems am lacking other different options to get ublocked. kindly need your guidance thanks cc @dkayiwa @ibacher @mksd

1 Like

Hi @sharif. I think you should probably only attempt to do this in the 2.x submodules. I haven’t looked but that’d be my guess.

1 Like

@mksd oh i had done this in 1.10, let me try reverting my changes and see if there is any progress thanks

Hello @mksd , if i do this in 2.x it may incur to duplication of code since almost every snippet of code used in 1.10 can also be implemented in 2.0 since we are documenting the resouce however am delighted to send some pr code for review

Hello @mksd sorry for late reply ,however am getting the similar error perhaps i just upgraded to 2.28.0 here is the ful log, need your guidance thanks

Let’s try to first to do the minimal REST WS upgrade, that’d be 2.21.0 (that’s when all the Swagger stuff was added, see here.)

Perhaps depending on 2.28.0 pulls too much, let’s just try the above first.

Deep down the error is:


InvalidActivationKeyException was introduced in Core 2.2.0. I guess REST WS 2.28.0 refers to it somehow (I haven’t looked yet.)

ok thanks let me try that and see

@mksd i upgraded to <webservices.restVersion>2.21.0</webservices.restVersion>

like how yu had suggested, and fall into the same error, after that i tried upgrading openmrsVersion from 2.0.0 to


, this time around i had this issue Failed to load ApplicationContext, am sure from here we can still go on and look through this error. some guidance here thanks

@sharif could you remove this dependency since rest-webservices dependency takes care of it. I have drafted a PR that you can build on top of on github here

hey @mksd @reagan Still looking deeply into this type of error which seem not to be new ,upgrading to the above files breaks this AttachmentServicesTests are breaking tests errors. However saw some thread with slightly similar error upgrading serialization.xstream-api to 0.2.7 but this has not helped me at still on it

Thanks @reagan let me have a look, however that dependency of io.swagger shouldnt be in that PR all can be categorised after upgrading to 2.20.0 and above. let me update that pr. thanks

Sure this doesnt need to be there.

@reagan Thanks this seems to be already applied. here

    </dependency> anything missing

@reagan actually when i changed webservices from being called as variables as above somehow somewhere i was all through thanks. Here is the Pull request so you can have a look,am sure this will need more testing functionalities

Adde comments on the PR

Hey @reagan did not see your comment

Kindly check again…Hadn’t submitted them yet as they were still pending…My bad

1 Like