casbin / jcasbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Java
https://casbin.org
Apache License 2.0
2.4k stars 464 forks source link

Casbin with Graalvm native breaks since 1.32.0 #346

Closed bvmanuelpaillafil closed 1 year ago

bvmanuelpaillafil commented 1 year ago

Hi all,

Im using casbin with:

The project have a native-build(and run) powered by graalvm feature, but the output binary/executable breaks when use casbin 1.32.0 or higher with this error:

imagen

When downgrade to jcasbin 1.31.4 the native binary its run ok.

We have to execute a little research to try finding the text "Fail to load internal modules." and match with this https://github.com/killme2008/aviatorscript/blob/20a3c7f432446861da28a67d5fdee7d959fcc05c/src/main/java/com/googlecode/aviator/AviatorEvaluatorInstance.java#L897C60-L897C60 We identify that jcasbin uses aviator plugin but with our-own-version of aviator plugin (org.casbin.aviator) with v5.1.4-fix and the latest version of com.googlecode.aviator dependency are 5.3.3. We think is issue is related with #264

We attach a demo project to test it. (for build native: mvn clean compile package -Pnative)

code-with-quarkus-20230624_184253.zip

casbin-bot commented 1 year ago

@tangyang9464 @imp2002

D1zzzY1 commented 1 year ago

Hello, I configured according to the version number you provided and tested the demo you mentioned, but I did not encounter the problem you described. Could you please provide more detailed information about the error, or could you try again to explain the issue? image image image