← Back to team overview

dhis2-devs team mailing list archive

Re: Null pointer exception calling .../api/me/programs

 

Hi Jose,

this is related to the bug your reported some time ago - there is no
category combo for a data element. In latest 2.22 we have fixed the problem
in the data element maintenance app where no category combo was set for
default. In 2.23 we have also made the data element - category combo not
null in the db schema, meaning these situations should fail early as
opposed to when you load the form.

Good that it works now. Please upgrade to latest 2.22 and let us know if
the error comes back.

regards,

Lars


On Wed, Mar 9, 2016 at 12:07 AM, Jose Garcia Muñoz <josemp10@xxxxxxxxx>
wrote:

>
> Finally we had to restart the tomcat and it worked! All DataElements were
> previously imported (XML file) following the same structure than 2.20. Do
> you have any idea about what could it happened?
>
> Thanks guys!
> Jose
>
> On Tue, Mar 8, 2016 at 1:07 PM, Jose Garcia Muñoz <josemp10@xxxxxxxxx>
> wrote:
>
>>
>> Dear devs,
>>
>> we are getting the following error each time we call .../api/me/programs
>>  for some particular programs (I am only copying the relevant output). I
>> can not see yet any mistake in the program/user/org.unit configuration
>> (although the problem seems to be related with the dataelements inside the
>> program?)
>>
>> It may be a bug in the system? (I remember we had some problems with this
>> API call some months ago).
>>
>> Any ideas? It is a bit urgent :) (sorry )
>>
>> We are using 2.22 revision 21851
>>
>> Many thanks
>> Jose
>>
>>
>> java.lang.NullPointerException
>> 	org.hisp.dhis.webapi.utils.FormUtils.inputFromDataElements(FormUtils.java:224)
>> 	org.hisp.dhis.webapi.utils.FormUtils.inputFromProgramStageDataElements(FormUtils.java:209)
>> 	org.hisp.dhis.webapi.utils.FormUtils.fromProgram(FormUtils.java:178)
>> 	org.hisp.dhis.webapi.controller.user.CurrentUserController.getPrograms(CurrentUserController.java:614)
>> 	sun.reflect.GeneratedMethodAccessor1705.invoke(Unknown Source)
>> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> 	java.lang.reflect.Method.invoke(Method.java:497)
>> 	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
>> 	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
>> 	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
>> 	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775)
>> 	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
>> 	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
>> 	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
>> 	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
>> 	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)
>> 	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)
>> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
>> 	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)
>> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>> 	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>> 	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.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:88)
>> 	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.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140)
>> 	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:82)
>> 	org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter.doFilterInternal(ExcludableShallowEtagHeaderFilter.java:102)
>> 	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>> 	org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
>> 	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>> 	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
>> 	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org <https://www.dhis2.org/>

Follow ups

References