用quarkus构建失败

时间:2020-09-18 16:27:48

标签: java aws-lambda quarkus

我的项目中有一些AWS lambda函数,我正在尝试使用Quarkus构建它,以提高lambda性能。 当我尝试使用以下方法构建它时:

Error: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: com.fasterxml.jackson.dataformat.cbor.CBORGenerator.getOutputContext(). 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 com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:903)

Call path from entry point to com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(): 
    at com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:900)
    at java.io.FileDescriptor.closeAll(FileDescriptor.java:345)
    at java.io.FileOutputStream.close(FileOutputStream.java:396)
    at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3639)
    at java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:277)
    at java.io.PrintStream.flush(PrintStream.java:417)
    at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:772)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.joda.time.Interval.parseWithOffset(java.lang.String). 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 com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:62)

Call path from entry point to com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(JsonParser, DeserializationContext): 
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:37)
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:15)
    at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1719)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1228)
    at io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop$1.run(AbstractLambdaPollLoop.java:78)
    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)

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: com.fasterxml.jackson.dataformat.cbor.CBORGenerator.getOutputContext(). 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 com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:903)

Call path from entry point to com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(): 
    at com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:900)
    at java.io.FileDescriptor.closeAll(FileDescriptor.java:345)
    at java.io.FileOutputStream.close(FileOutputStream.java:396)
    at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3639)
    at java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:277)
    at java.io.PrintStream.flush(PrintStream.java:417)
    at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:772)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.joda.time.Interval.parseWithOffset(java.lang.String). 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 com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:62)

Call path from entry point to com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(JsonParser, DeserializationContext): 
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:37)
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:15)
    at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1719)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1228)
    at io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop$1.run(AbstractLambdaPollLoop.java:78)
    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)
    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: com.fasterxml.jackson.dataformat.cbor.CBORGenerator.getOutputContext(). 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 com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:903)
Call path from entry point to com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(): 
    at com.fasterxml.jackson.dataformat.cbor.CBORGenerator.close(CBORGenerator.java:900)
    at java.io.FileDescriptor.closeAll(FileDescriptor.java:345)
    at java.io.FileOutputStream.close(FileOutputStream.java:396)
    at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3639)
    at java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:277)
    at java.io.PrintStream.flush(PrintStream.java:417)
    at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:772)
    at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.joda.time.Interval.parseWithOffset(java.lang.String). 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 com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:62)

Call path from entry point to com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(JsonParser, DeserializationContext): 
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:37)
    at com.fasterxml.jackson.datatype.joda.deser.IntervalDeserializer.deserialize(IntervalDeserializer.java:15)
    at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1719)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1228)
    at io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop$1.run(AbstractLambdaPollLoop.java:78)
    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)
    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

我得到以下堆栈:

VALUES

我不知道可能是什么,因为我没有使用stacktrace中列出的方法。

有人已经使用quarkus构建AWS-lambda项目吗?

非常感谢

1 个答案:

答案 0 :(得分:1)

我不知道这个特定的问题,但是在使用本机映像之前,我在使用quarkus时遇到了问题。您可以尝试使用te JVM进行构建,但graalvm尚不十分可靠。