Uploaded image for project: 'Legacy UI Module'
  1. Legacy UI Module
  2. LUI-134

NullPointerException when voiding Observation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.4
    • Labels:
    • Complexity:
      Low

      Description

      A NullPointerException is thrown when trying to void an Observation.

      The error can be reproduced as follows:

      1. Create an OpenMRS Distribution Server via openmrs-sdk
      2. Create an OpenMRS RefApp Module via openmrs-sdk
      3. Start Module on the Distribution Server
      4. Open the Legacy UI, create new Patient and new Obs Concept
      5. Create new Obs for that Patient of the newly defined Concept, save it
      6. Void/Remove the Obs

      More details can be found on: https://talk.openmrs.org/t/nullpointerexception-when-voiding-a-complexobs/14457

      Stack trace below:

      HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException
      
      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.doPost(FrameworkServlet.java:868)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      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.web.controller.observation.ObsFormController.onSubmit(ObsFormController.java:196)
      org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:274)
      org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:275)
      org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:146)
      org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
      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:650)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      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)
      
      note The full stack trace of the root cause is available in the Apache Tomcat/7.0.67 logs.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Navareth Bartłomiej Rasztabiga
              Reporter:
              flobue Florian Bütow [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: