Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version of snakeyaml dependency to fix NPE when compiled with graalvm #35

Closed
retrogradeorbit opened this issue Oct 13, 2019 · 1 comment

Comments

@retrogradeorbit
Copy link
Contributor

Using this in a clojure project, then compiling to an uberjar, then running through GraalVM's native-image to make a native binary, then running that binary explodes with:

Exception in thread "main" java.lang.NullPointerException
	at org.yaml.snakeyaml.util.PlatformFeatureDetector.isRunningOnAndroid(PlatformFeatureDetector.java:25)
	at org.yaml.snakeyaml.introspector.PropertyUtils.<init>(PropertyUtils.java:60)
	at org.yaml.snakeyaml.introspector.PropertyUtils.<init>(PropertyUtils.java:50)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getPropertyUtils(BaseConstructor.java:531)
	at org.yaml.snakeyaml.constructor.BaseConstructor.addTypeDescription(BaseConstructor.java:552)
	at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:84)
	at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:70)
	at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:56)
	at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:46)
	at yaml.reader$_STAR_constructor_STAR_.invokeStatic(reader.clj:10)
...

This is caused by a bug in older versions of snakeyaml: https://bitbucket.org/asomov/snakeyaml/issues/411/ensure-compatibility-with-graal

In order to fix this you just need to bump your snakeyaml dependency to a newer version (1.23 or above). I have tested with 1.25.

In the meantime, if compiling with graal, you can work around this issue with a deps structure like:

[io.forward/yaml "1.0.9" :exclusions [[org.yaml/snakeyaml]]]
[org.yaml/snakeyaml "1.25"]
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

No branches or pull requests

1 participant