You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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
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
orver
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
orgradlew --version
)No response
Additional information
https://github.com/quarkusio/quarkus/issues/45463
Already raised a defect with quarkus and feels like drools issue.
The text was updated successfully, but these errors were encountered: