Skip to content

Compile legacyui module against OpenMRS Platform 3.0.0-SNAPSHOT#232

Closed
Copilot wants to merge 9 commits intomasterfrom
copilot/fix-compiler-errors-tests
Closed

Compile legacyui module against OpenMRS Platform 3.0.0-SNAPSHOT#232
Copilot wants to merge 9 commits intomasterfrom
copilot/fix-compiler-errors-tests

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Platform 3.0.0-SNAPSHOT upgrades to Spring 7, Hibernate 6, Jakarta EE 10, and Java 21. This migrates the legacyui module to compile and pass all 366 tests against it.

Jakarta EE migration

  • javax.servletjakarta.servlet across all Java, JSP, and TLD files
  • javax.annotationjakarta.annotation in tests
  • POM: javax.servlet-api/jsp-apijakarta.servlet-api/jakarta.servlet.jsp-api

Spring 6/7 theme support removal

  • Spring 6 removed all theme infrastructure. Added local org.openmrs.web.theme package (Theme, ThemeSource, SimpleTheme, ResourceBundleThemeSource, ThemeChangeInterceptor)
  • Created org.openmrs.web.taglib.ThemeTag to replace removed org.springframework.web.servlet.tags.ThemeTag; updated spring.tld

Spring MVC namespace conflict

  • Replaced <mvc:view-controller> and <mvc:interceptors> with plain bean definitions — the MVC namespace registers a duplicate SimpleControllerHandlerAdapter that conflicts with @EnableWebMvc in openmrs-core's WebConfig

Incompatible Apache taglibs

  • Removed page.tld, request.tld, response.tld — these reference javax.servlet-based classes unavailable at runtime
  • Replaced <request:existsParameter name="X"> with <c:if test="${not empty param.X}"> in the two JSPs that used it

PortletTag TryCatchFinally

  • PortletTag now implements jakarta.servlet.jsp.tagext.TryCatchFinally — Jakarta JSTL's ImportSupport no longer provides these methods

API migrations

  • commons-langcommons-lang3 (escapeHtmlescapeHtml4, escapeJavaScriptescapeEcmaScript)
  • Jackson 1.x (org.codehaus.jackson) → Jackson 2.x (com.fasterxml.jackson)
  • WebBindingInitializer.initBinder signature updated for Spring 7
  • XSSFilter/XSSRequestWrapper updated for Jakarta Servlet API

Build config

  • openmrsPlatformVersion3.0.0-SNAPSHOT, Java 21, DWR 3.0.0-SNAPSHOT
  • CI matrix: removed Java 8/11/17, kept 21 and 25

Test fixes

  • Updated test datasets for schema changes (privilege.creator, scheduler_task_config.creator)
  • ConceptFormControllerTest.shouldVoidShortName: use non-Numeric datatype to avoid Hibernate 6 TransientPropertyValueException from ConceptNumeric(Concept) constructor reassigning persistent entity back-references
  • ProgramFormControllerTest: added flushSession()/clearSession() between sequential controller calls

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 23, 2026 12:14
…ommons-lang3, Spring 6+ theme removal, Jackson 2.x, DWR 3.0.0-SNAPSHOT

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
…le schema, Jackson fieldNames, qualifier

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
…duplicate handler adapter, WebComponentRegistrar null check

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix compilation errors and test failures for module Port legacyui module to openmrsPlatformVersion 3.0.0-SNAPSHOT Feb 23, 2026
Copilot AI requested a review from dkayiwa February 23, 2026 12:50
…ler adapters, fix Hibernate 6 TransientPropertyValueException, fix ProgramFormControllerTest session state

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title Port legacyui module to openmrsPlatformVersion 3.0.0-SNAPSHOT Fix all failing tests for Platform 3.0.0-SNAPSHOT compatibility Feb 23, 2026
Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title Fix all failing tests for Platform 3.0.0-SNAPSHOT compatibility Compile on Platform 3.0.0-SNAPSHOT and remove Java 8/11/17 from build matrix Feb 23, 2026
…asperException on Platform 3.0.0

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title Compile on Platform 3.0.0-SNAPSHOT and remove Java 8/11/17 from build matrix Remove incompatible Apache taglibs to fix JasperException on Platform 3.0.0 Feb 23, 2026
…m 3.0.0

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title Remove incompatible Apache taglibs to fix JasperException on Platform 3.0.0 Compile legacyui on Platform 3.0.0-SNAPSHOT (Spring 7, Hibernate 6, Jakarta EE) Feb 23, 2026
…lly interface

Co-authored-by: dkayiwa <1390773+dkayiwa@users.noreply.github.com>
Copilot AI changed the title Compile legacyui on Platform 3.0.0-SNAPSHOT (Spring 7, Hibernate 6, Jakarta EE) Compile legacyui module against OpenMRS Platform 3.0.0-SNAPSHOT Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants