-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OF-2945: Prevent stack traces when pre-compiling JSP pages #2646
base: main
Are you sure you want to change the base?
Conversation
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.
I must admit that I'm not sure what the cause of this problem, or the impact of my work-around is. @joakime, if you have a minute to have a look: I'm wondering if we're not using this plugin properly, or if it perhaps has a bit of a bug. |
First, the fact that these files do not exist is problematic for Maven and Glassfish JSTL. That being said, where is the xalan coming from?
Looks like the following entry is the culprit ...
Can you make a <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-glassfish-jstl</artifactId>
<version>12.0.16</version>
<exclusions>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement> |
Thanks for looking into this, @joakime.
I can probably do that on my local computer, but this appears to be an issue for every computer that runs this build (and doesn't happen to have the files locally yet). Isn't this what Maven is supposed to do: download the files when/if they're needed? I guess I could add xalan as a dependency to our project to force Maven to download it, but as we don't use it, I'd prefer not to.
Instead of going through |
I wouldn't add xalan.
Nah, that works too. I've gone ahead and added a new issue (and PR) to remove xalan from the ee8 tree (it's already excluded in the ee9/ee10/ee11 trees) |
Do you happen to have a security plugin that rejects/bans xalan use in your maven project? |
I don't believe we have such configuration in our project. We don't have the text To check if this problem is related to Openfire, I created a minimal project that does JSPC compliation of a hello-world JSP. It shows the exact same problem: https://github.com/guusdk/jspctest I don't think this problem is specific to Openfire. I think it's a problem for everyone that uses this plugin, that does not happen to have those dependencies already in their local repository. Can you remove those three files in your local repository, and try on your end? |
I don't think this is an issue with my computer. I've added a GitHub workflow that causes that jspctest project to build on GitHub hardware: it show's the exact same stack traces during build: https://github.com/guusdk/jspctest/actions/runs/12639158708/job/35216882686 |
Oh, I only now see your larger comment. From that, I take it that excluding the dependency (as done in this PR) is safe. For later versions of Jetty's JSPC plugin, it won't be necessary anymore. |
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.