I’m using createDynamicProxy to wrap javax.servlet.Filter & javax.servlet.FilterChain in order to run a custom request filtering pipeline.
var javaFilterChain = createDynamicProxy(this, ["javax.servlet.FilterChain"]);
This works in 5.3, but in 5.4, it fails with
NoSuchMethodException V74060b24f0ec0385d9f86f0aa69578ed4150.<init>(lucee.runtime.config.ConfigWeb, lucee.runtime.Component)
However, looking at the decompiled class file for V74060b24f0ec0385d9f86f0aa69578ed4150:
// Source code is decompiled from a .class file using FernFlower decompiler.
import javax.servlet.FilterChain;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import lucee.loader.engine.CFMLEngineFactory;
import lucee.runtime.Component;
import lucee.runtime.config.ConfigWeb;
import lucee.runtime.util.JavaProxyUtil;
public class V74060b24f0ec0385d9f86f0aa69578ed4150 implements FilterChain {
private Component cfc;
private ConfigWeb config;
public V74060b24f0ec0385d9f86f0aa69578ed4150(ConfigWeb config, Component cfc) {
this.config = config;
this.cfc = cfc;
}
public final void doFilter(ServletRequest var1, ServletResponse var2) {
((JavaProxyUtil)CFMLEngineFactory.getInstance().getJavaProxyUtil()).call(this.config, this.cfc, "doFilter", new Object[]{((JavaProxyUtil)CFMLEngineFactory.getInstance().getJavaProxyUtil()).toCFML(var1), ((JavaProxyUtil)CFMLEngineFactory.getInstance().getJavaProxyUtil()).toCFML(var2)});
}
}
Clearly in the bytecode the constructor exists - is this some classloader weirdness going on?
Don’t forget to tell us about your stack!
OS: Linux
Java Version: 11
Tomcat Version: 8 or 9
Lucee Version: 5.4.4
2 posts - 1 participant