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

Build fails with reading field java.util.concurrent.ConcurrentHashMap.table of constant "/project/lib/org.drools.drools-wiring-dynamic-8.39.0.Final.jar" #3825

Open
vinodkumarkv opened this issue Jan 10, 2025 · 0 comments

Comments

@vinodkumarkv
Copy link

vinodkumarkv commented Jan 10, 2025

Describe the bug

Describe the bug

I have a simple drools with Quarkus application.

Using:

drools version: 8.39.0.Final
maven.compiler.release : 21
quarkus.platform.version : 3.17.5
podman version: 5.3.1

I have tried different combination of options, which not working:

Use latest drools - 10.0.0
Use different version of Java (17)
Use different version of graavlm (17)

However, the quarkus dev and 'mvn package' works but generating native runner fails with the error.

Please find the git hub link of the sample project : https://github.com/vinodkumarkv/drools-sample.git

Expected behavior

mvn -P native package should be successful.
quarkus build --native should be successful.

Actual behavior

quarkus build --native generates the below error " Error: An object of type 'java.io.FilePermission' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.
This is not allowed for correctness reasons: All objects that are stored in the image heap must be initialized at build time."

java.util.concurrent.ConcurrentHashMap@19a4d8ec: {/project/lib/org.drools.drools-wiring-dynamic-8.39.0.Final.jar=("java.io.FilePe... reading field java.io.FilePermissionCollection.perms of constant

image image

How to Reproduce?

Create an application with:
<dependency> <groupId>org.kie</groupId> <artifactId>kie-api</artifactId> <version>${drools.version}</version> </dependency> <dependency> <groupId>org.drools</groupId> <artifactId>drools-core</artifactId> <version>${drools.version}</version> </dependency> <dependency> <groupId>org.kie</groupId> <artifactId>kie-internal</artifactId> <version>${drools.version}</version> </dependency> <dependency> <groupId>org.drools</groupId> <artifactId>drools-mvel</artifactId> <version>${drools.version}</version> </dependency> <dependency> <groupId>org.mvel</groupId> <artifactId>mvel2</artifactId> <version>2.5.2.Final</version> </dependency>

Output of uname -a or ver

No response

Output of java -version

jdk-21.0.5

GraalVM version (if different from Java)

graalvm-jdk-21.0.5+9.1

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

https://github.com/quarkusio/quarkus/issues/45463

Already raised a defect with quarkus and feels like drools issue.

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