gluonhq / gluonfx-maven-plugin

Plugin that simplifies creating native images for Java/JavaFX maven projects
BSD 3-Clause "New" or "Revised" License
189 stars 39 forks source link

warning when compiling native image #469

Open HenriqueVS600 opened 1 year ago

HenriqueVS600 commented 1 year ago

I get a warning when compiling the image

D:\Hardware-Monitor>mvn gluonfx:build
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.hardware.monitor:Hardware-Monitor >----------------
[INFO] Building Hardware-Monitor 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.18:build (default-cli) @ Hardware-Monitor ---
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.hardware.monitor:Hardware-Monitor >----------------
[INFO] Building Hardware-Monitor 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> gluonfx-maven-plugin:1.0.18:compile (default-cli) > process-classes @ Hardware-Monitor >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Hardware-Monitor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 22 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ Hardware-Monitor ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gluonfx-maven-plugin:1.0.18:compile (default-cli) < process-classes @ Hardware-Monitor <<<
[INFO]
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.18:compile (default-cli) @ Hardware-Monitor ---
[sex. abr. 28 06:38:44 BRT 2023][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

[sex. abr. 28 06:38:45 BRT 2023][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
    https://gluonhq.com/activate

[sex. abr. 28 06:38:47 BRT 2023][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[sex. abr. 28 06:38:50 BRT 2023][INFO] [SUB] ========================================================================================================================
[sex. abr. 28 06:38:50 BRT 2023][INFO] [SUB] GraalVM Native Image: Generating 'com.hardware.monitor.app' (shared library)...
[sex. abr. 28 06:38:50 BRT 2023][INFO] [SUB] ========================================================================================================================
[sex. abr. 28 06:38:53 BRT 2023][INFO] [SUB] Warning: Could not resolve javafx.scene.layout.VBox; for reflection configuration. Reason: java.lang.ClassNotFoundException: javafx/scene/layout/VBox;.
[sex. abr. 28 06:38:53 BRT 2023][INFO] [SUB] Warning: Could not resolve javafx.scene.layout.HBox; for reflection configuration. Reason: java.lang.ClassNotFoundException: javafx/scene/layout/HBox;.
[sex. abr. 28 06:38:54 BRT 2023][INFO] [SUB] [1/7] Initializing...                                                                                    (5,7s @ 0,16GB)
[sex. abr. 28 06:38:54 BRT 2023][INFO] [SUB]  Version info: 'GraalVM 22.1.0.1 Java 17 CE'
[sex. abr. 28 06:38:54 BRT 2023][INFO] [SUB]  C compiler: cl.exe (microsoft, x64, 19.29.30148)
[sex. abr. 28 06:38:54 BRT 2023][INFO] [SUB]  Garbage collector: Serial GC
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB] [2/7] Performing analysis...  [**************]                                                          (40,1s @ 2,60GB)
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB]   11.633 (90,37%) of 12.872 classes reachable
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB]   20.736 (66,60%) of 31.134 fields reachable
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB]   58.171 (64,32%) of 90.438 methods reachable
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB]      660 classes,   245 fields, and 3.023 methods registered for reflection
[sex. abr. 28 06:39:34 BRT 2023][INFO] [SUB]      137 classes,   152 fields, and   208 methods registered for JNI access
[sex. abr. 28 06:39:37 BRT 2023][INFO] [SUB] [3/7] Building universe...                                                                               (2,4s @ 1,95GB)
[sex. abr. 28 06:39:40 BRT 2023][INFO] [SUB] [4/7] Parsing methods...      [**]                                                                       (3,3s @ 0,97GB)
[sex. abr. 28 06:39:43 BRT 2023][INFO] [SUB] [5/7] Inlining methods...     [****]                                                                     (2,5s @ 2,03GB)
[sex. abr. 28 06:40:07 BRT 2023][INFO] [SUB] [6/7] Compiling methods...    [*****]                                                                   (23,9s @ 2,11GB)
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]                         8,0s (9,2% of total time) in 52 GCs | Peak RSS: 4,60GB | CPU load: 4,34
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB] Produced artifacts:
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]  D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gvm\Hardware-Monitor\graal_isolate.h (header)
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]  D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gvm\Hardware-Monitor\com.hardware.monitor.app.h (header)
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]  D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gvm\Hardware-Monitor\graal_isolate_dynamic.h (header)
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]  D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gvm\Hardware-Monitor\com.hardware.monitor.app_dynamic.h (header)
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB]  D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gvm\Hardware-Monitor\com.hardware.monitor.app.build_artifacts.txt
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB] ========================================================================================================================
[sex. abr. 28 06:40:14 BRT 2023][INFO] [SUB] Finished generating 'com.hardware.monitor.app' in 1m 26s.
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.18:link (default-cli) @ Hardware-Monitor ---
[sex. abr. 28 06:40:16 BRT 2023][INFO] ==================== LINK TASK ====================
[sex. abr. 28 06:40:16 BRT 2023][INFO] Default icon.ico image generated in D:\Hardware-Monitor\target\gluonfx\x86_64-windows\gensrc\windows\assets.
Consider copying it to D:\Hardware-Monitor\src\windows before performing any modification
[sex. abr. 28 06:40:17 BRT 2023][INFO] [SUB] Microsoft (R) Incremental Linker Version 14.29.30148.0
[sex. abr. 28 06:40:17 BRT 2023][INFO] [SUB] Copyright (C) Microsoft Corporation.  All rights reserved.
[sex. abr. 28 06:40:17 BRT 2023][INFO] [SUB]
[sex. abr. 28 06:40:18 BRT 2023][INFO] [SUB]    Criando biblioteca D:\Hardware-Monitor\target\gluonfx\x86_64-windows\Hardware-Monitor.lib e objeto D:\Hardware-Monitor\target\gluonfx\x86_64-windows\Hardware-Monitor.exp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:35 min
[INFO] Finished at: 2023-04-28T06:40:19-03:00
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:37 min
[INFO] Finished at: 2023-04-28T06:40:19-03:00
[INFO] ------------------------------------------------------------------------

As you can see, it compiles normally, but it gives me the following warning:

[sex. abr. 28 06:38:53 BRT 2023][INFO] [SUB] Warning: Could not resolve javafx.scene.layout.VBox; for reflection configuration. Reason: java.lang.ClassNotFoundException: javafx/scene/layout/VBox;.
[sex. abr. 28 06:38:53 BRT 2023][INFO] [SUB] Warning: Could not resolve javafx.scene.layout.HBox; for reflection configuration. Reason: java.lang.ClassNotFoundException: javafx/scene/layout/HBox;.

When I try to run it it runs normally and shows another warning:

D:\Hardware-Monitor>mvn gluonfx:nativerun
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.hardware.monitor:Hardware-Monitor >----------------
[INFO] Building Hardware-Monitor 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.18:nativerun (default-cli) @ Hardware-Monitor ---
[sex. abr. 28 07:06:49 BRT 2023][INFO] ==================== RUN TASK ====================
[sex. abr. 28 07:06:49 BRT 2023][INFO] [SUB] abr. 28, 2023 7:06:49 AM com.sun.javafx.application.PlatformImpl startup
[sex. abr. 28 07:06:49 BRT 2023][INFO] [SUB] WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4c203ea1'
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.389 s
[INFO] Finished at: 2023-04-28T07:06:53-03:00
[INFO] ------------------------------------------------------------------------

What could it be, should I be concerned about this?

Ggbr-TaoLi commented 1 year ago

Excuse me, I have a similar problem, but I can't find a solution. Have you solved it yet?

My error report is: [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- gluonfx-maven-plugin:1.0.19:nativerun (default-cli) @ withfxml --- 7月 19, 2023 4:54:33 下午 com.gluonhq.substrate.util.Logger logInfo 信息: Substrate is tested with the Gluon's GraalVM build which you can find at https://github.com/gluonhq/graal/releases. While you can still use other GraalVM builds, there is no guarantee that these will work properly with Substrate [周三 7月 19 16:54:33 CST 2023][信息] ==================== RUN TASK ==================== [周三 7月 19 16:54:33 CST 2023][信息] [SUB] 7�� 19, 2023 4:54:33 ���� com.sun.javafx.application.PlatformImpl startup [周三 7月 19 16:54:33 CST 2023][信息] [SUB] ����: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @49d904ec' [周三 7月 19 16:54:35 CST 2023][严重] Process run until end failed with result: -1073741819 Check the log files under D:\TEMP\20220209-purejavafx-withfxml\target\gluonfx\x86_64-windows\gvm\log And please check https://docs.gluonhq.com/ for more information. [周三 7月 19 16:54:35 CST 2023][信息] Logging process [run until end] to file: D:\TEMP\20220209-purejavafx-withfxml\target\gluonfx\log\process-run until end-1689756875928.log


        |       ||   |    |  | |  ||       ||  |  | |
        |    ___||   |    |  | |  ||   _   ||   |_| |
        |   | __ |   |    |  |_|  ||  | |  ||       |
        |   ||  ||   |___ |       ||  |_|  ||  _    |
        |   |_| ||       ||       ||       || | |   |
        |_______||_______||_______||_______||_|  |__|

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

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.157 s [INFO] Finished at: 2023-07-19T16:54:39+08:00 [INFO] ------------------------------------------------------------------------

Process finished with exit code 0