Skip to content

Commit

Permalink
OF-2945: Prevent stack traces when pre-compiling JSP pages
Browse files Browse the repository at this point in the history
After upgrading to Jetty 12, we also updated the Jetty plugin that performs precompilation of the JPS pages that make up the admin console. We are now using jetty-ee8-jspc-maven

Since this update, the build process is spewing out rather long stack traces, related to missing JAR files. The stack traces can be seen in https://igniterealtime.atlassian.net/browse/OF-2945

We have not noticed any failing functional behavior because of this. Nonetheless, the stack traces are annoying, as they suggest that something is wrong.

The missing JAR files seem to relate to the Xalan project, which is not a dependency of Openfire. It is, however, a dependency of Jetty's JSPC plugin.

On a hunch, I've excluded that dependency from the plugin during our build. That makes the stack trace go away. JSP compilation appears to work just fine with this change.

Jetty devs have raised the following ticket for this issue: jetty/jetty.project#12674 It is likely that the work-around introduced by this commit is no longer needed after Openfire upgrades to Jety 12.0.17 or later.
  • Loading branch information
guusdk committed Jan 7, 2025
1 parent 665b4e1 commit 3b36727
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,19 @@
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-glassfish-jstl</artifactId>
<version>${jetty.version}</version>
<exclusions>
<exclusion> <!-- The exclusion of Xalan is no longer needed when Jetty bug https://github.com/jetty/jetty.project/issues/12674 is fixed. The fix is expected to be part of Jetty release 12.0.17. -->
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>

<plugin>
Expand Down
13 changes: 13 additions & 0 deletions xmppserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,19 @@
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-glassfish-jstl</artifactId>
<version>${jetty.version}</version>
<exclusions>
<exclusion> <!-- The exclusion of Xalan is no longer needed when Jetty bug https://github.com/jetty/jetty.project/issues/12674 is fixed. The fix is expected to be part of Jetty release 12.0.17. -->
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>

<plugin>
Expand Down

0 comments on commit 3b36727

Please sign in to comment.