apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.08k stars 336 forks source link

[Bug report] NoClassDefFoundError when using flink sql to alter a table #5534

Open coolderli opened 4 days ago

coolderli commented 4 days ago

Version

main branch

Describe what's wrong

when alter a table, there is an exception: java.lang.NoClassDefFoundError: org/apache/gravitino/shaded/org/apache/commons/compress/utils/Lists

Error message and/or stacktrace

java.lang.NoClassDefFoundError: org/apache/gravitino/shaded/org/apache/commons/compress/utils/Lists

How to reproduce

use flink sql to alter a table

Additional context

replace import org.apache.commons.compress.utils.Lists; to import com.datastrato.gravitino.shaded.com.google.common.collect.Lists;

TungYuChiang commented 3 days ago

Thank you for creating the issue! I'll replace the import as suggested to resolve this.

TungYuChiang commented 3 days ago

Assuming I have completed it, how can I make my gravitino-playground ready for testing?

coolderli commented 2 days ago

Assuming I have completed it, how can I make my gravitino-playground ready for testing?

@TungYuChiang You can build the flink-runtime module and use the flink-runtime jar you packaged.

coolderli commented 2 days ago

@TungYuChiang The build command is like ./gradlew clean :flink-connector:flink-runtime:build. And you can skip the tests following this doc:https://github.com/apache/gravitino/blob/main/docs/how-to-test.md#skip-tests

TungYuChiang commented 2 days ago

@coolderli After replacing import org.apache.commons.compress.utils.Lists; with import com.datastrato.gravitino.shaded.com.google.common.collect.Lists; as you suggested, I encountered a build error. Should I install any dependencies beforehand?

error: package com.datastrato.gravitino.shaded.com.google.common.collect does not exist