Exclude jsr305 from SQL bundle to fix jar hell with arrow-flight-rpc#5409
Merged
rishabh6788 merged 1 commit intoopensearch-project:feature/mustang-ppl-integrationfrom May 6, 2026
Conversation
The arrow-flight-rpc plugin (a transitive parent of analytics-engine via extendedPlugins) bundles jsr305-3.0.2.jar, and the SQL plugin pulls in the same artifact via Calcite's transitive findbugs:jsr305 dependency. With both plugins shipping the same jar, OpenSearch's PluginsService.checkBundleJarHell fails at install time with: IllegalStateException: jar hell! class: javax.annotation.CheckForNull jar1: .../installing-.../jsr305-3.0.2.jar jar2: .../plugins/arrow-flight-rpc/jsr305-3.0.2.jar Same pattern as opensearch-project#5400 — exclude the jar from the SQL bundle and rely on the copy already provided by arrow-flight-rpc through the shared classloader. Signed-off-by: Kai Huang <ahkcs@amazon.com>
Contributor
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit e92c6fc.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
rishabh6788
approved these changes
May 6, 2026
b3ef50d
into
opensearch-project:feature/mustang-ppl-integration
26 of 37 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The SQL plugin currently fails to install on top of
analytics-engine+arrow-flight-rpcwith:arrow-flight-rpc(a transitive parent ofanalytics-engineviaextendedPlugins) bundlesjsr305-3.0.2.jar, and the SQL plugin currently bundles the same artifact. With both plugins shipping the same jar,PluginsService.checkBundleJarHellrejects the SQL install.This PR excludes
jsr305-*.jarfrom the SQL bundle so the arrow-flight-rpc copy (already on the shared classloader) is the only one on disk. Same pattern as #5400.Stop-gap until #5403 lands
This is a band-aid. The real fix is #5403 (open against the same base branch), which makes
analytics-enginean optionalextendedPluginsdependency via the supported;optional=truesyntax:PluginInfo.java:190-191— parsesoptional=trueoff theextendedPluginsentryPluginsService.java:794-796—checkBundleJarHellskips the cross-check entirely when the dependency is optionalOnce #5403 merges, the entire
bundlePlugin { exclude '<artifact>-*.jar' }block atplugin/build.gradle:67-107becomes obsolete and this whole class of breakage stops happening on every analytics-engine zip bump. So if #5403 lands first, please close this PR rather than merging it; if this lands first, it can be reverted as part of #5403's diff.Test plan
./gradlew :plugin:bundlePluginand confirm the resulting zip no longer containsjsr305-3.0.2.jararrow-flight-rpc+analytics-engine+ this SQL build on a local OpenSearch 3.7 node and confirmbin/opensearch-plugin installsucceedsjavax.annotation.*classes still resolve at runtime via the shared classloaderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.