gluonhq / substrate

Create native Java(FX) apps for desktop, mobile and embedded
GNU General Public License v2.0
389 stars 52 forks source link

Cannot find 'enableSWRendering' in class com.gluonhq.ReleaseConfiguration #1277

Closed ctoabidmaqbool closed 1 week ago

ctoabidmaqbool commented 2 weeks ago

After switching to latest GraalVM e.g. GraalVM CE 23-dev+25.1 I am facing above error!

Expected Behavior

I think, it should works, because without this, In emulator native-image apps can't be run e.g. I am using WSL in Windows 10 (Ubunt)!

Current Behavior

Error happes:

Complete logs:

maqboolstudiopc@MSC-30:/mnt/d/GraalVM-Projects/gluonhq/hello-gluon-ci$ ./mvnw -Pdesktop gluonfx:build gluonfx:package gluonfx:nativerun
[1.882s][warning][jit,compilation] JVMCI compiler disabled after 11 of 11 upcalls had errors (Last error: "uncaught exception in call_HotSpotJVMCIRuntime_compileMethod [jdk.vm.ci.common.JVMCIError: VM config values missing that should be present in JDK 23 jvmci-23+25-jvmci-b01 linux-amd64 (java.home=/mnt/d/Programs/graalvm-java23-linux-amd64-gluon-23+25.1-dev, java.vm.name=OpenJDK 64-Bit Server VM, java.vm.version=23+25-jvmci-b01):
    HeapRegion::LogOfHRGrainBytes at jdk.graal.compiler/jdk.graal.compiler.hotspot.GraalHotSpotVMConfig.<init>(GraalHotSpotVMConfig.java:400)
Set the debug.jdk.graal.jvmciConfigCheck system property to "ignore" to suppress this error or to "warn" to emit a warning and continue execution.
Currently used Java home directory is /mnt/d/Programs/graalvm-java23-linux-amd64-gluon-23+25.1-dev.
Currently used VM configuration is: OpenJDK 64-Bit Server VM
]"). Use -Xlog:jit+compilation for more detail.
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.gluonhq.samples:hellogluon >-------------------
[INFO] Building HelloGluon 1.0.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.24-SNAPSHOT:build (default-cli) @ hellogluon ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping HelloGluon
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.289 s
[INFO] Finished at: 2024-09-08T23:41:47+05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.24-SNAPSHOT:build (default-cli) on project hellogluon: Unable to parse configuration of mojo com.gluonhq:gluonfx-maven-plugin:1.0.24-SNAPSHOT:build for parameter enableSWRendering: Cannot find 'enableSWRendering' in class com.gluonhq.ReleaseConfiguration -> [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/PluginConfigurationException
maqboolstudiopc@MSC-30:/mnt/d/GraalVM-Projects/gluonhq/hello-gluon-ci$ java --version
openjdk 23 2024-09-17
OpenJDK Runtime Environment GraalVM CE 23-dev+25.1 (build 23+25-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 23-dev+25.1 (build 23+25-jvmci-b01, mixed mode, sharing)

Steps to Reproduce

  1. Git clone https://github.com/gluonhq/hello-gluon-ci
  2. Enable SW Rendering add <enableSWRendering>false</enableSWRendering>
  3. ./mvnw -Pdesktop gluonfx:build gluonfx:package gluonfx:nativerun

Your Environment

  1. Windows 10
  2. WSL (Ubuntu)
  3. Latest GraalVM release
ctoabidmaqbool commented 1 week ago

As the gluon official docs says:

The correct location for <enableSWRendering></enableSWRendering> is within <configuration></configuration> block directly not within <configuration><releaseConfiguration> </releaseConfiguration></configuration> block.

I was mistakenly add it between <releaseConfiguration></releaseConfiguration> block, which was causing the issue!

The complete conf sample:

<plugin>
    <groupId>com.gluonhq</groupId>
    <artifactId>gluonfx-maven-plugin</artifactId>
    <version>1.0.23</version>
    <configuration>
        <target>host</target>
        <mainClass>your.mainClass</mainClass>
        <bundlesList></bundlesList>
        <resourcesList></resourcesList>
        <reflectionList></reflectionList>
        <jniList></jniList>
        <attachList></attachList>
        <nativeImageArgs></nativeImageArgs>
        <linkerArgs></linkerArgs>
        <runtimeArgs></runtimeArgs>
        <verbose>false</verbose>
        <graalvmHome></graalvmHome>
        <javaStaticSdkVersion>11-ea+10</javaStaticSdkVersion>
        <javafxStaticSdkVersion>21-ea+11.2</javafxStaticSdkVersion>
        <enableSWRendering>false</enableSWRendering>
        <remoteHostName></remoteHostName>
        <remoteDir></remoteDir>
        <appIdentifier></appIdentifier>
        <releaseConfiguration>
            <!-- all targets -->
            <packageType></packageType>
            <description></description>
            <vendor></vendor>
            <!-- macOS -->
            <macAppStore></macAppStore>
            <macSigningUserName></macSigningUserName>
            <macAppCategory></macAppCategory>
            <!-- macOS/iOS -->
            <bundleName></bundleName>
            <bundleVersion>1.0</bundleVersion>
            <bundleShortVersion>1.0</bundleShortVersion>
            <providedSigningIdentity></providedSigningIdentity>
            <providedProvisioningProfile></providedProvisioningProfile>
            <skipSigning>false</skipSigning>
            <!-- iOS Simulator -->
            <simulatorDevice></simulatorDevice>
            <!-- Android -->
            <appLabel></appLabel>
            <versionCode>1</versionCode>
            <versionName>1.0</versionName>
            <providedKeyStorePath>${android-keystore-path}</providedKeyStorePath>
            <providedKeyStorePassword>${android-keystore-password}</providedKeyStorePassword>
            <providedKeyAlias>${android-key-alias}</providedKeyAlias>
            <providedKeyAliasPassword>${android-key-password}</providedKeyAliasPassword>
        </releaseConfiguration>
    </configuration>
</plugin>