Skip to content

Update EVALSYS for Sakai master's Jakarta, Spring 6, and Hibernate 6 stack - #209

Merged
ottenhoff merged 14 commits into
sakaicontrib:masterfrom
ottenhoff:master-jakarta-spring6-hibernate6
Nov 19, 2026
Merged

ottenhoff merged 14 commits into
sakaicontrib:masterfrom
ottenhoff:master-jakarta-spring6-hibernate6

Conversation

@ottenhoff

@ottenhoff ottenhoff commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Sakai master now targets Java 21, Tomcat 10.1, Spring 6, and Hibernate 6. EVALSYS still uses Java EE servlet APIs, Thymeleaf's Spring 5 integration, and Hibernate APIs removed in Hibernate 6. The smoke test currently stops while compiling Sakai with JDK 17 (invalid target release: 21).

This updates EVALSYS to the Jakarta dependencies managed by Sakai's 27-SNAPSHOT parent, switches Thymeleaf to Spring 6, and removes the Java EE WebJars servlet in favor of the existing Spring resource handler. Controller request parameters have explicit names, including date fields, so Spring 6 binding works without the compiler's -parameters flag. The three maps collecting all request parameters remain unnamed. Hierarchy caching uses master's Spring CacheManager. The license plugin and its inherited Git extension are pinned to matching versions so mvn license:check works.

DAO operations now use the transaction-bound Hibernate Session directly because HibernateTemplate loads the removed Criterion API. Identifier access and collection HQL use Hibernate 6-compatible APIs. Assignment cleanup removes managed entities so deleting an evaluation does not leave stale references that fail Hibernate 6's flush checks; the existing integration test now verifies this explicitly. Existing save/update cascade behavior is retained.

Spring MVC now uses AntPathMatcher for Sakai's named-servlet dispatch, matching master tools. The browser suite enters Evaluation System from the Administration Workspace and creates and publishes an evaluation through the portal, including the visible CKEditor. A fresh CI instance gets the tool installed in !admin through Sakai's fixture API. Browser checks target the active tool frame, supporting both the default iframe portal and inline rendering.

Direct admin endpoints already checked permissions, but uncaught denials returned 500 with exception details. Permission denials now return an empty 403. The access audit also reproduced anonymous access to a private template editor. Service-level visibility checks now guard private template, item, scale, and template-item authoring reads, including previews and removal confirmation pages. Public authoring visibility and authorized anonymous evaluation delivery are retained.

The Tomcat smoke test uses JDK 21 and Tomcat 10.1.61, restores Maven prerequisite checks, matches Sakai's localhost URL for browser sessions, and retains Tomcat logs with test artifacts.

EVALSYS artifact versions now target 27-SNAPSHOT. Boxed primitive constructors use valueOf to pass the Checkstyle rules inherited from current Sakai master. The README documents master for Sakai 27, the maintained Thymeleaf 25.x branch for Sakai 25, and the archived 25.x-rsf branch. It also includes instructions for realigning existing Sakai 25 checkouts after the branch replacement.

CI follows Sakai master's cache layout and toolchain: Maven 3.9.16, a workspace-local repository, explicit restore/save steps, and master pushes that warm the cache for future PRs. Saving also runs after failed builds, so retries retain downloaded dependencies; failed-download markers are removed before saving. The duplicate setup-java Maven cache is removed. The Sakai Maven repository is responding again, and all temporary binary dependency seeds have been removed. Portal fixture setup authenticates through an independent API request context, as in master's helper, so an already authenticated admin browser does not enter the session-creation API's impersonation branch.

Validation:

  • GitHub Actions Sakai Tomcat Smoke Test: passed on a48d3221, including the Sakai master and EVALSYS builds, Tomcat startup, and all 4 browser tests against the default iframe portal. The browser tests cover portal entry/admin navigation, evaluation creation and publishing, anonymous/student administration denial, and private template/question visibility.
  • Local Java 21 mvn --no-snapshot-updates clean install: passed. Implementation suite: 311 tests, 21 skipped; tool suite: 11 tests. No failures or errors.
  • mvn license:check: passed across all modules from a standalone checkout (the license plugin does not support Git worktrees).
  • git diff --check: passed against master.

@ottenhoff
ottenhoff force-pushed the master-jakarta-spring6-hibernate6 branch from 91163f0 to 23689f1 Compare November 6, 2026 14:34
@danielmerino

Copy link
Copy Markdown
Contributor

I merged current master into this branch to resolve the conflicts with EVALSYS-1622…1626 (#210–#213), which were merged after this PR was opened.

The only conflicts were in ReportGroupsController, ReportViewController and TakeEvalController: I kept the explicit @RequestParam names from this PR and added the new external parameter (also with an explicit name) and RedirectAttributes.

Tested on Sakai master (Java 21, Tomcat 10.1.61, MariaDB) from My Workspace: scales, items, templates, creating and publishing an evaluation, student save/submit, anonymous re-submit, reports and exports including the per-group ZIP, the results email link, deleting an evaluation with responses, copying templates, and denial of template editing to students. No errors in the logs.

Note for fresh installs: with auto.ddl=false the EVAL tables are not created and the preload (config, scales, email templates) does not run. This is not related to this PR, but it is worth knowing when testing.

@ottenhoff

Copy link
Copy Markdown
Contributor Author

we can wait to merge this in .... if you still want to do work on EVALSYS targeted for Sakai 25, I'm fine with waiting

@danielmerino

Copy link
Copy Markdown
Contributor

Could we have a 25.x branch? I don't mind doing backports of any work until we move to 27, hopefully next summer.

I don't know if our users will ask me for more features and it's a pity to have the 27 work waiting just in case.

@ottenhoff

Copy link
Copy Markdown
Contributor Author

There is a 25.x branch and a 25.x-thmyeleaf branch

@danielmerino

Copy link
Copy Markdown
Contributor

There is a 25.x branch and a 25.x-thmyeleaf branch

At this point I think the 25.x branch is no longer useful, and anyone installing it will be using the wrong (RSF) version without noticing. 25.x-thymeleaf works, but it is 43 commits behind master and misses the latest fixes. And we can't merge the Jakarta changes (#209) into master without breaking the 25 backport.

If you agree, I'd propose:

Fixes for 25 would then be backported from master to 25.x. What do you think, @ottenhoff ?

@ottenhoff

Copy link
Copy Markdown
Contributor Author

Great plan! I agree

@ottenhoff
ottenhoff merged commit c06131b into sakaicontrib:master Nov 19, 2026
1 check passed
@ottenhoff

Copy link
Copy Markdown
Contributor Author

Yes, I agree completely. This list of tasks should be done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants