apache / apache/paimon

[Bug] Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.paimon.shade.com.github.luben.zstd.ZstdInputStreamNoFinalizer

Open
#4,531 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.

### Paimon version

0.9

### Compute Engine

Hive 3.1.3

### Minimal reproduce step

I encountered a problem when I read the Paimon table with Hive。${HIVE_HOME}/lib has zstd-jni-1.3.2-2.jar,Paimon depend zstd-jni-1.5.5-11.jar,I try to shade zstd in paimon-format.xml.
```

com.github.luben
org.apache.paimon.shade.com.github.luben

```
But the exception occurred
java.lang.NoClassDefFoundError: Could not initialize class org.apache.paimon.shade.com.github.luben.zstd.ZstdInputStreamNoFinalizer.

I made sure I added the jar to the classpath。Does zstd-jni not allow shade?

### What doesn't meet your expectations?

java.lang.NoClassDefFoundError: Could not initialize class org.apache.paimon.shade.com.github.luben.zstd.ZstdInputStreamNoFinalizer.

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with Paimon 0.9, Hive 3.1.3, and the two zstd-jni versions described in the issue. Start by inspecting paimon-format.xml and the Hive classpath, then verify that reading a Paimon table completes without the shaded ZstdInputStreamNoFinalizer initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.