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

Azure-core with mongodb on Quarkus can not be build in native #38186

Closed
3 tasks done
JiriOndrusek opened this issue Jan 2, 2024 · 1 comment · Fixed by #38187
Closed
3 tasks done

Azure-core with mongodb on Quarkus can not be build in native #38186

JiriOndrusek opened this issue Jan 2, 2024 · 1 comment · Fixed by #38187
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@JiriOndrusek
Copy link
Contributor

Describe the bug
Presence of --report-unsupported-elements-at-runtime and -H:+ReportUnsupportedElementsAtRuntime in native-image.properties causes native compilation failure when mongodb is present.

This is the same error which was fixed on aws in aws/aws-sdk-java-v2#2368

Exception or Stack Trace

Caused by: java.lang.ClassNotFoundException: jnr.unixsocket.UnixSocket
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 13 more

To Reproduce
Reproducer: https://github.com/JiriOndrusek/azure-mongodb-native-failure-reproducer
Execute ./mvnw package -Dnative to simulate the error.

(Project is created automatically by https://code.quarkus.io/?e=mongodb-client&e=org.apache.camel.quarkus%3Acamel-quarkus-azure-storage-queue without any change)

Reproducer contains com.azure:azure-core:jar:1.44.1, but the issue is present also on main branch, see https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/resources/META-INF/native-image/com.azure/azure-core/native-image.properties#L2-L4.

Expected behavior
There should be no error during the native build.

Setup (please complete the following information):
Should not matter.

  • OS: Linux
  • Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
  • Java version: Temurin-17.0.9+9 (build 17.0.9+9), GRAALVM 22.3.2 JDK 17.0.7+8-LTS-jvmci-22.3-b15
  • Frameworks: Quarkus

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@github-actions github-actions bot added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 2, 2024
@srnagar
Copy link
Member

srnagar commented Feb 1, 2024

Thank you @JiriOndrusek for reporting and creating the PR to fix the issue.

@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: Done
2 participants