diqiu50 opened a new issue, #14315:
URL: https://github.com/apache/gravitino/issues/14315
### Version
main branch
### Describe what's wrong
Since #12575, `GravitinoGlueCredentialsProvider` lives in `catalog-common`,
which is on the server classpath (`libs/`) without the AWS SDK. When a Glue
catalog with static AWS credentials initializes Iceberg-on-Glue, the server
classloader resolves the provider first and fails to link
`AwsCredentialsProvider`. `testConnection` and other catalog operations return
HTTP 500.
### Error message and/or stacktrace
```
java.lang.NoClassDefFoundError:
software/amazon/awssdk/auth/credentials/AwsCredentialsProvider
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
...
at
org.apache.gravitino.utils.IsolatedClassLoader$CustomURLClassLoader.loadClass(IsolatedClassLoader.java:210)
at
org.apache.gravitino.catalog.glue.GlueIcebergTableHelper.buildIcebergCatalogProperties(GlueIcebergTableHelper.java:178)
at
org.apache.gravitino.catalog.glue.GlueIcebergTableHelper.createGlueCatalog(GlueIcebergTableHelper.java:146)
at
org.apache.gravitino.catalog.glue.GlueCatalogOperations.initialize(GlueCatalogOperations.java:158)
Caused by: java.lang.ClassNotFoundException:
software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
```
### How to reproduce
1. Build the distribution from main and start the Gravitino server.
2. Create a Glue catalog with `aws-access-key-id` and
`aws-secret-access-key`.
3. Call `testConnection` or load the catalog.
### Additional context
Adding the glue prefix to `IsolatedClassLoader.isCatalogClass()` does not
help, because classes found on the server classpath are still resolved
parent-first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]