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

Module is not unloaded completely when dependent module is reloaded

    Details

    • Complexity:
      Medium

      Description

      (reported anonymously)

      If 2 modules are already loaded into OpenMRS (module A and B, where module A requires B), and an updated module B is uploaded (with the 'update existing' feature in the browser), it causes a module exception error ('servlet mapping already exists') for the first servlet in module A.

      Possibly because module A wasn't stopped manually, and it tries to start module A again even though it's already running? I also tested this with BasicModule (with an added servlet and added requirement of another module) and saw the same thing happen.

        • Gives this error:
          An Internal Error has Occurred
          org.openmrs.module.ModuleException

      A servlet mapping with name uploadServlet already exists. moca's servlet is trying to overwrite it

      Consult the help document.
      Contact your friendly neighborhood administrator if it cannot be resolved.

      Hide stack trace
      org.openmrs.module.web.WebModuleUtil.loadServlets(WebModuleUtil.java:418)
      org.openmrs.module.web.WebModuleUtil.startModule(WebModuleUtil.java:343)
      org.openmrs.module.web.controller.ModuleListController.onSubmit(ModuleListController.java:208)
      org.springframework.web.
      servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)

      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)

        Gliffy Diagrams

          Attachments

            Issue Links

              Attachments-Category-Modification

                Activity

                  People

                  • Assignee:
                    dkayiwa Daniel Kayiwa
                    Reporter:
                    bwolfe Ben Wolfe
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    4 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: