Uploaded image for project: 'XForms Module'
  1. XForms Module
  2. XFRM-89

Get errors when create form in Chrome

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Ready for Work
    • Priority: Should
    • Resolution: Unresolved
    • Affects Version/s: 4.0.9.5
    • Fix Version/s: 4.0.9.6
    • Labels:
    • Complexity:
      Medium

      Description

      I've create a form with a single observation, a datetime concept. I'm attaching the xml here. When I go to the preview pane, I'm able to submit the form without any problems (you can see the output below), however, when I go to a patient and try to enter it I get a null pointer exception (included below output).

      I created a second form with a different datetime concept and the same thing happened again. Any idea what's going on?

      I'm using OpenMRS 1.6.2 and Xforms 4.0.9.5.1.

      JoaquĆ­n

      output
      <?xml version="1.0" encoding="UTF-8"?>
      <form xmlns="http://www.w3.org/2002/xforms" xmlns:openmrs="/moduleServlet/formentry/forms/schema/52-1" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" id="52" name="5. Fecha y hora de cita" version="0.1" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms">
      <header>
      <enterer/>
      <date_entered/>
      <session/>
      <uid/>
      </header>
      <patient>
      <patient.birthdate openmrs_table="patient" openmrs_attribute="birthdate"/>
      <patient.birthdate_estimated openmrs_table="patient" openmrs_attribute="birthdate_estimated"/>
      <patient.family_name openmrs_table="patient_name" openmrs_attribute="family_name"/>
      <patient.given_name openmrs_table="patient_name" openmrs_attribute="given_name"/>
      <patient.medical_record_number openmrs_table="patient_identifier" openmrs_attribute="identifier"/>
      <patient.middle_name openmrs_table="patient_name" openmrs_attribute="middle_name"/>
      <patient.patient_id openmrs_table="patient" openmrs_attribute="patient_id"/>
      <patient.sex openmrs_table="patient" openmrs_attribute="gender"/>
      <patient.tribe openmrs_table="patient" openmrs_attribute="tribe"/>
      <patient_address.address1 openmrs_table="patient_address" openmrs_attribute="address1"/>
      <patient_address.address2 openmrs_table="patient_address" openmrs_attribute="address2"/>
      </patient>
      <encounter>
      <encounter.encounter_datetime openmrs_table="encounter" openmrs_attribute="encounter_datetime">2012-07-17</encounter.encounter_datetime>
      <encounter.location_id openmrs_table="encounter" openmrs_attribute="location_id">2</encounter.location_id>
      <encounter.provider_id openmrs_table="encounter" openmrs_attribute="provider_id">1</encounter.provider_id>
      </encounter>
      <obs openmrs_concept="1238^MEDICAL RECORD OBSERVATIONS^99DCT" openmrs_datatype="ZZ">
      <fecha_y_hora_de_cita openmrs_concept="6328^fecha y hora de cita^99DCT" openmrs_datatype="TS">
      <date xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      <time xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true">2012-07-17T00:45:00-04:00</value>
      </fecha_y_hora_de_cita>
      </obs>
      <other/>
      <obs>
      <fecha_cita_para_toma_de_muestras_control_3_mes/>
      <value/>
      </obs>
      </form>

      Error
      java.lang.NullPointerException
      at org.openmrs.module.xforms.XformsQueueProcessor.processXForm(XformsQueueProcessor.java:206)
      at org.openmrs.module.xforms.download.XformDataUploadManager.queueForm(XformDataUploadManager.java:227)
      at org.openmrs.module.xforms.download.XformDataUploadManager.processXform(XformDataUploadManager.java:90)
      at org.openmrs.module.xforms.web.controller.XformDataUploadController.onSubmit(XformDataUploadController.java:98)
      at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
      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.xforms.web.XformsFilter.doFilter(XformsFilter.java:53)
      at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74)
      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:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:636)

      When I look at the form in Firefox, the error it shows is different its
      org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 357; Attribute "xmlns:xf" was already specified for element "xf:form".
      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
      at org.openmrs.module.xforms.download.XformDataUploadManager.processXform(XformDataUploadManager.java:88)
      at org.openmrs.module.xforms.web.controller.XformDataUploadController.onSubmit(XformDataUploadController.java:98)
      at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
      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.xforms.web.XformsFilter.doFilter(XformsFilter.java:53)
      at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74)
      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:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:636)

      FInally, if I create the same form in Firefox, it works.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jblaya Joaquin Blaya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 5 hours
                5h
                Remaining:
                Remaining Estimate - 5 hours
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified