Error on startup due to SessionController2_0

Description

In , a new SessionController2_0 class was added.

When trying to use the latest REST omod that includes this on a distribution that has the orderextension module installed, I get this error on startup:

WARN - AbstractApplicationContext.refresh(591) |2024-11-04T08:51:31,070| Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'initPathMatcher2_4': Unsatisfied dependency expressed through field 'handlerMappings'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0' defined in class path resource [openmrs-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'regimenExtensionController' method
org.openmrs.module.orderextension.web.controller.RegimenExtensionController#populateModel(HttpServletRequest, Map)
to {GET / thoughts on this?

Certainly something could be off in the orderextension module, but this still seems non-standard. Can you advise?

Activity

Show:

Mike Seaton January 28, 2025 at 1:13 PM

committed here:

Mike Seaton November 4, 2024 at 2:43 PM

or could one of you have a look?

Mike Seaton November 4, 2024 at 2:42 PM
Edited

PR here which basically undos what was added in REST-946 in favor of just doing this in the single session controller: .

Basically, all the new controller that was introduced was doing was exactly copying the method from the parent controller, and just changing the name of the privilege used, so this is something we should just be able to do in the original class.

Details

Assignee

Reporter

Fix versions

Priority

Created November 4, 2024 at 2:13 PM
Updated January 28, 2025 at 1:13 PM