Logout Error - HTTP Status 500

I’m getting the error " HTTP Status 500 - Could not open Hibernate Session for transaction; nested exception is org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]" when logging out. This happened after I installed the following:

  • appui v. 1.9
  • Location based access v.0.1.1

I’m using ref app 2.9

Here’s the link to the full error: https://pastebin.com/GJAUfCK6

1 Like

Hi @jesplana,

Ref App 2.9.0-SNAPSHOT ships with App UI 1.9.0 (see here), so I guess you did not add that one.

However I can see in your stack trace that the exception is thrown somewhere in the OpenHMIS Cashier module:

org.openmrs.module.openhmis.commons.api.ProviderUtil.getCurrentProvider(ProviderUtil.java:33)
org.openmrs.module.openhmis.cashier.web.filter.CashierLogoutFilter.clockOutCashier(CashierLogoutFilter.java:76)
org.openmrs.module.openhmis.cashier.web.filter.CashierLogoutFilter.doFilter(CashierLogoutFilter.java:57)

It would also be useful to know which exact version of that module is involved.

I think you would need to roll back a little here, start off a fresh Ref App 2.9.0-SNAPSHOT, add the actual “foreign” modules one by one and see which combination does produce the error upon logging out.

Alternatively you could debug CashierLogoutFilter right away to see if you can find out anything obvious (here I guess). But I’d say first try to identify what exact module or combination of modules does break the logout when added to Ref App 2.9.0-SNAPSHOT. In the unfortunate scenario of a faulty combination of modules then it could be that both LBAC and Cashier are part of it.

Does that make sense?

Cc’ing @insiderish from Banda Health

Hi @mksd, thanks for the quick response, that definitely make sense. I will try your suggestions and will get back to you in early January. Thanks!!!

Just to provide an update this issue. I restarted the server twice but still received the same issue. However, after restarting the computer and then restarting the server back up, I was able to log out without any issue.

Thanks

John

That’s weird.

The only difference that I can think of - and that might relate to those Hibernate errors - is that when restarting the whole computer you did also restart MySQL ; while when you restarted the “server” (which I read as being Tomcat) this didn’t happen.

Hello @jesplana! I am from the team that developed the OpenHMIS modules and would be curious if you run into this problem again. If you do, could you please post the full stack trace so that we can review it?

Thanks!

cc @insiderish

hello @ibewes I am still having the same error.

Could you help?

Wow… this is going back a while! We haven’t done much development on the OpenHMIS modules for around 5 years now so it’s unlikely that we will be able to devote much time to chasing down this issue. However, I can ensure that we do try to incorporate any pull requests that come in if someone else able to fix the issue. Please note that OpenHMIS has not been tested with the latest releases of OpenMRS and so I really don’t know if it is compatible at this point.

@insiderish - Is there anything you know about this that might help?

Yes, I agree that we haven’t tested and synced our modules with the latest platform. I suspect it could be the reason why the TimesheetService is not being registered. @anatoleabe if you’d be interested in looking at this (you can start by simply putting a Null Pointer check here) and creating a PR, we’ll be glad to help.

Thanks