Hi All,
Using,
- aspose-cells 18.3,
- Quarkus Framework 1.8.1.Final,
- Graal VM version 20.2.
When doing native build, > mvn clean install package -Pnative facing below error;
[INFO] [org.hibernate.Version] HHH000412: Hibernate ORM core version 5.4.21.Final
5115 [INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /codebuild/output/src159767782/src/target/estimates-1.0.0-SNAPSHOT-native-image-source-jar/estimates-1.0.0-SNAPSHOT-runner.jar
5116 [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /codebuild/output/src159767782/src/target/estimates-1.0.0-SNAPSHOT-native-image-source-jar/estimates-1.0.0-SNAPSHOT-runner.jar
5117 [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.2.0 (Java Version 11.0.8)
5118 [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /usr/lib/jvm/graalvm-ce-java11-20.2.0/bin/native-image -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-run-time=javax.imageio.ImageTypeSpecifier,com.sun.imageio.plugins.jpeg.JPEG\$JCS -H:+TraceClassInitialization --allow-incomplete-classpath --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -jar estimates-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:NativeLinkerOption=-no-pie --no-server -H:-UseServiceLoaderFeature -H:+StackTrace estimates-1.0.0-SNAPSHOT-runner
5119 [estimates-1.0.0-SNAPSHOT-runner:361] classlist: 12,299.77 ms, 1.64 GB
5120 [estimates-1.0.0-SNAPSHOT-runner:361] (cap): 2,084.07 ms, 1.64 GB
5121 [estimates-1.0.0-SNAPSHOT-runner:361] setup: 3,546.16 ms, 1.64 GB
5122 06:00:37,506 INFO [org.hib.val.int.uti.Version] HV000001: Hibernate Validator 6.1.5.Final
5123 06:00:37,612 INFO [org.hib.Version] HHH000412: Hibernate ORM core version 5.4.21.Final
5124 06:00:37,615 INFO [org.hib.ann.com.Version] HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
5125 06:00:37,638 INFO [org.hib.dia.Dialect] HHH000400: Using dialect: org.hibernate.dialect.SQLServer2012Dialect
5126 Warning: class initialization of class com.aspose.cells.zb failed with exception java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=com.aspose.cells.zb to explicitly request delayed initialization of this class.
5127 Warning: class initialization of class com.aspose.cells.za failed with exception java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=com.aspose.cells.za to explicitly request delayed initialization of this class.
5128 Warning: class initialization of class com.aspose.cells.znw failed with exception java.lang.NoClassDefFoundError: com/sun/media/imageio/plugins/tiff/TIFFImageWriteParam. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=com.aspose.cells.znw to explicitly request delayed initialization of this class.
5129 06:00:53,243 INFO [org.jbo.threads] JBoss Threads version 3.1.1.Final
5130 [estimates-1.0.0-SNAPSHOT-runner:361] (clinit): 1,173.48 ms, 5.38 GB
5131 [estimates-1.0.0-SNAPSHOT-runner:361] (typeflow): 29,146.09 ms, 5.38 GB
5132 [estimates-1.0.0-SNAPSHOT-runner:361] (objects): 45,027.79 ms, 5.38 GB
5133 [estimates-1.0.0-SNAPSHOT-runner:361] (features): 1,691.81 ms, 5.38 GB
5134 [estimates-1.0.0-SNAPSHOT-runner:361] analysis: 80,446.78 ms, 5.38 GB
5135 Error: No instances of sun.nio.ch.FileChannelImpl 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.
5136 Detailed message:
5137 Trace: Object was reached by
5138 reading field sun.font.TrueTypeFont$TTDisposerRecord.channel of
5139 constant sun.font.TrueTypeFont$TTDisposerRecord@66f90e2a reached by
5140 reading field java.util.Hashtable$Entry.value of
5141 constant java.util.Hashtable$Entry@7497974b reached by
5142 indexing into array
5143 constant java.util.Hashtable$Entry[]@3bbf94de reached by
5144 reading field java.util.Hashtable.table of
5145 constant java.util.Hashtable@7d003a6 reached by
5146 scanning method sun.java2d.Disposer.addReference(Disposer.java:246)
5147 Call path from entry point to sun.java2d.Disposer.addReference(Reference, DisposerRecord):
5148 at sun.java2d.Disposer.addReference(Disposer.java:246)
5149 at sun.font.StrikeCache$WeakDisposerRef.<init>(StrikeCache.java:442)
5150 at sun.font.StrikeCache.getStrikeRef(StrikeCache.java:402)
5151 at sun.font.Font2D.getStrike(Font2D.java:397)
5152 at sun.font.Font2D.getStrike(Font2D.java:334)
5153 at sun.font.StandardGlyphVector$GlyphStrike.create(StandardGlyphVector.java:1759)
5154 at sun.font.StandardGlyphVector.getDefaultStrike(StandardGlyphVector.java:1372)
5155 at sun.font.StandardGlyphVector.getGlyphStrike(StandardGlyphVector.java:1359)
5156 at sun.font.StandardGlyphVector.initPositions(StandardGlyphVector.java:1329)
5157 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:669)
5158 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:709)
5159 at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
5160 at java.util.Properties.getProperty(Properties.java:1125)
5161 at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:144)
5162 at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
5163 at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
5164
5165 com.oracle.svm.core.util.UserError$UserException: No instances of sun.nio.ch.FileChannelImpl 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.
5166 Detailed message:
5167 Trace: Object was reached by
5168 reading field sun.font.TrueTypeFont$TTDisposerRecord.channel of
5169 constant sun.font.TrueTypeFont$TTDisposerRecord@66f90e2a reached by
5170 reading field java.util.Hashtable$Entry.value of
5171 constant java.util.Hashtable$Entry@7497974b reached by
5172 indexing into array
5173 constant java.util.Hashtable$Entry[]@3bbf94de reached by
5174 reading field java.util.Hashtable.table of
5175 constant java.util.Hashtable@7d003a6 reached by
5176 scanning method sun.java2d.Disposer.addReference(Disposer.java:246)
5177 Call path from entry point to sun.java2d.Disposer.addReference(Reference, DisposerRecord):
5178 at sun.java2d.Disposer.addReference(Disposer.java:246)
5179 at sun.font.StrikeCache$WeakDisposerRef.<init>(StrikeCache.java:442)
5180 at sun.font.StrikeCache.getStrikeRef(StrikeCache.java:402)
5181 at sun.font.Font2D.getStrike(Font2D.java:397)
5182 at sun.font.Font2D.getStrike(Font2D.java:334)
5183 at sun.font.StandardGlyphVector$GlyphStrike.create(StandardGlyphVector.java:1759)
5184 at sun.font.StandardGlyphVector.getDefaultStrike(StandardGlyphVector.java:1372)
5185 at sun.font.StandardGlyphVector.getGlyphStrike(StandardGlyphVector.java:1359)
5186 at sun.font.StandardGlyphVector.initPositions(StandardGlyphVector.java:1329)
5187 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:669)
5188 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:709)
5189 at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
5190 at java.util.Properties.getProperty(Properties.java:1125)
5191 at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:144)
5192 at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
5193 at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
5194
5195 at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
5196 at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
5197 at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
5198 at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
5199 at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)
5200 at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
5201 at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
5202 at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
5203 at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
5204 at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
5205 at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
5206 Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of sun.nio.ch.FileChannelImpl 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.
5207 Detailed message:
5208 Trace: Object was reached by
5209 reading field sun.font.TrueTypeFont$TTDisposerRecord.channel of
5210 constant sun.font.TrueTypeFont$TTDisposerRecord@66f90e2a reached by
5211 reading field java.util.Hashtable$Entry.value of
5212 constant java.util.Hashtable$Entry@7497974b reached by
5213 indexing into array
5214 constant java.util.Hashtable$Entry[]@3bbf94de reached by
5215 reading field java.util.Hashtable.table of
5216 constant java.util.Hashtable@7d003a6 reached by
5217 scanning method sun.java2d.Disposer.addReference(Disposer.java:246)
5218 Call path from entry point to sun.java2d.Disposer.addReference(Reference, DisposerRecord):
5219 at sun.java2d.Disposer.addReference(Disposer.java:246)
5220 at sun.font.StrikeCache$WeakDisposerRef.<init>(StrikeCache.java:442)
5221 at sun.font.StrikeCache.getStrikeRef(StrikeCache.java:402)
5222 at sun.font.Font2D.getStrike(Font2D.java:397)
5223 at sun.font.Font2D.getStrike(Font2D.java:334)
5224 at sun.font.StandardGlyphVector$GlyphStrike.create(StandardGlyphVector.java:1759)
5225 at sun.font.StandardGlyphVector.getDefaultStrike(StandardGlyphVector.java:1372)
5226 at sun.font.StandardGlyphVector.getGlyphStrike(StandardGlyphVector.java:1359)
5227 at sun.font.StandardGlyphVector.initPositions(StandardGlyphVector.java:1329)
5228 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:669)
5229 at sun.font.StandardGlyphVector.equals(StandardGlyphVector.java:709)
5230 at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
5231 at java.util.Properties.getProperty(Properties.java:1125)
5232 at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:144)
5233 at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
5234 at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
5235
5236 at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
5237 at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
5238 ... 8 more
5239 Error: Image build request failed with exit status 1