Skip to content

Fix JSP recompilation on Tomcat 11.0.27 - #1540

Merged
labkey-adam merged 4 commits into
developfrom
fb_fix_jsp_recompilation
Oct 27, 2026
Merged

labkey-adam merged 4 commits into
developfrom
fb_fix_jsp_recompilation

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

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

@labkey-adam
labkey-adam requested a review from a team October 26, 2026 20:58
labkey-adam added a commit to LabKey/platform that referenced this pull request Oct 27, 2026
## Rationale
We had no coverage for runtime JSP recompilation. This meant a break in
that capability went unnoticed initially.

## Related Pull Requests
- LabKey/server#1540

## Changes
- Add a unit test that ensures JspC loads and can compile a simple JSP
file
@labkey-adam labkey-adam self-assigned this Oct 27, 2026
@labkey-adam labkey-adam added this to the 26.11 milestone Oct 27, 2026

@labkey-tchad labkey-tchad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual testing looks good

@labkey-adam
labkey-adam merged commit 92ff8e8 into develop Oct 27, 2026
7 checks passed
@labkey-adam
labkey-adam deleted the fb_fix_jsp_recompilation branch October 27, 2026 22:12
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.

3 participants