Repository: quarkusio/quarkus
Issue: quarkus-integration-test-kogito build fails in native mode with JDK 11

**Describe the bug**
```
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 19.3.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /Library/Java/JavaVirtualMachines/graalvm-ce-java11-19.3.0/Contents/Home/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -H:+TraceClassInitialization --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar quarkus-integration-test-kogito-999-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+AddAllCharsets -H:EnableURLProtocols=http -H:+JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace quarkus-integration-test-kogito-999-SNAPSHOT-runner
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]    classlist:  41,192.02 ms
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]        (cap):   6,009.80 ms
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]        setup:  10,921.17 ms
11:42:03,092 INFO  [org.jbo.threads] JBoss Threads version 3.0.0.Final
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]   (typeflow):  99,864.10 ms
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]    (objects):  71,636.80 ms
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]   (features):   3,055.08 ms
[quarkus-integration-test-kogito-999-SNAPSHOT-runner:51213]     analysis: 182,299.87 ms
Error: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: 	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.io.FilePermissionCollection
	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.security.Permissions
	object java.security.ProtectionDomain
	method org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry)
Call path from entry point to org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry): 
	at org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(ClassFieldAccessorFactory.java:164)
	at org.drools.core.base.ClassFieldAccessorCache$CacheEntry.getWriteAccessor(ClassFieldAccessorCache.java:204)
	at org.drools.core.base.ClassFieldAccessorCache.getWriteAcessor(ClassFieldAccessorCache.java:115)
	at org.drools.core.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:298)
	at org.drools.core.base.ClassFieldAccessorStore.merge(ClassFieldAccessorStore.java:240)
	at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:902)
	at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:729)
	at org.drools.core.impl.KnowledgeBaseImpl$$Lambda$1363/0x00000008423e6040.run(Unknown Source)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

com.oracle.svm.core.util.UserError$UserException: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: 	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.io.FilePermissionCollection
	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.security.Permissions
	object java.security.ProtectionDomain
	method org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry)
Call path from entry point to org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry): 
	at org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(ClassFieldAccessorFactory.java:164)
	at org.drools.core.base.ClassFieldAccessorCache$CacheEntry.getWriteAccessor(ClassFieldAccessorCache.java:204)
	at org.drools.core.base.ClassFieldAccessorCache.getWriteAcessor(ClassFieldAccessorCache.java:115)
	at org.drools.core.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:298)
	at org.drools.core.base.ClassFieldAccessorStore.merge(ClassFieldAccessorStore.java:240)
	at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:902)
	at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:729)
	at org.drools.core.impl.KnowledgeBaseImpl$$Lambda$1363/0x00000008423e6040.run(Unknown Source)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

	at com.oracle.svm.core.util.UserError.abort(UserError.java:75)
	at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:221)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:736)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: 	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.io.FilePermissionCollection
	object java.util.concurrent.ConcurrentHashMap$Node
	object java.util.concurrent.ConcurrentHashMap$Node[]
	object java.util.concurrent.ConcurrentHashMap
	object java.security.Permissions
	object java.security.ProtectionDomain
	method org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry)
Call path from entry point to org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(Class, String, ClassFieldAccessorCache$CacheEntry): 
	at org.drools.core.base.ClassFieldAccessorFactory.getClassFieldWriter(ClassFieldAccessorFactory.java:164)
	at org.drools.core.base.ClassFieldAccessorCache$CacheEntry.getWriteAccessor(ClassFieldAccessorCache.java:204)
	at org.drools.core.base.ClassFieldAccessorCache.getWriteAcessor(ClassFieldAccessorCache.java:115)
	at org.drools.core.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:298)
	at org.drools.core.base.ClassFieldAccessorStore.merge(ClassFieldAccessorStore.java:240)
	at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:902)
	at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:729)
	at org.drools.core.impl.KnowledgeBaseImpl$$Lambda$1363/0x00000008423e6040.run(Unknown Source)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
	at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
	at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

	at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:733)
	... 8 more
```

**To Reproduce**
Steps to reproduce the behavior from the `master` branch:
1. (Optional) Set the `JAVA_HOME` environment variable to a JDK 11 installation directory (OpenJDK 11 or GraalVM 19.3.0 JDK 11 edition). Add the JDK 11 `bin` directory to the path.
2. (Optional) Run `./mvnw clean install -Dmaven.test.skip=true` to build all the Quarkus sources with the JDK 11.
3. Run `./mvnw clean install --projects :quarkus-integration-test-kogito -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.0-java11`.

Changed files:
extensions/kogito/deployment/src/main/java/io/quarkus/kogito/deployment/KogitoAssetsProcessor.java

diff --git a/extensions/kogito/deployment/src/main/java/io/quarkus/kogito/deployment/KogitoAssetsProcessor.java b/extensions/kogito/deployment/src/main/java/io/quarkus/kogito/deployment/KogitoAssetsProcessor.java
index 7e031553e4c..e040ceaba9d 100644
--- a/extensions/kogito/deployment/src/main/java/io/quarkus/kogito/deployment/KogitoAssetsProcessor.java
+++ b/extensions/kogito/deployment/src/main/java/io/quarkus/kogito/deployment/KogitoAssetsProcessor.java
@@ -20,6 +20,7 @@
 import org.drools.compiler.commons.jci.compilers.JavaCompilerSettings;
 import org.drools.compiler.compiler.io.memory.MemoryFileSystem;
 import org.drools.compiler.kproject.models.KieModuleModelImpl;
+import org.drools.core.base.ClassFieldAccessorFactory;
 import org.drools.modelcompiler.builder.GeneratedFile;
 import org.drools.modelcompiler.builder.JavaParserCompiler;
 import org.jboss.jandex.ClassInfo;
@@ -53,6 +54,7 @@
 import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 import io.quarkus.deployment.index.IndexingUtil;
 import io.quarkus.runtime.LaunchMode;
 
@@ -134,6 +136,11 @@ public List<ReflectiveHierarchyIgnoreWarningBuildItem> reflectiveDMNREST() {
         return result;
     }
 
+    @BuildStep
+    public RuntimeInitializedClassBuildItem init() {
+        return new RuntimeInitializedClassBuildItem(ClassFieldAccessorFactory.class.getName());
+    }
+
     @BuildStep(loadsApplicationClasses = true)
     public void generateModel(ArchiveRootBuildItem root,
             BuildProducer<GeneratedBeanBuildItem> generatedBeans,