Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 12: NoSuchMethodError JspRuntimeLibrary.releaseTag(Tag, boolean)

That's fantastic, thanks!

 - Guus

On Wed, May 28, 2025 at 5:14 PM Joakim Erdfelt <joakim.erdfelt@xxxxxxxxx> wrote:
Let's take a closer look at the problem class.

org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(javax.servlet.jsp.tagext.Tag, org.apache.tomcat.InstanceManager, boolean)

What exists in the jars for this class?

[jetty-home-12.0.21]$ javap -cp lib/ee8-apache-jsp/org.mortbay.jasper.apache-jsp-9.0.96.jar org.apache.jasper.runtime.JspRuntimeLibrary | grep release
  public static void releaseTag(javax.servlet.jsp.tagext.Tag, org.apache.tomcat.InstanceManager);

Ah, there's no method releaseTag with a final boolean parameter.

When did that get removed from Apache JSP?

Looks like that specific method was removed Sep 24, 2024

A change that is present in Apache Jasper 9.0.96

Looks like your precompiled JSP is now incompatible with the Apache Jasper 9.0.96 library now.

But there's been several updates to Apache Jasper since, so let's try a newer version ...

# Create a new empty jetty.base directory to test with
[bases]$ mkdir jsp-12-ee8
[bases]$ cd jsp-12-ee8

# Initialize directory with ee8 jsp modules
[jsp-12-ee8]$ java -jar ../../jetty-home-12.0.21/start.jar --add-modules=http,ee8-deploy,ee8-webapp,ee8-jsp
INFO  : mkdir ${jetty.base}/start.d
...(snip)...
INFO  : Base directory was modified

# Lets configure it to use release 9.0.102 instead.
[joakim@hyperion jsp-12-ee8]$ gvim start.d/ee8-jsp.ini
[joakim@hyperion jsp-12-ee8]$ grep impl start.d/ee8-jsp.ini
ee8.jsp.impl.version=9.0.102

# Download the release 9.0.102 into place.
[joakim@hyperion jsp-12-ee8]$ mkdir -p lib/ee8-apache-jsp
[joakim@hyperion jsp-12-ee8]$ curl -o lib/ee8-apache-jsp/org.mortbay.jasper.apache-jsp-9.0.102.jar https://repo1.maven.org/maven2/org/mortbay/jasper/apache-jsp/9.0.102/apache-jsp-9.0.102.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1041k  100 1041k    0     0  3982k      0 --:--:-- --:--:-- --:--:-- 3990k
[joakim@hyperion jsp-12-ee8]$ curl -o lib/ee8-apache-jsp/org.mortbay.jasper.apache-el-9.0.102.jar https://repo1.maven.org/maven2/org/mortbay/jasper/apache-el/9.0.102/apache-el-9.0.102.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  254k  100  254k    0     0  1393k      0 --:--:-- --:--:-- --:--:-- 1400k

# Test if the configuration is using these new 9.0.102 releases.
[joakim@hyperion jsp-12-ee8]$ java -jar ../../jetty-home-12.0.21/start.jar --list-config | grep jasper
14:                  9.0.102 | ${jetty.base}/lib/ee8-apache-jsp/org.mortbay.jasper.apache-el-9.0.102.jar | http://www.apache.org/licenses/LICENSE-2.0
15:                  9.0.102 | ${jetty.base}/lib/ee8-apache-jsp/org.mortbay.jasper.apache-jsp-9.0.102.jar | http://www.apache.org/licenses/LICENSE-2.0

# Does this new 9.0.102 release have the method you need?
$ javap -cp lib/ee8-apache-jsp/org.mortbay.jasper.apache-jsp-9.0.102.jar org.apache.jasper.runtime.JspRuntimeLibrary | grep release
  public static void releaseTag(javax.servlet.jsp.tagext.Tag, org.apache.tomcat.InstanceManager, boolean);
  public static void releaseTag(javax.servlet.jsp.tagext.Tag, org.apache.tomcat.InstanceManager);

Yes! that method was restored.
This should help you get going again.

Meanwhile, I've got a PR started for upgrading that dependency in Jetty.

- Joakim


On Wed, May 28, 2025 at 9:47 AM Guus der Kinderen via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
Indeed, it's ee8. What could be the cause of this?

 - Guus

On Wed, May 21, 2025 at 6:34 PM Joakim Erdfelt via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
Since the output mentions `javax.servlet.jsp.tagext` then this must be ee8.

- Joakim

On Wed, May 21, 2025 at 8:59 AM Jan Bartel via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
Which ee environment, 8, 9 or 10?

Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


On Wed, 21 May 2025, 21:12 Guus der Kinderen via jetty-users, <jetty-users@xxxxxxxxxxx> wrote:
Hi all!

I'm seeing this pop up on JSP pages that are compiled against an earlier version, after upgrading to Jetty 12.0.21. Did something change (maybe quite recently) that might have caused this? Is there a way to prevent this issue, without recompilation (which would involve re-releasing a large number of plugins for us).

java.lang.NoSuchMethodError: 'void org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(javax.servlet.jsp.tagext.Tag, org.apache.tomcat.InstanceManager, boolean)'

Kind regards,

  Guus
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top