Repository navigation
Test for JSP recompilation - #8236
Merged
Merged
Conversation
3 tasks done
labkey-jeckels
approved these changes
Oct 27, 2026
labkey-adam
added a commit
to LabKey/server
that referenced
this pull request
Oct 27, 2026
## Rationale
After updating to Tomcat 11.0.27, attempts to recompile JSP files at
runtime resulted in stack traces like:
```
java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/LogOutputStream
at org.labkey.api.jsp.RecompilingJspClassLoader.getCompiledClassFile(RecompilingJspClassLoader.java:126)
at org.labkey.api.jsp.RecompilingJspClassLoader.loadClass(RecompilingJspClassLoader.java:81)
at org.labkey.api.jsp.JspLoader.createPage(JspLoader.java:76)
at org.labkey.api.view.JspView.<init>(JspView.java:94)
at org.labkey.api.view.JspView.<init>(JspView.java:84)
at org.labkey.oauth2.ConnectedAppsViewProvider.getViews(ConnectedAppsViewProvider.java:29)
```
## Related Pull Requests
- #1538
- LabKey/platform#8236
## Changes
- Tomcat 11.0.27 added a reference to
`org.apache.tools.ant.taskdefs.LogOutputStream` in JspC, its JSP
compiler. Instead of bundling a full version of ant.jar in our product,
in the past, we've been able to supply just a few stub classes, enough
to keep JspC happy. That continues to be the case here: a simple stub
version of LogOutputStream is sufficient.
- While investigating, I realized that no product dependencies require
ant.jar, so I removed the unnecessary property and `force`. A comment
claimed that `eigenbase-xom` pulled it in, but it's optional in the
version we currently use.
- Refresh `FileUtils` from latest Ant sources. This is the only stub
that has any actual code in it. Code was at least 10 years old, so this
keeps are code aligned with the official sources and modernizes it with
generics, `StringBuilder` instead of `StringBuffer`, and a few cosmetic
changes.
## Tasks
- [x] Claude Code Review
- [x] Test Automation - added a [unit test for JSP
recompilation](LabKey/platform#8236)
- [x] Manual Testing @labkey-tchad
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.
Rationale
We had no coverage for runtime JSP recompilation. This meant a break in that capability went unnoticed initially.
Related Pull Requests
Changes