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

Tika nativ-image build error #12730

Closed
borellda opened this issue Oct 15, 2020 · 7 comments
Closed

Tika nativ-image build error #12730

borellda opened this issue Oct 15, 2020 · 7 comments
Labels
area/tika kind/bug Something isn't working

Comments

@borellda
Copy link

Hi,

The build for a native-image fails for a small pure quarkus app including the Tika extension.
This is maybe related to #10104 and #6549
I'm using quarkus 1.8.3 and GraalVM CE 20.2.0 for Java11

Best regards,
Daniel

Here is the exception

[18:28:00] : [Step 2/2] 18:28:00,865 INFO [org.jbo.threads] JBoss Threads version 3.1.1.Final
[18:30:36] : [Step 2/2] [resource-leech-1.0.60-runner:25530] (clinit): 1,724.97 ms, 3.46 GB
[18:30:37] : [Step 2/2] [resource-leech-1.0.60-runner:25530] (typeflow): 100,545.15 ms, 3.46 GB
[18:30:37] : [Step 2/2] [resource-leech-1.0.60-runner:25530] (objects): 78,097.66 ms, 3.46 GB
[18:30:37] : [Step 2/2] [resource-leech-1.0.60-runner:25530] (features): 5,726.46 ms, 3.46 GB
[18:30:37] : [Step 2/2] [resource-leech-1.0.60-runner:25530] analysis: 191,474.34 ms, 3.46 GB
[18:30:37]W: [org.arhs:resource-leech] Error: Unsupported features in 2 methods
[18:30:37]W: [org.arhs:resource-leech] Detailed message:
[18:30:37]W: [org.arhs:resource-leech] Error: Class initialization of ucar.nc2.grib.grib2.Grib2JpegDecoder failed. Use the option --initialize-at-run-time=ucar.nc2.grib.grib2.Grib2JpegDecoder to explicitly request delayed initialization of this class.
[18:30:37]W: [org.arhs:resource-leech] Original exception that caused the problem: java.lang.NoClassDefFoundError: jj2000/j2k/util/StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
[18:30:37]W: [org.arhs:resource-leech] at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisMethod.(AnalysisMethod.java:131)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1691)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5338)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.SourceTypeFlowBase.update(SourceTypeFlowBase.java:144)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[18:30:37]W: [org.arhs:resource-leech] Caused by: java.lang.ClassNotFoundException: jj2000.j2k.util.StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[18:30:37]W: [org.arhs:resource-leech] ... 47 more
[18:30:37]W: [org.arhs:resource-leech] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
[18:30:37]W: [org.arhs:resource-leech] Trace:
[18:30:37]W: [org.arhs:resource-leech] at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
[18:30:37]W: [org.arhs:resource-leech] Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.reallyRead(Variable.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.dataset.VariableDS._read(VariableDS.java:507)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.read(Variable.java:709)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
[18:30:37]W: [org.arhs:resource-leech] at java.util.concurrent.FutureTask.run(FutureTask.java:264)
[18:30:37]W: [org.arhs:resource-leech] at java.lang.Thread.run(Thread.java:834)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
[18:30:37]W: [org.arhs:resource-leech]
[18:30:37]W: [org.arhs:resource-leech] com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
[18:30:37]W: [org.arhs:resource-leech] Detailed message:
[18:30:37]W: [org.arhs:resource-leech] Error: Class initialization of ucar.nc2.grib.grib2.Grib2JpegDecoder failed. Use the option --initialize-at-run-time=ucar.nc2.grib.grib2.Grib2JpegDecoder to explicitly request delayed initialization of this class.
[18:30:37]W: [org.arhs:resource-leech] Original exception that caused the problem: java.lang.NoClassDefFoundError: jj2000/j2k/util/StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
[18:30:37]W: [org.arhs:resource-leech] at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisMethod.(AnalysisMethod.java:131)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1691)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5338)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.SourceTypeFlowBase.update(SourceTypeFlowBase.java:144)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[18:30:37]W: [org.arhs:resource-leech] Caused by: java.lang.ClassNotFoundException: jj2000.j2k.util.StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[18:30:37]W: [org.arhs:resource-leech] ... 47 more
[18:30:37]W: [org.arhs:resource-leech] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
[18:30:37]W: [org.arhs:resource-leech] Trace:
[18:30:37]W: [org.arhs:resource-leech] at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
[18:30:37]W: [org.arhs:resource-leech] Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.reallyRead(Variable.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.dataset.VariableDS._read(VariableDS.java:507)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.read(Variable.java:709)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
[18:30:37]W: [org.arhs:resource-leech] at java.util.concurrent.FutureTask.run(FutureTask.java:264)
[18:30:37]W: [org.arhs:resource-leech] at java.lang.Thread.run(Thread.java:834)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
[18:30:37]W: [org.arhs:resource-leech]
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[18:30:37]W: [org.arhs:resource-leech] Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
[18:30:37]W: [org.arhs:resource-leech] Detailed message:
[18:30:37]W: [org.arhs:resource-leech] Error: Class initialization of ucar.nc2.grib.grib2.Grib2JpegDecoder failed. Use the option --initialize-at-run-time=ucar.nc2.grib.grib2.Grib2JpegDecoder to explicitly request delayed initialization of this class.
[18:30:37]W: [org.arhs:resource-leech] Original exception that caused the problem: java.lang.NoClassDefFoundError: jj2000/j2k/util/StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
[18:30:37]W: [org.arhs:resource-leech] at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
[18:30:37]W: [org.arhs:resource-leech] at jdk.unsupported/sun.misc.Unsafe.ensureClassInitialized(Unsafe.java:698)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:177)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:594)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:168)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:236)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:271)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:209)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:186)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisMethod.(AnalysisMethod.java:131)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:419)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:407)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:125)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:113)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4307)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1691)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5338)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
[18:30:37]W: [org.arhs:resource-leech] at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.flow.SourceTypeFlowBase.update(SourceTypeFlowBase.java:144)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
[18:30:37]W: [org.arhs:resource-leech] Caused by: java.lang.ClassNotFoundException: jj2000.j2k.util.StringFormatException
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[18:30:37]W: [org.arhs:resource-leech] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[18:30:37]W: [org.arhs:resource-leech] ... 47 more
[18:30:37]W: [org.arhs:resource-leech] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
[18:30:37]W: [org.arhs:resource-leech] Trace:
[18:30:37]W: [org.arhs:resource-leech] at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
[18:30:37]W: [org.arhs:resource-leech] Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.reallyRead(Variable.java:860)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.dataset.VariableDS._read(VariableDS.java:507)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.Variable.read(Variable.java:709)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
[18:30:37]W: [org.arhs:resource-leech] at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
[18:30:37]W: [org.arhs:resource-leech] at java.util.concurrent.FutureTask.run(FutureTask.java:264)
[18:30:37]W: [org.arhs:resource-leech] at java.lang.Thread.run(Thread.java:834)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
[18:30:37]W: [org.arhs:resource-leech]
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
[18:30:37]W: [org.arhs:resource-leech] at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
[18:30:37]W: [org.arhs:resource-leech] ... 8 more
[18:30:38]W: [org.arhs:resource-leech] Error: Image build request failed with exit status 1

@borellda borellda added the kind/bug Something isn't working label Oct 15, 2020
@borellda
Copy link
Author

Hi,

after building with quarkus.native.additional-build-args=--initialize-at-run-time=ucar.nc2.grib.grib2.Grib2JpegDecoder, -H:+TraceClassInitialization, the error is as follows:
Error: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace:
at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:831)
at ucar.nc2.Variable.read(Variable.java:709)
at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_949.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.poi.hwpf.model.FileInformationBlock.toString(FileInformationBlock.java:337)
at java.lang.String.valueOf(String.java:2951)
at java.io.PrintStream.print(PrintStream.java:745)
at java.io.PrintStream.println(PrintStream.java:882)
at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:766)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)
com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace:
at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:831)
at ucar.nc2.Variable.read(Variable.java:709)
at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_949.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.poi.hwpf.model.FileInformationBlock.toString(FileInformationBlock.java:337)
at java.lang.String.valueOf(String.java:2951)
at java.io.PrintStream.print(PrintStream.java:745)
at java.io.PrintStream.println(PrintStream.java:882)
at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:766)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)
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:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: ucar.nc2.grib.grib2.Grib2JpegDecoder.(int, boolean). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace:
at parsing ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:727)
Call path from entry point to ucar.nc2.grib.grib2.Grib2DataReader2.getData40(RandomAccessFile, Grib2Drs$Type40):
at ucar.nc2.grib.grib2.Grib2DataReader2.getData40(Grib2DataReader2.java:716)
at ucar.nc2.grib.grib2.Grib2DataReader2.getData(Grib2DataReader2.java:109)
at ucar.nc2.grib.grib2.Grib2Record.readData(Grib2Record.java:321)
at ucar.nc2.grib.collection.Grib2Iosp.readData(Grib2Iosp.java:405)
at ucar.nc2.grib.collection.GribIosp$DataReader.read(GribIosp.java:940)
at ucar.nc2.grib.collection.GribIosp.readDataFromCollection(GribIosp.java:860)
at ucar.nc2.grib.collection.GribIosp.readData(GribIosp.java:810)
at ucar.nc2.NetcdfFile.readData(NetcdfFile.java:1986)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:831)
at ucar.nc2.Variable.read(Variable.java:709)
at ucar.nc2.ncml.Aggregation$Dataset.read(Aggregation.java:730)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:404)
at ucar.nc2.ncml.AggregationOuterDimension$ReaderTask.call(AggregationOuterDimension.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_949.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.poi.hwpf.model.FileInformationBlock.toString(FileInformationBlock.java:337)
at java.lang.String.valueOf(String.java:2951)
at java.io.PrintStream.print(PrintStream.java:745)
at java.io.PrintStream.println(PrintStream.java:882)
at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:766)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
... 8 more
Error: Image build request failed with exit status 1

Regards,
Daniel

@sberyozkin
Copy link
Member

@borellda Can you please attach a file (a test file if needed), what format/parser is that ?

@borellda
Copy link
Author

Hi @sberyozkin,

unfortunately I can not connect it with a specific file that can not be parsed. It fails on build to create the native image.

@sberyozkin
Copy link
Member

sberyozkin commented Oct 15, 2020

@borellda By the way are you actually using quarkus-tika extension ? I think it marks Grib parser (looks like the trace is pointing to it) as non native ready

@borellda
Copy link
Author

borellda commented Oct 15, 2020

@sberyozkin Yes, amongst other extensions for reactive, I'm using the quarkus-tika extension.
full dependency list in the pom:
<dependencies> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-vertx</artifactId> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport-native-epoll</artifactId> <classifier>linux-x86_64</classifier> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jackson</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-metrics</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-health</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-tika</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-openapi</artifactId> </dependency> </dependencies>

@Karm
Copy link
Member

Karm commented Dec 7, 2021

@borellda @sberyozkin Could we close this one? It seems that contemporary Tika extension complains politely that it won't parse JPEG2000 and carries on. If it needs to work with images, it prompts user to install AWT extension since #20850 :

Caused by: java.lang.UnsupportedOperationException: 

Add AWT Quarkus extension to enable Java2D/ImageIO. Additional system libraries such as 
`freetype' and `fontconfig' might be needed.

        at java.awt.geom.Path2D.setWindingRule(Path2D.java:99)
        at java.awt.geom.Path2D.<init>(Path2D.java:133)
        at java.awt.geom.Path2D$Float.<init>(Path2D.java:232)
        at java.awt.geom.GeneralPath.<init>(GeneralPath.java:59)
        at org.apache.pdfbox.pdmodel.common.PDRectangle.toGeneralPath(PDRectangle.java:338)
        at org.apache.pdfbox.pdmodel.graphics.state.PDGraphicsState.<init>(PDGraphicsState.java:79)
        at org.apache.pdfbox.contentstream.PDFStreamEngine.initPage(PDFStreamEngine.java:136)
        at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:151)
        at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:144)
        at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:394)
        at org.apache.tika.parser.pdf.PDF2XHTML.processPage(PDF2XHTML.java:127)
        at org.apache.tika.parser.pdf.AbstractPDF2XHTML.processPages(AbstractPDF2XHTML.java:985)
        at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:269)
        at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:98)
        at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:177)
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)

@Karm
Copy link
Member

Karm commented Aug 11, 2022

Closing the issue.

Users can see PDFBox quickstart and its sister AWT quickstart for details:
quarkusio/quarkus-quickstarts#1154

@Karm Karm closed this as completed Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tika kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants