Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-485

Error when adding patient: Invalid patientId supplied

    XMLWordPrintable

Details

    Description

      I get the following error when attempting to add a patient. I get an error with and without the MRNGen module running (tried version 1.2 and 1.3). I know the identifier I'm trying to add is valid. We are not using a validator / check digit. The error is as follows...

      An Internal Error has Occurred
      java.lang.NullPointerException
      
      Consult the help document.
      Contact your friendly neighborhood administrator if it cannot be resolved.
      
      Hide stack trace
      org.openmrs.web.controller.patient.NewPatientFormController.onSubmit(NewPatientFormController.java:339)
      org.openmrs.web.controller.patient.NewPatientFormController.processFormSubmission(NewPatientFormController.java:219)
      org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
      org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
      org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
      org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
      org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
      java.lang.Thread.run(Thread.java:619)
      
      OpenMRS Version: 1.6.0 RC Build 12391 
      

      The log file reports the following...

      INFO - AddPersonController.formBackingObject(140) |2010-03-18 16:03:06,345| 22|Mark Summer||43|M
      INFO - LoggingAdvice.invoke(102) |2010-03-18 16:03:09,367| In method PersonService.parsePersonName. Arguments: String=Mark Summer,
      INFO - LoggingAdvice.invoke(127) |2010-03-18 16:03:09,368| Exiting method parsePersonName
      WARN - NewPatientFormController.formBackingObject(612) |2010-03-18 16:03:20,005| Invalid patientId supplied: ''
      java.lang.NumberFormatException: For input string: ""
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
              at java.lang.Integer.parseInt(Integer.java:470)
              at java.lang.Integer.valueOf(Integer.java:554)
              at org.openmrs.web.controller.patient.NewPatientFormController.formBackingObject(NewPatientFormController.java:608)
              at org.springframework.web.servlet.mvc.AbstractFormController.getCommand(AbstractFormController.java:431)
              at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:262)
              at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
              at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
              at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
              at java.lang.Thread.run(Thread.java:619)
      Mar 18, 2010 4:03:20 PM org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet openmrs threw exception
      java.lang.NullPointerException
              at org.openmrs.web.controller.patient.NewPatientFormController.onSubmit(NewPatientFormController.java:339)
              at org.openmrs.web.controller.patient.NewPatientFormController.processFormSubmission(NewPatientFormController.java:219)
              at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
              at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
              at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
              at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
              at java.lang.Thread.run(Thread.java:619)
      

      I believe this error message showed up once before in the log files...
      http://n2.nabble.com/Random-Errors-td3816199.html#a3822075

      But at that point, it wasn't preventing anything from working. Now, it is impossible to add a new patient no matter what I have tried.

      Gliffy Diagrams

        Attachments

          Activity

            People

              arbaughj James Arbaugh
              arbaughj James Arbaugh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: