Alexandre Brown

    Alexandre Brown

    1 year ago
    Hello, I am trying to deploy a hello world application to AWS with GraalVM but I get this error :
    Unable to find method ''boolean com.google.common.base.Platform.stringIsNullOrEmpty(java.lang.String)''
    'boolean com.google.common.base.Platform.stringIsNullOrEmpty(java.lang.String)'
    
    Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
    
    Re-download dependencies and sync project (requires network)
    The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
    
    Stop Gradle build processes (requires restart)
    Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
    
    In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
    I deleted my gradle cache and it didn't solve the issue. My first intuition would be to believe I am missing something in my
    reflection.json
    but I am not sure. I can build the project, I can deploy locally, I cannot deploy to AWS. Versions : • JVM : 1.4.21 • Gradle : 7.0 • JVM Target: 11 • Kotless: 0.1.7-beta-5 • DSL: ktor-lang 0.1.7-beta-5 Here is the repo : https://github.com/AlexandreBrown/KotlessSetup Any help is appreciated
    TanVD

    TanVD

    1 year ago
    Have you tried to kill all Gradle daemons?)
    Alexandre Brown

    Alexandre Brown

    1 year ago
    @TanVD I tried killing all Gradle Deamons using
    pkill -f '.*GradleDaemon.*'
    and it did kill all the gradle deamons but it still does not work, also FYI I can deploy to AWS when GraalVM is not the runtime. Here are the logs of
    deploy
    with
    --scan
    when GraalVM is the runtime :
    11:30:46 a.m.: Executing task 'deploy --scan'...
    
    
    > Configure project :Infrastructure
    Create GraalVM native image: `<http://ghcr.io/graalvm/graalvm-ce:java11-21.0.0|ghcr.io/graalvm/graalvm-ce:java11-21.0.0>`.
    Create GraaVM native image with flags: -H:+AllowIncompleteClasspath -H:ReflectionConfigurationFiles=/working/build/reflect.json -H:+ReportUnsupportedElementsAtRuntime --initialize-at-build-time=io.ktor,kotlinx,kotlin,org.apache.logging.log4j,org.apache.logging.slf4j,org.apache.log4j --enable-url-protocols=https -Djava.net.preferIPv4Stack=true --no-server -jar
    
    > Task :Infrastructure:compileKotlin
    > Task :Infrastructure:compileJava NO-SOURCE
    
    > Task :Infrastructure:generateAdapter
    Execution optimizations have been disabled for task ':Infrastructure:generateAdapter' to ensure correctness due to the following reasons:
      - Gradle detected a problem with the following location: '/home/brownthedev/Documents/KotlessSetup/Infrastructure/build/kotlin-gen'. Reason: Task ':Infrastructure:compileKotlin' uses this output of task ':Infrastructure:generateAdapter' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to <https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency> for more details about this problem.
    
    > Task :Infrastructure:processResources NO-SOURCE
    > Task :Infrastructure:classes
    > Task :Infrastructure:shadowJarGraal
    > Task :Infrastructure:createDockerfile
    
    > Task :Infrastructure:buildGraalImage FAILED
    Building image using context '/home/brownthedev/Documents/KotlessSetup/Infrastructure/build/docker'.
    
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
    Use '--warning-mode all' to show the individual deprecation warnings.
    See <https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings>
    
    Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
    Please consult deprecation warnings for more details.
    5 actionable tasks: 5 executed
    
    Publishing a build scan to <http://scans.gradle.com|scans.gradle.com> requires accepting the Gradle Terms of Service defined at <https://gradle.com/terms-of-service>. Do you accept these terms? [yes, no] 
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':Infrastructure:buildGraalImage'.
    > 'boolean com.google.common.base.Platform.stringIsNullOrEmpty(java.lang.String)'
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at <https://help.gradle.org>
    
    BUILD FAILED in 3s
    @TanVD Notice the
    Infrastructure:buildGraalImage FAILED