Skip to content
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

fix jarhell error from SQL build #137

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

ylwu-amzn
Copy link
Collaborator

Signed-off-by: Yaliang Wu ylwu@amazon.com

Description

From @jackiehanyang , SQL build will throw JarHell error

> Task :doctest:runRestTestCluster FAILED
Exec output and error:
| Output for ./bin/opensearch-plugin:warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
| -> Installing file:/home/runner/work/sql/sql/plugin/build/distributions/opensearch-sql-1.3.0.0-SNAPSHOT.zip
| -> Downloading file:/home/runner/work/sql/sql/plugin/build/distributions/opensearch-sql-1.3.0.0-SNAPSHOT.zip
| -> Failed installing file:/home/runner/work/sql/sql/plugin/build/distributions/opensearch-sql-1.3.0.0-SNAPSHOT.zip
| -> Rolling back file:/home/runner/work/sql/sql/plugin/build/distributions/opensearch-sql-1.3.0.0-SNAPSHOT.zip
| -> Rolled back file:/home/runner/work/sql/sql/plugin/build/distributions/opensearch-sql-1.3.0.0-SNAPSHOT.zip
| Exception in thread "main" java.lang.IllegalStateException: failed to load plugin opensearch-sql due to jar hell
|     at org.opensearch.plugins.PluginsService.checkBundleJarHell(PluginsService.java:678)
|     at org.opensearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:845)
|     at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:813)
|     at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:858)
|     at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:263)
|     at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
|     at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100)
|     at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
|     at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
|     at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
|     at org.opensearch.cli.Command.main(Command.java:101)
|     at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
| Caused by: java.lang.IllegalStateException: jar hell!
| class: org.opensearch.client.Cancellable$1
| jar1: /home/runner/work/sql/sql/doctest/build/testclusters/docTestCluster-0/distro/1.3.0-INTEG_TEST/plugins/.installing-7463547768418079680/opensearch-rest-client-1.3.0-SNAPSHOT.jar
| jar2: /home/runner/work/sql/sql/doctest/build/testclusters/docTestCluster-0/distro/1.3.0-INTEG_TEST/plugins/.installing-7463547768418079680/opensearch-ml-client-1.3.0.0.jar
|     at org.opensearch.bootstrap.JarHell.checkClass(JarHell.java:317)
|     at org.opensearch.bootstrap.JarHell.checkJarHell(JarHell.java:212)
|     at org.opensearch.plugins.PluginsService.checkBundleJarHell(PluginsService.java:664)
|     ... 11 more

Check latest changes of MLCommons, see we add this line compile "org.opensearch.client:opensearch-rest-client:${opensearch_version}" in PR #117. We need to change to compileOnly "org.opensearch.client:opensearch-rest-client:${opensearch_version}"

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By 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.

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
@ylwu-amzn ylwu-amzn requested a review from a team February 8, 2022 02:41
@ylwu-amzn ylwu-amzn merged commit ea225e4 into opensearch-project:main Feb 8, 2022
@ylwu-amzn ylwu-amzn added the bug Something isn't working label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants