# Banda/openHMIS cashier module: Initializing EhCache CacheManager issue

**URL:** <https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709>\
**Category:** Add-on Modules\
**Tags:** openhmis\
**Created:** [March 17, 2021, 9:29am UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709 "2021-03-17T09:29:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [March 17, 2021, 9:30am UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/1 "2021-03-17T09:30:00Z")

</div>

**Module:** OpenHMIS Cashier Module

**Module Version:** 4.0.0

**System Version:** 2.3.0

**Reference Application Module:** 2.10.0

**Issue or Question:**

When the server is started with the cashier module. It will stay at the `Initializing EhCache CacheManager` stage for more than 40 minutes. Without the module this stage takes less than 10 minutes.

I’m willing to try debugging this, but I’m clueless on where to start. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 17, 2021, 7:53pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/2 "2021-03-17T19:53:35Z")

</div>

Try the latest snapshot version of the module.

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [March 19, 2021, 9:51pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/3 "2021-03-19T21:51:24Z")

</div>

Thanks for reaching out.

Sadly it is still the same with the latest snapshot version: Here is my `openmrs-distro.properties`

> **openmrs-distro.properties**
>
> ```
> #Fri Mar 19 20:59:10 GMT 2021
> db.h2.supported=false
> db.sql=classpath\://openmrs-distro.sql
> name=Reference Application
> omod.addresshierarchy=2.11.0
> omod.adminui=1.3.0
> omod.allergyui=1.8.2
> omod.appframework=2.14.0
> omod.appointmentscheduling=1.12.0
> omod.appointmentschedulingui=1.9.0
> omod.appui=1.12.0
> omod.atlas=2.2
> omod.atlas.type=omod
> omod.attachments=2.2.0
> omod.calculation=1.2
> omod.coreapps=1.28.0
> omod.dataexchange=1.3.4
> omod.emrapi=1.28.0
> omod.event=2.7.0
> omod.event.groupId=org.openmrs
> omod.fhir=1.20.0
> omod.formentryapp=1.4.2
> omod.htmlformentry=3.10.0
> omod.htmlformentryui=1.10.0
> omod.htmlwidgets=1.10.0
> omod.idgen=4.5.0
> omod.legacyui=1.6.0
> omod.metadatadeploy=1.11.0
> omod.metadatamapping=1.3.4
> omod.metadatasharing=1.6.0
> omod.openhmis.backboneforms=3.0.0
> omod.openhmis.cashier=4.1.0-SNAPSHOT
> omod.openhmis.commons=4.0.0
> omod.openhmis.inventory=3.1.0-SNAPSHOT
> omod.owa=1.10.0
> omod.patientqueueing=1.1.0
> omod.providermanagement=2.10.0
> omod.referenceapplication=2.10.0
> omod.referencedemodata=1.4.5
> omod.referencemetadata=2.10.2
> omod.registrationapp=1.16.0
> omod.registrationcore=1.9.0
> omod.reporting=1.20.0
> omod.reportingcompatibility=2.0.6
> omod.reportingrest=1.11.0
> omod.reportingui=1.6.0
> omod.serialization.xstream=0.2.14
> omod.serialization.xstream.type=omod
> omod.uicommons=2.12.0
> omod.uiframework=3.17.0
> omod.uilibrary=2.0.6
> omod.webservices.rest=2.28.0
> owa.openmrs-owa-sysadmin=1.2
> version=2.10.0
> war.openmrs=2.3.0
> 
> ```

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 20, 2021, 6:07pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/4 "2021-03-20T18:07:48Z")

</div>

Just for troubleshooting purposes, are you able to reproduce it with the latest release of the reference application?

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [March 20, 2021, 10:15pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/5 "2021-03-20T22:15:11Z")

</div>

Yes, I’m able to reproduce it with the latest release:

```
version=2.12.0-SNAPSHOT
war.openmrs=2.4.0
```

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 21, 2021, 8:08pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/6 "2021-03-21T20:08:54Z")

</div>

[openhmis.cashier-4.1.0-SNAPSHOT.csv](https://talk.openmrs.org/uploads/short-url/sDAhVpUjUD6d9iQ1omGKvP0TCWF.csv) (376.8 KB)

Try the attached module. Remember to rename the file extension from `csv` to `omod`

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [March 22, 2021, 5:40pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/7 "2021-03-22T17:40:00Z")

</div>

Thanks, it worked !

What was the magic ?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 23, 2021, 9:51am UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/8 "2021-03-23T09:51:08Z")

</div>

[cashier.csv](https://talk.openmrs.org/uploads/short-url/m1qxSHKFUGIFOgdGGEhY6sFxAoG.csv) (77.9 KB)

Attached is the patch file. Remember to rename the file extension from `csv` to `patch`

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [March 24, 2021, 3:24pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/9 "2021-03-24T15:24:33Z")

</div>

Thanks for the patch!

Are you planning to send the changes upstream? Would you like me to do it? I could open the bug issue and make PR for this, with your changes.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 24, 2021, 5:21pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/10 "2021-03-24T17:21:03Z")

</div>

> [@npiaget](#):
>
> Are you planning to send the changes upstream?

No I am not.

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [April 14, 2021, 11:45am UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/11 "2021-04-14T11:45:20Z")

</div>

I have forked the module and implemented your changes.

> **[npiaget/openmrs-module-openhmis.cashier](https://github.com/npiaget/openmrs-module-openhmis.cashier/tree/EhCache)**
>
> EhCache

@dkayiwa Would it be alright to ask for a PR ?

@insiderish Daniel helped me to fix the very slow Initializing of EhCache on the module. Would you be interested in a PR?

---

<div class="post-metadata">

**Author:** ![insiderish](https://talk.openmrs.org/user_avatar/talk.openmrs.org/insiderish/32/6196_2.png) [@insiderish](https://talk.openmrs.org/u/insiderish)\
**Post date:** [April 14, 2021, 1:09pm UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/12 "2021-04-14T13:09:52Z")

</div>

Great! Go ahead and do it.

Thanks!

---

<div class="post-metadata">

**Author:** ![npiaget](https://talk.openmrs.org/user_avatar/talk.openmrs.org/npiaget/32/8996_2.png) [@npiaget](https://talk.openmrs.org/u/npiaget)\
**Post date:** [April 16, 2021, 11:31am UTC](https://talk.openmrs.org/t/banda-openhmis-cashier-module-initializing-ehcache-cachemanager-issue/32709/13 "2021-04-16T11:31:42Z")

</div>

OK thanks, here is the pull request:

> <https://github.com/OpenHMIS/openmrs-module-openhmis.cashier/pull/119>
