Hi all,

We've found a side effect of change #68721 [1] in Tomcat 10.1.20 that we'd like to notify you about.

We're using Apache Freemarker for back-end templating, and its NodeModel class uses reflection to determine what classes to use for xpath, thereby catching IllegalAccessError, see [2].

Per change #68721 a IllegalAccessError is caught as LinkageError and turned into a Throwable, NoClassDefFoundError in our case, see [3], and then falls through that block in NodeModel and errors out.

So this change in Tomcat alters the behaviour in Freemarker, which I assume was unexpected. We can (and must) work around it, preventing the IllegalAccessError, but still, maybe you'd like to improve again or have other thoughts?

Regards,
Jeroen Hoffman

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=68721
[2] https://github.com/apache/freemarker/blob/2.3/freemarker-core/src/main/java/freemarker/ext/dom/NodeModel.java#L645 [3] https://github.com/apache/tomcat/blob/10.1.x/java/org/apache/catalina/loader/WebappClassLoaderBase.java#L2307


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to