Cannot compile plugin with web assets against Openfire 4.8 following Jetty upgrade

Description

This affects the main branch of 4.8.0, and doesn’t apply to any released version of Openfire.

 

Today, we merged https://igniterealtime.atlassian.net/browse/OF-2600

Attempting to compile https://github.com/Fishbowler/openfire-s2stest-plugin now fails. Build snipped below.

I suspect this is caused by https://github.com/igniterealtime/Openfire/commit/50aeb542aa9c35398944219ec7e851bc3e1fdbd3 and that there might be a change required either to this, to the plugins project, or elsewhere to accomodate plugins with web elements.

 

[INFO] --- jetty-jspc:10.0.16:jspc (jspc) @ s2sconformancetest --- [INFO] Compiling tests.jsp from includes=**\/*.jsp, **\/*.jspx excludes=**\/.svn\/** [INFO] At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [WARNING] Compilation error java.util.concurrent.ExecutionException: org.apache.jasper.JasperException: Unable to find taglib [admin] for URI: [admin] at java.util.concurrent.FutureTask.report (FutureTask.java:122) at java.util.concurrent.FutureTask.get (FutureTask.java:191) at org.apache.jasper.JspC.execute (JspC.java:1545) at org.eclipse.jetty.jspc.plugin.JspcMojo.compile (JspcMojo.java:362) at org.eclipse.jetty.jspc.plugin.JspcMojo.execute (JspcMojo.java:286) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:910) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) at org.codehaus.classworlds.Launcher.main (Launcher.java:47) Caused by: org.apache.jasper.JasperException: Unable to find taglib [admin] for URI: [admin] at org.apache.jasper.compiler.DefaultErrorHandler.jspError (DefaultErrorHandler.java:54) at org.apache.jasper.compiler.ErrorDispatcher.dispatch (ErrorDispatcher.java:294) at org.apache.jasper.compiler.ErrorDispatcher.jspError (ErrorDispatcher.java:81) at org.apache.jasper.compiler.TagLibraryInfoImpl.<init> (TagLibraryInfoImpl.java:176) at org.apache.jasper.compiler.Parser.parseTaglibDirective (Parser.java:435) at org.apache.jasper.compiler.Parser.parseDirective (Parser.java:493) at org.apache.jasper.compiler.Parser.parseElements (Parser.java:1450) at org.apache.jasper.compiler.Parser.parse (Parser.java:144) at org.apache.jasper.compiler.ParserController.doParse (ParserController.java:244) at org.apache.jasper.compiler.ParserController.parse (ParserController.java:105) at org.apache.jasper.compiler.Compiler.generateJava (Compiler.java:206) at org.apache.jasper.compiler.Compiler.compile (Compiler.java:391) at org.apache.jasper.JspC.processFile (JspC.java:1378) at org.apache.jasper.JspC$ProcessFile.call (JspC.java:1906) at org.apache.jasper.JspC$ProcessFile.call (JspC.java:1897) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628) at java.lang.Thread.run (Thread.java:829)

Environment

None

Activity

Show:

Guus der Kinderen November 11, 2023 at 6:12 PM

I suspect that the source of this issue is described here: https://github.com/jetty/jetty.project/issues/8317#issuecomment-1198965017

As I understand it, the third-party library that Openfire uses for JSP compilation now is more spec-compliant as to where to obtain taglibs. When part of a webapp, they’re expected to live in a different place than when exposed as dependency (in a JAR). Openfire’s xmppserver module does both, and thus has a conflict.

I have experimented with moving the taglibs out of xmppserver, and place them in a new, dedicated module, to be consumed by both plugins and xmppserver. As some of the taglib implementations depend on Openfire’s API, that introduced a cyclic dependency. I’m now experimenting with exporting a new assembly from xmppserver, that is a generic jar (to be consumed by plugins).

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Affects versions

Priority

Created September 7, 2023 at 9:30 PM
Updated November 13, 2023 at 9:02 PM
Resolved November 13, 2023 at 9:02 PM