Unable to use Appointment blocks as the user is forced to logout

Tags: #<Tag:0x00007f828cf019a8>

I recently setup OpenMRS Reference Application 2.7.0 (Platform 2.1.1 WAR and Reference Application 2.7). When I use Appointment Scheduling UI module I get the following error:

I tried uninstalling Java,Tomcat,Mysql and OpenMRS and reinstall them in hopes that it would be solved, but unfortunately it wasn’t.

Should I downgrade OpenMRS WAR file or the reference application? Because my implementation depends largely on the appointment scheduling UI module.

Thanks.

@hossam have you tried running it on Platform 2.0.6

1 Like

@hossam could you give more information on how to reproduce the bug?

1 Like

@samuel34 Would this help?

@hossam How about upgrading the appointment scheduling modules

@tendomart not yet…cause my data is on a standalone reference application 2.7. so I was worried if I do that I wouldn’t be able to import and export. But if this is my only option for the time being, then I will have to do it.

I’m using appointmentscheduling-1.8.0, appointmentschedulingui-1.7.0

@ssmusoke Actually I’m running a standalone reference application 2.7 with an exact copy of the modules used in my enterprise implementation. and everything works fine. so I’m sure you can understand how bewildered I am that this is happening only in enterprise.

then the browser gives me this page:

@samuel34 @tendomart could this be a problem with tomcat? because this isn’t happening in the standalone version.

and as you see here, the URL it redirects me to is not even correct

http://localhost:8080/openmrs/referenceapplication/login.page

I always tend to use the SDK over the standalone so cannot help much there

1 Like

thank you. I appreciate it

Which version of tomcat are you using?

tomcat 8.0.50

Can you try 7.x and tell us what happens?

1 Like

ok I will.

Thank you.

This actually reminds me a bit of an error that we have seen on demo.openmrs.org, but never been able to reproduce anywhere else. I don’t remember the details, but one of the appointment scheduling pages give some error to do with security (mixed content or something?)

(I couldn’t find any reference to this on talk in 2 minutes of searching though.)

1 Like

@dkayiwa I used tomcat 7 instead and the exact same error happened.

I downgraded OpenMRS platform to 2.0.6 and it worked fine. The aforementioned error did not appear

1 Like

Hi all, I have been receiving the exact same error. I removed the Appointment Scheduling UI Module, Appointment Scheduling Module and Provider Management Module and downloaded the latest versions. This fixed the error appearing in all but the “Daily Appointments”.

I’m running Tomcat7 OpenJDK 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11

I then tried going to "Advanced Administration and selected “Appointments” which returns the following error;

type Exception report

message Request processing failed; nested exception is java.lang.NullPointerException

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) javax.servlet.http.HttpServlet.service(HttpServlet.java:624) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:57) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70) org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

root cause

java.lang.NullPointerException org.openmrs.module.appointmentscheduling.api.impl.AppointmentServiceImpl$1.compare(AppointmentServiceImpl.java:860) org.openmrs.module.appointmentscheduling.api.impl.AppointmentServiceImpl$1.compare(AppointmentServiceImpl.java:857) java.util.TimSort.binarySort(TimSort.java:296) java.util.TimSort.sort(TimSort.java:221) java.util.Arrays.sort(Arrays.java:1512) java.util.ArrayList.sort(ArrayList.java:1462) java.util.Collections.sort(Collections.java:175) org.openmrs.module.appointmentscheduling.api.impl.AppointmentServiceImpl.getAllProvidersSorted(AppointmentServiceImpl.java:857) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) com.sun.proxy.$Proxy471.getAllProvidersSorted(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52) org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303) org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) com.sun.proxy.$Proxy472.getAllProvidersSorted(Unknown Source) org.openmrs.module.appointmentscheduling.web.controller.AppointmentListController.getProviderList(AppointmentListController.java:104) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:163) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446) org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) javax.servlet.http.HttpServlet.service(HttpServlet.java:624) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:57) org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70) org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Hi All, I’m experiencing the same issue. Just saw this post, and will update the modules to the latest versions and test. But in the meantime posting this in case there’s some updates. Will send my findings shortly. Thanks!