Refapp - New patient registration error

Application Name: Reference Application Version Number: 2.12.0-SNAPSHOT

Question: Below is the configuration of my system:

Reference Application: 2.12.0-SNAPSHOT

OpenMRS Platform/ core: 2.4.0-SNAPSHOT

Ubuntu (Linux): 18.04.2 LTS

Apache Tomcat: 9.0.26

MySQL: 5.7.32

The Refapp has been installed successfully. When I try to register a new patient, after finishing all the steps, I reach at the below screen:

When I click the “Confirm” button of the above screen, a “UI Framework Error” gets displayed in the browser. I have pasted the tomcat error log below:

Please suggest a suitable fix.

Thank you.

Error rendering page view for clinicianfacing/patient: Make sure you have defined your pages in the right directory under omod/webapp/fragments/fields thats openmrs by default ,

. However am seeing clinicianfacing/patient directory , guess this is where its messing up and hence this error Cannot find controller or view for fragment: miniPatientAppointments., can you provide your json file definitions

@sharif Thanks for the reply.

I had downloaded the below ‘refapp’ git repo:

GitHub - openmrs/openmrs-distro-referenceapplication

The above repo was built locally and then installed on top of the openmrs platform (2.4.0-SNAPSHOT). The project directory does not have a “omod” sub-directory. Below is the image of the project directory tree:


Thank you.

Are you able to reproduce it here?

At the above link, the error is not reproducible. Thanks.

How about when you set up the Reference Application: 2.12.0-SNAPSHOT using the SDK? OpenMRS SDK - Documentation - OpenMRS Wiki

When the Tomcat server is stopped and a new Refapp server is set up and run using the SDK, everything works well and the new patient registration is successful.

1 Like

According to the error Logs,

Caused by: java.lang.RuntimeException: Cannot find controller or view for fragment: miniPatientAppointments

Looks like the Appointments Module had not been loaded properly .It inserts Extensions into the Patient DashBord .

@mozzy You are right about this. When I look at the ‘Manage Modules’ page, I can see that the “Appointment Module” has trouble starting (all other modules are running properly):


Please let me know what can be done about this. Thanks.

To trouble shoot the cause why its not starting , Clean your server Logs ,

Then go back to the manage Modules page and try to run it (click the run module button). Then paste the new error logs here.

I have done as suggested, cleared the server logs and tried to re-start the module but there was an error:


I have pasted the new server logs below:

On StartUp , the module fails to persist a the Appointment Dataset required for some functionality .

At a quick glace ,theres an issue with saving and serializing that dataset. probably because of

Duplicate entry 'c1bf0730-e69e-11e3-ac10-0800200c9a66' for key 'uuid'.

Stop your server ,
empty the serialized_object table like

DELETE FROM openmrs.serialized_object :

and then restart the server.

This is the underlying cause: cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : org.openmrs.User$HibernateProxy$GBfLB5Vx

Deleting from the serialized_object will hide it for the time being but it will come back after a little while. @nischith can you create a ticket for it? Secondly, is there any reason why you are using a snapshot version of the platform which was released?

The Refapp (2.12.0-SNAPSHOT) I had first downloaded had a dependency on the platform version 2.3.2 going by the Refapp’s pom.xml definitions. So, I installed platform (2.3.2) first and tried to install the latest Refapp (2.12.0-SNAPSHOT) on top of it. This installation however did not succeed and I knew there was some compatibility issue between these two.

After a few days later (on 07/12/2020), I found a new commit to the RefApp GitHub repo → “Switching to platform 2.4.0-SNAPSHOT”. When I installed this new code, the installation was successful. So, I continue to use Refapp (2.12.0-SNAPSHOT) of the above commit along with platform 2.4.0-SNAPSHOT.

Please let me know if there is a better approach. Thanks.

Not sure what exactly you would want to do , bit if its merely deployment for implementation/Testing , Docker is my number one on the List

see different image tags on Docker Hub

My intention is to have an installation which is best suitable for ‘development’ (for further customisation) and bug fixing if necessary. So, I have been more focusing on starting with the source code, building it and then deploying it. Both with the platform and the Refapp the intention is to start with the source code to facilitate this.

ideally for development , the SDK will do magic for you

Or Running via docker-compose also does it best when you configure it collectively

I did try this approach yesterday and it worked very well. I could set up a Refapp server in no time and run it. But when I set up a server using the SDK, I am not sure if I get access to the source code. Is it possible to make changes to the platform/ refapp source code (for bug fixing of the platform code/ customisations) when the server has been set up using the SDK?

I am not talking about building newer modules but about having access to the source code of platform and refapp itself. If the server has been set up using the SDK does one get access to the source code of platform/ refapp itself?

the SDK can help you build the latest-snapshot versions (latest changes)for the platform/ref-app .

you can always checkout the source code and build it locally ,and deploy it locally