← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS2 - Error message when saving event report as favorite

 

Hi Lars,

It has been a while but the below error is still persisting. I've had a more detailed look recently and this is what happens:


1.    Creating a favorite for aggregate reports works fine. However, when checking in the database it leaves the eventreport.subtotals column empty.

2.    Creating a favorite for individual reports does not work and generates the error on the screenshot below, even when I manually fill in all the empty Booleans with "false" before trying to create a favorite

The catalina.out file basically gives the same error message as the screenshot. I guess modifying the "fail on null for primitives" parameter in DHIS is not an option?

Regards,

Robin


From: Lars Helge Øverland [mailto:larshelge@xxxxxxxxx]
Sent: 10 February 2015 18:04
To: Jason Pickering
Cc: Robin Martens; dhis2-users@xxxxxxxxxxxxxxxxxxx; developers
Subject: Re: [Dhis2-devs] DHIS2 - Error message when saving event report as favorite

Hi Robin,

the problem is that you have boolean fields in the eventreport table with null values, which crashes when dhis tries to convert it into a java primitive. Try running this SQL on your db:

update eventreport set rowsubtotals = false where rowsubtotals is null;

If it still fails, try repeating for the other boolean fields in that table.

Lars


From: Dhis2-users [mailto:dhis2-users-bounces+martens=sher.be@xxxxxxxxxxxxxxxxxxx] On Behalf Of Robin Martens
Sent: 09 February 2015 17:31
To: Jason Pickering
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx; developers
Subject: Re: [Dhis2-users] [Dhis2-devs] DHIS2 - Error message when saving event report as favorite

Hi Jason,

Sorry for the bad quality. Here's another one:


[cid:image001.png@01D06ADD.F253CFC0]



I can't copy paste the text directly (blocked), but here's the error message from google chrome devtools if useful:

HTTP Status 500 - Can not map JSON null into type boolean (set DeserializationConfig.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES to 'false' to allow)
________________________________

type Exception report

message Can not map JSON null into type boolean (set DeserializationConfig.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES to 'false' to allow)

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

exception

com.fasterxml.jackson.databind.JsonMappingException: Can not map JSON null into type boolean (set DeserializationConfig.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES to 'false' to allow) at [Source: org.apache.catalina.connector.CoyoteInputStream@5640df2e; line: 1, column: 4170] (through reference chain: org.hisp.dhis.eventreport.EventReport["rowSubTotals"])com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:700)com.fasterxml.jackson.databind.deser.impl.NullProvider.nullValue(NullProvider.java:34)com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:293)com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:124)com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2993)com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2144)org.hisp.dhis.dxf2.utils.JacksonUtils.fromJson(JacksonUtils.java:172)org.hisp.dhis.webapi.controller.event.EventReportController.postJsonObject(EventReportController.java:89)sun.reflect.GeneratedMethodAccessor2615.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:606)org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)javax.servlet.http.HttpServlet.service(HttpServlet.java:647)org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:64)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:115)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:80)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.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 Apache Tomcat/7.0.42 logs.

________________________________
Apache Tomcat/7.0.42

Robin


________________________________
De : Jason Pickering [jason.p.pickering@xxxxxxxxx]
Envoyé : lundi 9 février 2015 14:57
À : Robin Martens
Cc : dhis2-users@xxxxxxxxxxxxxxxxxxx; developers
Objet : Re: [Dhis2-devs] DHIS2 - Error message when saving event report as favorite
Hi Robin,
It is very difficult to see in this screen shot. Maybe you can copy and paste the text here so that the developers might be able to read what the actual error is?

Best regards,
Jason


On Mon, Feb 9, 2015 at 2:52 PM, Robin Martens <martens@xxxxxxx<mailto:martens@xxxxxxx>> wrote:
Dear all,

We're getting the following error message when trying to save an event report as a favorite (see image below). This is only happening for event reports, all other functionalities (download, generating on screen, etc.) don't have any problems.


[cid:image002.jpg@01D06ADD.F253CFC0]


We're using DHIS 2.17 (and preferably not planning an upgrade to 2.18 soon).

Can anyone give some feedback if this is a DHIS issue or linked to our database?

Kind regards,

Robin




_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp



--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx<mailto:jason.p.pickering@xxxxxxxxx>
tel:+46764147049

PNG image

JPEG image


Follow ups

References