I’m migrating from Hostek to InMotion.
Lucee is running fine on InMotion except for jsoup.
The jsoup object instantiates with no problems, but jsoup.parse(html) triggers this error (see my source code below):
(class: org/jsoup/parser/HtmlTreeBuilder, method: insert signature: (Lorg/jsoup/nodes/Element;)V) Incompatible argument to function
jsoup has been fine on my Hostek server for years and I’m trying for now to stick with the same versions of everything on my new InMotion server so I’m using jsoup v1.8.3 but I’ve also tried the current release v1.17.2 which triggers different error:
class org.jsoup.parser.Token$StartTag cannot access its abstract superclass org.jsoup.parser.Token$Tag (org.jsoup.parser.Token$StartTag is in unnamed module of loader lucee.commons.io.res.util.ResourceClassLoader @78477f36; org.jsoup.parser.Token$Tag is in unnamed module of loader java.net.URLClassLoader @55d56113)
The html variable in my test script isn’t the issue because the same errors happen even if I simply call jsoup.parse('foo')
.
Any ideas?
Request.jsoup_path = "/opt/lucee/lib/jsoup-1.8.3.jar";
// Request.jsoup_path = "/opt/lucee/lib/jsoup-1.17.2.jar";
dump(label="Request.jsoup_path", var=Request.jsoup_path);
jsoup = CreateObject("java", "org.jsoup.Jsoup", Request.jsoup_path);
dump(jsoup);
html = '<html><body><h1>Hello, World!</h1></body></html>';
htmldoc = jsoup.parse(html);
dump(htmldoc);
I used the Lucee installer for Lucee/Tomcat/Java.
OS: AlmaLinux 8.9
Java Version: 11.0.20 (Eclipse Adoptium) 64bit
Tomcat Version: 9.0.78
Lucee Version: 5.3.9.173