0

很高兴我已经成功编译了官方的测试程序,但是在尝试编写自己的JavaFX程序时出现了一些问题:

当我引入fastjson依赖时,gluonfx: build 无法成功构建。这是它的日志:

[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:24)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.serializer.GuavaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:23)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.money.Monetary. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:48)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(DefaultJSONParser, Type, Object): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:34)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:576)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1243)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1169)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:612)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:592)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:46)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:38)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.runHandler(Animation.java:1102)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.play(Animation.java:1005)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$Animation.start(Image.java:911)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image.lambda$initializeAnimatedImage$1(Image.java:877)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$$Lambda$1439/0x00000007c1272c40.run(Unknown Source)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_Runnable_2_0002erun_00028_00029V(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.javamoney.moneta.Money. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] com.oracle.svm.hosted.FallbackFeature$FallbackImageRequest: Aborting stand-alone image build. Unsupported features in 4 methods
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Detailed message:
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ArrayListMultimap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.serializer.GuavaCodec.deserialze(GuavaCodec.java:36)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.serializer.GuavaCodec.deserialze(DefaultJSONParser, Type, Object): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.GuavaCodec.deserialze(GuavaCodec.java:31)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:576)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1243)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1169)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:612)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:592)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:46)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:38)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.runHandler(Animation.java:1102)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.play(Animation.java:1005)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$Animation.start(Image.java:911)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image.lambda$initializeAnimatedImage$1(Image.java:877)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$$Lambda$1439/0x00000007c1272c40.run(Unknown Source)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_Runnable_2_0002erun_00028_00029V(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.Multimap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:24)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.serializer.GuavaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:23)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.money.Monetary. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:48)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(DefaultJSONParser, Type, Object): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:34)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:576)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1243)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1169)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:612)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:592)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:46)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:38)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.runHandler(Animation.java:1102)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.play(Animation.java:1005)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$Animation.start(Image.java:911)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image.lambda$initializeAnimatedImage$1(Image.java:877)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$$Lambda$1439/0x00000007c1272c40.run(Unknown Source)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_Runnable_2_0002erun_00028_00029V(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.javamoney.moneta.Money. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:225)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:235)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:764)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:532)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 4 methods
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Detailed message:
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.ArrayListMultimap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.serializer.GuavaCodec.deserialze(GuavaCodec.java:36)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.serializer.GuavaCodec.deserialze(DefaultJSONParser, Type, Object): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.GuavaCodec.deserialze(GuavaCodec.java:31)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:576)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1243)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1169)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:612)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:592)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:46)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:38)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.runHandler(Animation.java:1102)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.play(Animation.java:1005)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$Animation.start(Image.java:911)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image.lambda$initializeAnimatedImage$1(Image.java:877)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$$Lambda$1439/0x00000007c1272c40.run(Unknown Source)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_Runnable_2_0002erun_00028_00029V(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: com.google.common.collect.Multimap. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:24)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.serializer.GuavaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.GuavaCodec.write(GuavaCodec.java:23)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: javax.money.Monetary. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:48)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(DefaultJSONParser, Type, Object): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.deserialze(MonetaCodec.java:34)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:576)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1243)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1169)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:612)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.parseArray(JSON.java:592)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:46)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.example.fxdemo.HelloApplication$1.handle(HelloApplication.java:38)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.runHandler(Animation.java:1102)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.animation.Animation.play(Animation.java:1005)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$Animation.start(Image.java:911)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image.lambda$initializeAnimatedImage$1(Image.java:877)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at javafx.scene.image.Image$$Lambda$1439/0x00000007c1272c40.run(Unknown Source)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_Runnable_2_0002erun_00028_00029V(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.javamoney.moneta.Money. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Trace: 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at parsing com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] Call path from entry point to com.alibaba.fastjson.support.moneta.MonetaCodec.write(JSONSerializer, Object, Object, Type, int): 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.support.moneta.MonetaCodec.write(MonetaCodec.java:21)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:312)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toJSONString(JSON.java:1077)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.alibaba.fastjson.JSON.toString(JSON.java:1071)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.sun.javafx.css.ParsedValueImpl.equals(ParsedValueImpl.java:373)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_util_Map_2_0002eget_00028Ljava_lang_Object_2_00029Ljava_lang_Object_2(generated:0)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] 
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:761)
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB]    ... 6 more
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18668]      [total]:  34,175.10 ms,  5.67 GB
[SUNDAY 9 19 10:32:14 CST 2021][INFO] [SUB] # Printing build artifacts to: C:\Users\Anivie\Desktop\gluon-samples-master\FXDemo\target\gluonfx\x86_64-windows\gvm\HelloFX\com.example.fxdemo.helloapplication.build_artifacts.txt
[SUNDAY 9 19 10:32:15 CST 2021][INFO] [SUB] Warning: The produced fallback image will not be portable, because not all classpath entries could be relativized (e.g., they are on another drive).
[SUNDAY 9 19 10:32:16 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]    classlist:     749.69 ms,  0.96 GB
[SUNDAY 9 19 10:32:18 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]        (cap):   1,322.38 ms,  0.96 GB
[SUNDAY 9 19 10:32:19 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]        setup:   2,972.10 ms,  0.96 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]     (clinit):     180.45 ms,  1.74 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]   (typeflow):   1,937.09 ms,  1.74 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]    (objects):   1,559.11 ms,  1.74 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]   (features):     241.35 ms,  1.74 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]     analysis:   4,135.59 ms,  1.74 GB
[SUNDAY 9 19 10:32:23 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]     universe:     512.15 ms,  1.74 GB
[SUNDAY 9 19 10:32:24 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]      (parse):     373.80 ms,  1.76 GB
[SUNDAY 9 19 10:32:24 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]     (inline):     350.97 ms,  1.76 GB
[SUNDAY 9 19 10:32:28 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]    (compile):   3,765.37 ms,  3.25 GB
[SUNDAY 9 19 10:32:28 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]      compile:   4,876.52 ms,  3.25 GB
[SUNDAY 9 19 10:32:29 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]        image:     962.13 ms,  3.25 GB
[SUNDAY 9 19 10:32:29 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]        write:     127.65 ms,  3.25 GB
[SUNDAY 9 19 10:32:29 CST 2021][INFO] [SUB] [com.example.fxdemo.helloapplication:18248]      [total]:  14,482.71 ms,  3.25 GB
[SUNDAY 9 19 10:32:29 CST 2021][INFO] [SUB] # Printing build artifacts to: C:\Users\Anivie\Desktop\gluon-samples-master\FXDemo\target\gluonfx\x86_64-windows\gvm\HelloFX\com.example.fxdemo.helloapplication.build_artifacts.txt
[SUNDAY 9 19 10:32:30 CST 2021][INFO] [SUB] Warning: Image 'com.example.fxdemo.helloapplication' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation and to print more detailed information why a fallback image was necessary).
[SUNDAY 9 19 10:32:30 CST 2021][DETAILED] Result for compile: 0
[SUNDAY 9 19 10:32:30 CST 2021][DETAILED] Logging process [compile] to file: C:\Users\Anivie\Desktop\gluon-samples-master\FXDemo\target\gluonfx\log\process-compile-1632018750708.log
[SUNDAY 9 19 10:32:30 CST 2021][INFO] Additional information: Objectfile should be called com.example.fxdemo.helloapplication.obj but we didn't find that under C:\Users\Anivie\Desktop\gluon-samples-master\FXDemo\target\gluonfx\x86_64-windows\gvm
[SUNDAY 9 19 10:32:30 CST 2021][SERIOUS] Compiling failed.
Check the log files under C:\Users\Anivie\Desktop\gluon-samples-master\FXDemo\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.

这就是我使用这些依赖项的方式

    <dependencies>
    <!-- JavaFxVersion is 17 -->
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-media</artifactId>
        <version>${javafx.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>fastjson</artifactId>
        <version>LATEST</version>
    </dependency>
</dependencies>

有谁知道这是关于什么的?这是否意味着 FastJson 不能在 Graalvm 上使用?或者我需要一些额外的配置吗?如果是,什么样的依赖项不能在 GraalVm 项目上使用?

还有一个问题是我通过pom引入了JavaFX的Meida包后,在编译时,mediaplayer没有工作,点击按钮后没有报错和响应。我尝试使用异常监听器将错误信息放入TextArera,他没有给我任何异常信息。

所有这些问题只有在我构建项目,运行时 javafx:ru​​n 和 graalfx:ru​​n 才能正常运行,这仅出现在 graalvm:build 命令中。

因为google这方面的资料太少了,我自己解决不了这些问题,只能求助,不胜感激!

4

0 回答 0