Unable to get schemas from the DHIS2 API.

(Nibras Ar Rakib) #1

Dear developers,

While using DHIS2 (version-2.29), sometimes, we are facing following error on the browser.

Unable to get schemas from the DHIS2 API.

While tailing the dhis.log file, we found following message:-

WARN 2018-10-25 09:02:02,525 Failed to invoke @ExceptionHandler method: public void org.hisp.dhis.webapi.controller.CrudControllerAdvice.defaultExceptionHandler(java.lang.Exception,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception (ExceptionHandlerExceptionResolver.java [http-nio-8080-exec-74])

java.lang.NullPointerException

    at org.hisp.dhis.webapi.service.WebMessageService.send(WebMessageService.java:96)

    at org.hisp.dhis.webapi.controller.CrudControllerAdvice.defaultExceptionHandler(CrudControllerAdvice.java:259)

    at org.hisp.dhis.webapi.controller.CrudControllerAdvice$$FastClassBySpringCGLIB$$e80bbad6.invoke(<generated>)

    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)

    at org.hisp.dhis.webapi.controller.metadata.sync.MetadataSyncController$$EnhancerBySpringCGLIB$$1c221b30.defaultExceptionHandler(<generated>)

    at sun.reflect.GeneratedMethodAccessor1405.invoke(Unknown Source)

Any idea why this is happening frequently?

Thanks & Regards,

Rakib

(Muyunda Walusiku) #2

From the few months experience, this is usually caused by an expired session token. If you login to your dhis2 and remain in-active for some few minutes (30 in my case), your session expires while you remain logged in and if you try to do anything else, you get blocked and this error. Login out and back in has been our way round this. There should be a place where you configure maximum allowed inactivity time but I cant remember where just now, am sure the more experienced users will advise.

Hope this helps even a bit.

···

Walusiku J. Muyunda

Cell: +260967006614
Cell: +260971000614

"We have heaven to win and hell to shun, our lives testify better!"

(Nibras Ar Rakib) #3

Thank you very much for your prompt reply. But interestingly, the account was not in-active even for one minute. While I log into dhis2 and then try to got any other app (system settings, maintenance etc.) or even I reload the dashboard page, 5 out of 10 times it provides this error.

Also in the chrome browser console I received following error.

Thanks & Regards,

Rakib

···

On Thu, Oct 25, 2018 at 11:11 AM Walusiku Muyunda jomuwalu@gmail.com wrote:

From the few months experience, this is usually caused by an expired session token. If you login to your dhis2 and remain in-active for some few minutes (30 in my case), your session expires while you remain logged in and if you try to do anything else, you get blocked and this error. Login out and back in has been our way round this. There should be a place where you configure maximum allowed inactivity time but I cant remember where just now, am sure the more experienced users will advise.

Hope this helps even a bit.

Walusiku J. Muyunda

Cell: +260967006614
Cell: +260971000614

"We have heaven to win and hell to shun, our lives testify better!"

On Thu, Oct 25, 2018 at 6:01 AM Nibras Rakib nibrasarrakib@gmail.com wrote:

Dear developers,

While using DHIS2 (version-2.29), sometimes, we are facing following error on the browser.

Unable to get schemas from the DHIS2 API.

While tailing the dhis.log file, we found following message:-

WARN 2018-10-25 09:02:02,525 Failed to invoke @ExceptionHandler method: public void org.hisp.dhis.webapi.controller.CrudControllerAdvice.defaultExceptionHandler(java.lang.Exception,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception (ExceptionHandlerExceptionResolver.java [http-nio-8080-exec-74])

java.lang.NullPointerException

    at org.hisp.dhis.webapi.service.WebMessageService.send(WebMessageService.java:96)
    at org.hisp.dhis.webapi.controller.CrudControllerAdvice.defaultExceptionHandler(CrudControllerAdvice.java:259)
    at org.hisp.dhis.webapi.controller.CrudControllerAdvice$$FastClassBySpringCGLIB$$e80bbad6.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)
    at org.hisp.dhis.webapi.controller.metadata.sync.MetadataSyncController$$EnhancerBySpringCGLIB$$1c221b30.defaultExceptionHandler(<generated>)
    at sun.reflect.GeneratedMethodAccessor1405.invoke(Unknown Source)

Any idea why this is happening frequently?

Thanks & Regards,

Rakib


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

(Mike Johnson) #4

I have a user with a similar error, in Version: 2.30, Build revision: ac877b4, Build date: 2018-10-29 15:54. I don’t know how many minutes pass between the login and the error, but I do know that data is being entered into the /dhis-web-dataentry/ form, and the data is not being saved into the browser cache as expected. This is happening in a low bandwidth environment (<4 MBPS) and also a medium bandwidth environment (25MBps).

I don’t have access to the Chrome browser console, but I did ask the user to send to me the version of Chrome (70.0.3538.110) and the list of extensions that are installed. They are:

  1. adobe acrobat
  2. cisco webex extension
  3. grammarly for chrome
  4. lastpass
  5. nueva pestaña y busqueda de yahoo
  6. project gutenberg
  7. todoist
  8. send to kindlee for google chrome
  9. save to pocket
  10. obtenezemail
  11. mendeley
  12. inbox
  13. documentos de google sin coneccion
  14. boton de google academico

Can anyone provide more information about the offline data storage functionality and how many minutes the session should remain active if internet connectivity is lost?

(Nibras Ar Rakib) #5

I don’t know much about offline data storage functionality. But I restarted my tomcat and error goes away.

Also I a was using 2.30.

(Gerald Thomas) #6

Is there any solution for this problem? I am having this issue since we upgraded to 2.29

1 Like
(James Omutsani) #7

Hi @Gerald_Thomas,

Did you get a fix for this?

Best,
James.