-
Bug
-
Resolution: Done
-
Major
-
False
-
False
-
The native builds of explainablity-service-messaging and explainability-service-rest are broken.
Error: Classes that should be initialized at run time got initialized during image building: java.awt.datatransfer.DataFlavor the class was requested to be initialized at run time (Quarkus run time init for AWT). To see why java.awt.datatransfer.DataFlavor got initialized use --trace-class-initialization=java.awt.datatransfer.DataFlavor javax.activation.ActivationDataFlavor the class was requested to be initialized at run time (). To see why javax.activation.ActivationDataFlavor got initialized use --trace-class-initialization=javax.activation.ActivationDataFlavor com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building: java.awt.datatransfer.DataFlavor the class was requested to be initialized at run time (Quarkus run time init for AWT). To see why java.awt.datatransfer.DataFlavor got initialized use --trace-class-initialization=java.awt.datatransfer.DataFlavor javax.activation.ActivationDataFlavor the class was requested to be initialized at run time (). To see why javax.activation.ActivationDataFlavor got initialized use --trace-class-initialization=javax.activation.ActivationDataFlavor at com.oracle.svm.core.util.UserError.abort(UserError.java:68) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:555) at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:169) at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$12(NativeImageGenerator.java:730) at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:71) at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:730) at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:532) at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491) at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380) at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543) at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119) at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
This is caused by Drools referencing XStream.
javax.activation.ActivationDataFlavor the class was requested to be initialized at run time (). org.drools.core.util.Drools$XSTreamChekcer caused initialization of this class with the following trace: at javax.activation.ActivationDataFlavor.<clinit>(ActivationDataFlavor.java) at java.lang.Class.forName0(Unknown Source) at java.lang.Class.forName(Class.java:398) at com.thoughtworks.xstream.core.JVM.loadClassForName(JVM.java:328) at com.thoughtworks.xstream.core.JVM.loadClassForName(JVM.java:307) at com.thoughtworks.xstream.XStream.setupAliases(XStream.java:836) at com.thoughtworks.xstream.XStream.<init>(XStream.java:553) at com.thoughtworks.xstream.XStream.<init>(XStream.java:483) at com.thoughtworks.xstream.XStream.<init>(XStream.java:457) at com.thoughtworks.xstream.XStream.<init>(XStream.java:410) at com.thoughtworks.xstream.XStream.<init>(XStream.java:358) at org.kie.utll.xml.XStreamUtils.createNonTrustingXStream(XStreamUtils.java:189) at org.drools.core.util.Drools$XSTreamChekcer.checkXStream(Drools.java:129) at org.drools.core.util.Drools$XSTreamChekcer.<clinit>(Drools.java:125)
Attempts to include an equivalent fix to OptaPlanner (see here) results in:
... [INFO] Kogito Apps :: Explainability Service Messaging .... FAILURE [ 2.393 s] [INFO] Kogito Apps :: Explainability Service Rest ......... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.115 s [INFO] Finished at: 2021-11-05T13:41:37Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.4.0.Final:build (default) on project explainability-service-messaging: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [ERROR] [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.nio.file.FileSystemNotFoundException: /home/manstis/.m2/repository/org/kie/kogito/kogito-pmml-api-dependencies/2.0.0-SNAPSHOT/kogito-pmml-api-dependencies-2.0.0-SNAPSHOT.pom [ERROR] at com.oracle.svm.core.jdk.resources.NativeImageResourceFileSystem.<init>(NativeImageResourceFileSystem.java:127) [ERROR] at com.oracle.svm.core.jdk.resources.NativeImageResourceFileSystemProvider.newFileSystem(NativeImageResourceFileSystemProvider.java:123) [ERROR] at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:535) [ERROR] at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:396) [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.addMarkerFilePaths(ApplicationArchiveBuildStep.java:220) [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:129) [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:106) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564) [ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277) [ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) [ERROR] at java.base/java.lang.Thread.run(Thread.java:832) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
I can verify the file exists in my .m2. I have no idea why this fails.
- blocks
-
KOGITO-6228 dmn-pmml-quarkus-example does not compile in native mode
- Closed
- relates to
-
DROOLS-6643 KieModuleMarshaller initializes java.awt classes at build time via xstream which breaks Quarkus native compilation
- Closed
-
DROOLS-6645 Remove XML dependencies from drools-core/-compiler
- Resolved