Skip to content

Conversation

@tonivade
Copy link
Contributor

Hi!

I found an issue generating a native-image with graalvm. It seems for windows there's no native library included.

Error: Exception in thread "main" org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=Windows and os.arch=x86_64
	at org.xerial.snappy.SnappyLoader.findNativeLibrary(SnappyLoader.java:345)
	at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:179)
	at org.xerial.snappy.SnappyLoader.loadSnappyApi(SnappyLoader.java:157)
	at org.xerial.snappy.Snappy.init(Snappy.java:70)
	at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47)
	at org.apache.parquet.hadoop.codec.SnappyDecompressor.maxUncompressedLength(SnappyDecompressor.java:34)
	at org.apache.parquet.hadoop.codec.NonBlockedDecompressor.decompress(NonBlockedDecompressor.java:72)
	at org.apache.parquet.hadoop.codec.NonBlockedDecompressorStream.read(NonBlockedDecompressorStream.java:51)

I found that the resource-config.json has a incorrect pattern for windows dlls. The name is snappyjava not libsnappyjava. So, this is the fix.

I tried the fix in my local and it works.

Regards!

@tonivade tonivade changed the title the dll is called snappyjava.dll not libsnappy the dll is called snappyjava not libsnappyjava Jan 23, 2025
@xerial xerial merged commit d258a4a into xerial:master Feb 4, 2025
7 checks passed
@xerial
Copy link
Owner

xerial commented Feb 4, 2025

Thanks. Merged

@tonivade tonivade deleted the fix/graalvm-recource-config-for-windows branch February 4, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants