GSoC 2019 : Advancement of OAuth2 Module and Improvements in SMART OWA

Hi @harsha89, @lahiruj, I am Vivek Raj, a second-year undergraduate student at Indian Institue of Technology Kharagpur, India. Recently I have set the environment of OpenMRS on my PC. I found this project seeks my attention and also would like to contribute during GSoC '19. I am having an experience of Java, Javascript, React and intermediate of OAuth2. I am enthusiastic to contribute to OpenMRS upon this project for my upcoming summer.
Thank You

Thank you for your interest. Let’s get start with solving some introductory tickets and complete the base requirements.

Hi,

I am trying to run the OAuth2 module on my PC, by putting the built openmrs-module-oauth2 OMOD files in my ${HOME}/.OpenMRS/modules folder, and restart the web server. The whole process seems to be struck at last with info:

INFO - EhCacheManagerFactoryBean.afterPropertiesSet(129) |2019-03-15 22:48:14,843| Initializing EhCache CacheManager.

I have attached my response to pastebin.com

cc @harsha89

Thanks.

Hey @vivekrj0

Glad to see your interest in the project. Can you tell which other modules are your running with oauth2 module?

Share the list of modules.

Hey @prabodhk

I am running all the modules of reference application-package-2.8.0 along with oauth2-0.8.omod. Currently, running modules are :

addresshierarchy-2.11.0.omod
adminui-1.2.3.omod
allergyui-1.8.1.omod
appframework-2.11.0.omod
appointmentscheduling-1.9.0.omod
appointmentschedulingui-1.7.0.omod
appui-1.8.0.omod
atlas-2.2.omod
calculation-1.2.omod
chartsearch-2.1.0.omod
coreapps-1.19.0.omod
dataexchange-1.3.2.omod
emrapi-1.24.4.omod
event-2.6.0.omod
fhir-1.13.0.omod
formentryapp-1.4.2.omod
htmlformentry-3.7.0.omod
htmlformentryui-1.7.0.omod
htmlwidgets-1.9.0.omod
idgen-4.5.0.omod
legacyui-1.4.0.omod
metadatadeploy-1.10.0.omod
metadatamapping-1.3.4.omod
metadatasharing-1.5.0.omod
owa-1.9.0.omod
oauth2-0.8.omod
providermanagement-2.10.0.omod
referenceapplication-2.8.0.omod
referencedemodata-1.4.4.omod
referencemetadata-2.8.0.omod
registrationapp-1.12.0.omod
registrationcore-1.8.0.omod
reporting-1.16.0.omod
reportingcompatibility-2.0.5.omod
reportingrest-1.10.0.omod
reportingui-1.6.0.omod
serialization.xstream-0.2.14.omod
uicommons-2.6.0.omod
uiframework-3.13.0.omod
uilibrary-2.0.6.omod
webservices.rest-2.22.0.omod

Remove these modules and run again :

addresshierarchy

appointmentscheduling

appointmentschedulingui

chartsearch

referencedemodata

referencemetadata

I have removed all the stated modules, but again it is showing the same info message :

 WARN - SpringSecurityCoreVersion.performVersionChecks(62) |2019-03-16 18:09:51,634| **** You are advised to use Spring 4.2.5.RELEASE or later with this version. You are running: 4.1.4.RELEASE
INFO - EhCacheManagerFactoryBean.afterPropertiesSet(129) |2019-03-16 18:09:55,034| Initializing EhCache CacheManager

All the reference application modules are working fine without oauth2 but when it is added the machine got stuck.

For how much time did you wait? It may take some…

Yeah, the server has started after 10mins(approx.).

But the console log showing the error :

ERROR - CommonsLogLogChute.log(96) |2019-03-17 12:40:47,535| #parse() null argument and the localhost also not started and showing the error at the startup.

I have attached the error at localhost in pastebin.com

Thanks for resolving the above EhCache CacheManager info.

Are you using this : https://github.com/PKatGITHUB/GSoC-2018-Final-Evaluations/blob/master/oauth2-2.0.omod

?

Are you using this omod file?

I am using the openmrs-module-oauth2 omod file.

@mavrk can you have a look at the issue?

Do you get the same problem if you use the snapshot version of the module?

Is the snapshot version is spring-security-oauth ?

You would compile it from the source which is here: https://github.com/openmrs/openmrs-module-oauth2

Yeah, I was compiling with the core version of OAuth2.0.8.

This should not happen. Can you please use Reference app 2.7 with the same list of module as I suggested above. That is the exact thing I use.

Hi @vivekrj0, sorry for the delayed response. You can use https://github.com/mavrk/oauth2-testbench-modules this list of modules which should work well with the .omod generated using https://github.com/openmrs/openmrs-module-oauth2

1 Like

Finally, I have installed OAuth2. It was webservices.rest-2.22.0.omod module which causes the error.

I followed the following steps:

First I installed the legacy UI, everything is Ok and I can access the application.

After which I tried to use the module manager from within the admin panel, and the module that causes the problem is the webservices-2.22 module.

Thanks!