Uploaded image for project: 'DHIS2 Connector'
  1. DHIS2 Connector
  2. DCM-27

'Configure DHIS2 Connection' page crashes when trying to connect to a server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.2
    • Labels:
      None
    • Environment:
      Ubuntu 19.04

      Description

      The following error occurs when trying to connect to a DHIS2 server.

      HTTP Status 500 – Internal Server Error
      Type Exception 
      
      ReportMessage Handler processing failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.protocol.HttpCoreContext.<init>(Lorg/apache/http/protocol/HttpContext;)V" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/apache/http/client/protocol/HttpClientContext, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for the method's defining class, org/apache/http/protocol/HttpCoreContext, have different Class objects for the type org/apache/http/protocol/HttpContext used in the signatureDescription The server encountered an unexpected condition that prevented it from fulfilling the request.Exceptionorg.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.protocol.HttpCoreContext.<init>(Lorg/apache/http/protocol/HttpContext;)V" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/apache/http/client/protocol/HttpClientContext, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for the method's defining class, org/apache/http/protocol/HttpCoreContext, have different Class objects for the type org/apache/http/protocol/HttpContext used in the signature
      	org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287)
      	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
      	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
      	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
      	org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:73)
      	org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:93)
      	org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:61)
      	org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
      	org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:57)
      	org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109)
      	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:107)
      	org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      	org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      Root Causejava.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.protocol.HttpCoreContext.<init>(Lorg/apache/http/protocol/HttpContext;)V" the class loader (instance of org/openmrs/module/ModuleClassLoader) of the current class, org/apache/http/client/protocol/HttpClientContext, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for the method's defining class, org/apache/http/protocol/HttpCoreContext, have different Class objects for the type org/apache/http/protocol/HttpContext used in the signature
      	org.apache.http.client.protocol.HttpClientContext.<init>(HttpClientContext.java:151)
      	org.apache.http.client.protocol.HttpClientContext.adapt(HttpClientContext.java:142)
      	org.apache.http.client.protocol.RequestClientConnControl.process(RequestClientConnControl.java:71)
      	org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:109)
      	org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:176)
      	org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:485)
      	org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
      	org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
      	org.openmrs.module.dhisconnector.api.impl.DHISConnectorServiceImpl.testDHISServerDetails(DHISConnectorServiceImpl.java:624)
      	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.$Proxy319.testDHISServerDetails(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.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.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:122)
      	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.$Proxy320.testDHISServerDetails(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.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.$Proxy320.testDHISServerDetails(Unknown Source)
      	org.openmrs.module.dhisconnector.web.controller.DHISConnectorController.saveConfig(DHISConnectorController.java:98)
      	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:177)
      	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.doPost(FrameworkServlet.java:868)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
      	org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:73)
      	org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:93)
      	org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:61)
      	org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
      	org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:57)
      	org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109)
      	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:107)
      	org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      	org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
      	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      Note The full stack trace of the root cause is available in the server logs.Apache Tomcat/7.0.100
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              piumal1999 Piumal Rathnayake
              Reporter:
              piumal1999 Piumal Rathnayake
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified