I am using Flink sql, when I am adding the jar files (iceberg-aws-bundle-1.4.1.jar, iceberg-flink-runtime-1.17-1.4.2.jar, hadoop-core-1.2.1.jar and hadoop-client-3.3.6.jar) and creating an Iceberg Catalog, I am getting the following error:-
Could not execute SQL statement. Reason: java.lang.ClassCastException: class org.apache.iceberg.aws.glue.GlueCatalog cannot be cast to class org.apache.iceberg.catalog.Catalog (org.apache.iceberg.aws.glue.GlueCatalog is in unnamed module of loader 'app'; org.apache.iceberg.catalog.Catalog is in unnamed module of loader org.apache.flink.util.ChildFirstClassLoader @6aa00511)
But when I am creating a catalog first and then add the jar files later,I am unable to reproduce this error and it works fine.
I have my flink installed in an ec2 instance and use flink 1.18.
I am curious as to why this is happening. Can anybody help?