Repository navigation
Require Java 21 and upgrade to Lucene 10.6.0 and Derby 10.17.1.0 - #261
Merged
Merged
Conversation
Roller 7 now requires Java 21. The compiler release in the root and Playwright poms, the CI matrix (JDK 21 and 25, dropping 17), the other CI jobs, CodeQL, the Docker base images, the README, the install guide and CHANGES.md all move from 17 to 21. There was no code that existed only to support older Java, so none is removed. Java 21 allows two upgrades that need it: - Lucene 9.12.3 to 10.6.0 for every Lucene artifact. Lucene 10 removed IndexSearcher.doc(int), so search results read stored fields through IndexSearcher.storedFields(), fetched on the request thread that reads them. TotalHits is now a record, so the count comes from value() and relation(). The tests use MatchAllDocsQuery.INSTANCE in place of its deprecated constructor. The exact total hit count and the search.results.max cap behave as before, and their tests pass unchanged apart from the accessor calls. - Derby 10.16.1.1 to 10.17.1.0, which fixes CVE-2022-46337. Its artifacts and their dependencies are the same as in 10.16, so the test, jetty:run and db-utils setup needs no change. Derby is not in the WAR. Lucene 10 reads Roller 6.1's Lucene 9 index through lucene-backward-codecs, but not Roller 6.0's Lucene 8 index. Roller already deleted an index it could not open and rebuilt it in the background, but until the rebuild wrote one there was no index, so a search in that window failed. Roller now creates an empty index first, as it does for a missing index or one with removed fields, and logs a one-line warning without a stack trace when the format is too old or too new. IndexUpgradeTest starts Roller's index manager on a Lucene 8.3.0 index with Roller 6.0's fields and on a Lucene 9.12.3 index with Roller 6.1.7's fields. The first is replaced and rebuilt, and the second is kept, searched and written to. The zipped fixtures are excluded from test resource filtering. CHANGES.md and the install guide's upgrade section describe what happens to an existing index.
The prerequisites still named Java EE 6, Servlet 2.4, Tomcat 8, Jetty 9, JPA 2.0 and the roller-release-6.0.0-standard archives. Roller 7 needs a Servlet 6.1 container; CI tests it on Jetty 12 (EE 11) and the Docker image on Tomcat 11. The binary archives are apache-roller-<version>-binary.
This was referenced Nov 14, 2026
# Conflicts: # pom.xml
Lucene 9 can't read an index Lucene 10 has written. Roller 6.1.7 treats that as an unreadable index: it deletes it and rebuilds in the background, but creates no empty index first, so searches fail until the rebuild finishes.
snoopdave
approved these changes
Nov 15, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
PR-Review: no issues. CI is green, and the new install-guide lines cover going back to 6.1.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roller 7.0 now requires Java 21. Lucene 10 and Derby 10.17 are compiled for it, and Derby 10.17.1.0 fixes CVE-2022-46337. Derby is only used by tests,
jetty:runanddb-utils.Java 21:
it-playwright.maven:3.9.16-eclipse-temurin-21andtomcat:11.0.29-jdk21-temurin, pinned instead of the old floating tags.Lucene 9.12.3 → 10.6.0:
IndexSearcher.doc()is gone. Results now read stored fields throughsearcher.storedFields(), fetched on the thread that reads them.TotalHits.valuebecamevalue(). The exact total and thesearch.results.maxcap behave as before;SearchResultLimitTeststill passes.IndexFormatTooOldException. Master already caught that and scheduled a rebuild, but left no index behind, so searches failed until the rebuild finished. Now an empty index is created right away, and the log gets one line instead of a stack trace.IndexUpgradeTestcovers this with real fixtures written by Lucene 8.3.0 and 9.12.3 using Roller 6.0's and 6.1.7's fields. CHANGES.md and the install guide say no operator action is needed.Derby 10.16.1.1 → 10.17.1.0 needed no setup changes. The dependencies and the classes Roller uses are in the same jars.
mvn clean installpasses on JDK 21 and JDK 25: 661 tests, 2 new.