Logout Error - HTTP Status 500

refapp
Tags: #<Tag:0x00007f88c6838a00>

(John Mark Esplana) #1

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


(Dimitri R) #2

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


(John Mark Esplana) #3

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!!!


(John Mark Esplana) #4

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


(Dimitri R) #5

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.


(Wesley Brown) #6

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