"Error while deserializing address layout template" while creating new patient in Legacy UI

Hello everyone,

Im currently learning OpenMRS and trying to get to know the application. I installed OpenMRS core v2.4 and Legacy UI v1.7 through git on Eclipse on Windows, and run webapp with jetty.

When I tried to add new patient, “Error while deserializing address layout template” is shown in the “Address” field. If I proceed I’ll get exception saying “address cannot be null”.

I tried clearing cache and reinstalling many times, using LegacyUI v1.6 from the web but didnt work because I think it’s compatible with this version of OpenMRS Core. I also tried 2 different windows machine, and installed serialization.xstream.master but the problem persists. My friend who installed openmrs on ubuntu has his address field showing just fine.

It is much appreciated if someone can guide me through this. Thanks in advance.

Can you share the server side log via pastebin.com?

Hi Daniel,

Here’s the log since from the point the server started: https://pastebin.com/yGfftn3X

For this I signed on => Find/Create Patient => Create Patient (fields filled) => Save (Fields filled, Address form not showing) => HTTP ERROR 500

Here’s the log starting at the initial build: https://pastebin.com/XRr6N5CQ

Thank you.

Using pastebin.com, share the contents of your global property (setting) named layout.address.format

Hi Daniel, I am also facing the same issue. I am new to this project so can you please explain me where to find the global property setting layout.address.format


1 Like

Here are the contents (https://pastebin.com/1zSWSrRE) and layout.address.format is set to general

I have installed openmrs-core(version 2.5) through manual installation in Ubuntu 20.04 and legacy UI v1.8.0.

Just for troubleshooting purposes, does it make any difference if you use the same value as the one here? https://qa-refapp.openmrs.org/openmrs/admin/maintenance/globalProps.form

1 Like

Did that @dkayiwa, and restarted the server, same error persisting. Here’s something (https://pastebin.com/KjHWnT0M) more additional info as compared to @tqa2895 's server output

Use pastebin.com to share the value of that setting.

1 Like

Here it is (https://pastebin.com/D1ae2rAz) @dkayiwa

Initially, this was observed while using java version: openjdk version "1.8.0_265" (output from java -version) but after I installed the oracle version of java i.e java version "1.8.0_261" and switched to it, this problem got solved. Meanwhile the global property setting layout.address.format was set at its original value general.

@ashk77 after changing Jdk version to “1.8.0_261”, still facing the same problem that “Error while deserializing address layout template”.

1 Like

Thanks @dkayiwa @ashk77 , i just change the layout.address.format general to (refer code)

Things worked as expected.

1 Like

Thanks @theanandankit for pointing that out, I was wrong earlier

Thanks @dkayiwa , mistake from my side as I had just copied <org.openmrs.layout.address.AddressTemplate> instead of the whole.

1 Like

Hi, would you like to tell me where can I find out the layout.address.format? Thanks!


Home > System Adminstration > Advanced Adminstration > Advanded Settings (Under Maintenance) > layout.address.format

Hope this will helpful !

1 Like

Hi, thanks! But, I’m using the Mac, so is your method also works? And you Home means my computer system’s Home?

Home page means OpenMRS home page i.e http://localhost:8080/openmrs/referenceapplication/home.page

Sorry, I still can not fix it. Can you tell me how can I find out the code of it, and I want to change directly.