[英]Why is my JavaFX 17 Application not building with Gluon ? Logged as JNI / Reflection problem
我正在關注 Gluon 提供的文檔:此處。
為了盡量讓它簡單,我將嘗試 go 直截了當地給出我完成的里程碑,以及我被困的地方。
---------- 環境:
操作系統: Windows 10 x64
IDE: Eclipse,版本:2021-12 (4.22.0)
JAVA: jdk17.0.1
JAVAFX: javafx-sdk-17.0.1
GraalVM: graalvm-svm-java17-windows-gluon-22.0.0.2-Final
適用於 Eclipse 的 Gluon 插件: 2.8.2
Visual Studio: 1.63.2(具有文檔中描述的所有必需擴展)
Wix: 3.11.2.24516
- - - - - 配置
Maven: apache-maven-3.8.4
Pom:這是我的 POM 的第一部分的屏幕截圖,可以在此處找到。
環境變量: JAVA_HOME + GRAALVM_HOME + MAVEN_HOME
- - - - - 完畢:
JavaFX(v17) 應用:
- - - - - 問題:
無法完成 Gluon 目標“mvn gluonfx:build”或“gluonfx:build”:這是我所做的:
mvn gluonfx:build
。 我還嘗試按照建議“打開運行配置…window 並將目標更新為 gluonfx:build 並單擊運行”的說明進行操作。 兩者都導致失敗:在這篇文章的結尾是終端報告顯示:幾天以來我一直在努力扭轉一切,並在 .net 上搜索一些線索......但直到現在都沒有運氣:-(......有人能幫我解決這個問題嗎?
附言。 我確實使用了外部 DLL(是的,僅 Windows,但是嘿:我們在這里嘗試進行原生構建,因此,在 Windows 中;-),應該沒問題); 這個 DLL 是 JNI 附加的。 我也試過玩這個......沒有運氣。
---------- 終端報告:
(如前所述, 這里是完整日志)
D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler>mvn gluonfx:build
[INFO] Scanning for projects...
[INFO]
[INFO] --< com.plpr.application:gluon-mobile---single-view-project--allow-incomplete-classpath >--
[INFO] Building Gluon Mobile - Single View Project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.8:build (default-cli) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Scanning for projects...
[INFO]
[INFO] --< com.plpr.application:gluon-mobile---single-view-project--allow-incomplete-classpath >--
[INFO] Building Gluon Mobile - Single View Project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.8:compile (default-cli) > process-classes @ gluon-mobile---single-view-project--allow-incomplete-classpath >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.8:compile (default-cli) < process-classes @ gluon-mobile---single-view-project--allow-incomplete-classpath <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.8:compile (default-cli) @ gluon-mobile---single-view-project--allow-incomplete-classpath ---
[lun. févr. 07 15:17:25 CET 2022][INFO] ==================== COMPILE TASK ====================
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[lun. févr. 07 15:17:26 CET 2022][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
[lun. févr. 07 15:17:28 CET 2022][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] GraalVM Native Image: Generating 'com.plpr.application.gluonapplication'...
[lun. févr. 07 15:17:30 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] [1/7] Initializing...
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] (4,2s @ 0,16GB)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Error: Error parsing JNI configuration in D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\jniconfig-x86_64-windows.json:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Field java.net.Inet6Address.cached_scope_id not found. To allow unresolvable reflection configuration, use option --allow-incomplete-classpath
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationFiles.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Error parsing JNI configuration in D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\jniconfig-x86_64-windows.json:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Field java.net.Inet6Address.cached_scope_id not found. To allow unresolvable reflection configuration, use option --allow-incomplete-classpath
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationFiles.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.doParseAndRegister(ConfigurationParserUtils.java:135)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.lambda$parseAndRegisterConfigurations$1(ConfigurationParserUtils.java:86)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:214)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:515)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at java.base/java.util.stream.IntPipeline.sum(IntPipeline.java:473)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.parseAndRegisterConfigurations(ConfigurationParserUtils.java:88)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.jni.access.JNIAccessFeature.afterRegistration(JNIAccessFeature.java:128)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.lambda$setupNativeImage$14(NativeImageGenerator.java:802)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:74)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:802)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:534)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:494)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:426)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:587)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:126)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:617)
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] 0,1s (3,0% of total time) in 8 GCs | Peak RSS: 0,85GB | CPU load: 5,50
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Produced artifacts:
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\Gluon Mobile - Single View Project\com.plpr.application.gluonapplication.build_artifacts.txt
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] ========================================================================================================================
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Failed generating 'com.plpr.application.gluonapplication' after 2,3s.
[lun. févr. 07 15:17:31 CET 2022][INFO] [SUB] Error: Image build request failed with exit status 1
[lun. févr. 07 15:17:31 CET 2022][SEVERE] Process compile failed with result: 1
Check the log files under D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.
[lun. févr. 07 15:17:31 CET 2022][INFO] Logging process [compile] to file: D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\log\process-compile-1644243451215.log
[lun. févr. 07 15:17:31 CET 2022][SEVERE] Compiling failed.
Check the log files under D:\_DEV\_Eclipse_IDE\_Workspaces\PRIVATE\GluonMobile_PlaylistProfiler\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.934 s
[INFO] Finished at: 2022-02-07T15:17:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.8:compile (default-cli) on project gluon-mobile---single-view-project--allow-incomplete-classpath: Compiling failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.723 s
[INFO] Finished at: 2022-02-07T15:17:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.8:build (default-cli) on project gluon-mobile---single-view-project--allow-incomplete-classpath: Error, gluonfx:build failed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
José Pereda在這里有一個很棒的“編碼博客”,他發現我的插件版本已經過時了。
他指出在開發過程中使用了2個插件:
--allow-incomplete-classpath
設置不正確。 它必須在插件/配置部分的“POM”中設置如下(已引用相同的 POM):
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.