Skip to content

Conversation

@bric3
Copy link
Contributor

@bric3 bric3 commented Jan 13, 2026

What Does This Do

Use only a single servlet-api to avoid conflict.

Motivation

Jetty comes with a signed version of javax-servlet, this conflict with the standard servlet api which is not signed, and make the test throw SecurityException when the classes are loaded.

The mock agent server in the test JVM uses repackaged Jetty which requires Servlet 3.1, so we exclude the signed Servlet 3.0 and use the unsigned Servlet 3.1 everywhere (including in the shadowJar for the smoke test app running in a separate process).

Additional Notes

Related to #10365, but different due to jetty having a signed variant.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Jetty comes with a signed version of javax-servlet, this conflict with the standard servlet api which is not signed, and make the test throw `SecurityException` when the classes are loaded.

The mock agent server in the test JVM uses repackaged Jetty which requires Servlet 3.1,
so we exclude the signed Servlet 3.0 and use the unsigned Servlet 3.1 everywhere
(including in the shadowJar for the smoke test app running in a separate process).
@bric3 bric3 requested a review from a team as a code owner January 13, 2026 15:11
@bric3 bric3 added type: bug Bug report and fix tag: no release notes Changes to exclude from release notes labels Jan 13, 2026
@PerfectSlayer PerfectSlayer added the inst: others All other instrumentations label Jan 13, 2026
// Servlet API conflict resolution:
// Two servlet JARs end up on the test classpath causing a SecurityException (signer mismatch):
// 1. org.eclipse.jetty.orbit:javax.servlet (Servlet 3.0, signed) - from Jetty 9.0.4
// 2. javax.servlet:javax.servlet-api (Servlet 3.1, unsigned) - from the testing module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really need to avoid leaking that out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, but this time the issue is a bit different, I tried to do without standard servlet api, but I couldn't make anything work using the jetty signed variant.

@amarziali amarziali merged commit 3052c95 into master Jan 13, 2026
114 of 421 checks passed
@amarziali amarziali deleted the bdu/fix-jersey2-smoke branch January 13, 2026 15:29
@github-actions github-actions bot added this to the 1.59.0 milestone Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations tag: no release notes Changes to exclude from release notes type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants