-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[google-cloud-datacatalog]: DataCatalogClient.create throws IllegalAccessError - LazyStringArrayList is in unnamed module of loader 'app' #9625
Comments
Think I discovered the root cause of the issue. I am running my jar on Dataproc Serverless (version 1.0.29). The runtime classpath has a dependency on '/usr/lib/spark/jars/protobuf-java-3.19.6.jar' However, the 1.26.0 version of Datacatalog api relies on 'protobuf-java-3.21.12.jar'. This runtime conflict is resulting in this error (similar to quarkusio/quarkus#31240). Is there a way (in maven) to use the Datacatalog dependency instead of the runtime one? I attempted creating a shaded uber jar as suggested here (https://cloud.google.com/dataproc/docs/guides/manage-spark-dependencies#creating_a_shaded_uber_jar_with_maven) but that did not work. Wasn't able to create an empty github project yet. Let me know if you have any suggestions meanwhile. |
Thank you for great finding!
Shaded Uber JAR is a solution to address such problems. Would you share the stacktrace and pom.xml you used? The stacktrace tells which class is still referencing |
Thanks for the encouragement @suztomo. I was able to solve this! I cannot share the repo but this is the shade related change I needed -
|
Thank you for sharing your solution. |
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please include as much information as possible:
Environment details
Steps to reproduce
Code example
Stack trace
External references such as API reference guides
Any additional information below
Following these steps guarantees the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: