Skip to content

Require matching Jasper and EL versions in help webapp - #3100

Open
akurtakov wants to merge 1 commit into
eclipse-platform:masterfrom
akurtakov:help-jasper-el
Open

akurtakov wants to merge 1 commit into
eclipse-platform:masterfrom
akurtakov:help-jasper-el

Conversation

@akurtakov

Copy link
Copy Markdown
Member

While investigating eclipse-platform/eclipse.platform.swt#3951, I found that an install updated to the latest I-build fails to serve any help page:

java.lang.NoSuchMethodError: 'java.lang.String org.apache.el.util.JreCompat.strip(java.lang.String)'
    at org.apache.jasper.compiler.Node$PageDirective.validateImport(Node.java:747)

This only happens after an upgrade. A fresh I-build is fine. The updated install ends up with org.mortbay.jasper.mortbay-apache-jsp 9.0.124 next to the old org.mortbay.jasper.apache-el 9.0.102. The old EL bundle predates the rename to mortbay-apache-el, and p2 never replaces it. Jasper 9.0.124 calls JreCompat.strip(), which older EL versions don't have. Jasper and EL have to come from the same Tomcat release, but mortbay-apache-jsp imports org.apache.el.util with [9.0,10). The stale EL bundle still satisfies that range, so p2 keeps it, and Jasper gets wired to it.

org.eclipse.help.webapp is the bundle whose JSPs are compiled. It now imports org.apache.el and org.apache.jasper.servlet with a 9.0.124 lower bound. The old EL bundle no longer satisfies these imports, so p2 has to install a matching mortbay-apache-el during the update.

Jasper and its EL implementation have to come from the same Tomcat
release: Jasper 9.0.124 calls JreCompat.strip(), which older EL bundles
lack. Since mortbay-apache-jsp accepts any 9.x org.apache.el, a p2
update could upgrade Jasper while keeping an old EL bundle (e.g. the
renamed org.mortbay.jasper.apache-el 9.0.102), which breaks every JSP
page with NoSuchMethodError. Import both packages with a 9.0.124 lower
bound so p2 has to bring in a matching EL bundle.

Assisted-by: Anthropic Claude Code (claude-opus-5-5)
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.

1 participant