Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum

We are developing a quarkus application using jCasbin. When trying to run a native image, an UnsupportedFeatureError is thrown, because aviator’s ASMCodeGenerator is trying to use ClassLoader::defineClass to generate a class from bytes at runtime when compiling the matcher function, which is not supported by GraalVM. Attempts of adding predefined-classes-config.json also failed, because the generated class names are dynamic (using timestamp), which makes the analysis result of graals native-image-agent useless …
Is there any way of configuring jCasbin so it can be run in a native application?

3views
2users
1 minread

Finally figured it out:

<quarkus.native.additional-build-args>-J-Daviator.eval.mode=INTERPRETER</quarkus.native.additional-build-args>

Might be worth adding to the README, that this system property is required when building native applications using jCasbin:

aviator.eval.mode=INTERPRETER

1 / 3
Sep 2025