Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: gradle-8.10-bin+ causing IOException #7864

Open
TriNextErik opened this issue Feb 5, 2025 · 0 comments
Open

Bug: gradle-8.10-bin+ causing IOException #7864

TriNextErik opened this issue Feb 5, 2025 · 0 comments
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Comments

@TriNextErik
Copy link

TriNextErik commented Feb 5, 2025

Description:

When the distributionUrl in the gradle-wrapper.properties of a project is set to https\://services.gradle.org/distributions/gradle-8.10-bin.zip or higher versions, an IOException occurs during the build process.

Steps to reproduce:

1.) Create a new Project in IntelliJ IDEA 2024.2.3 (Ultimate Edition)
2.) Edit the distributionUrl in the gradle-wrapper.properties from:
https\://services.gradle.org/distributions/gradle-8.8-bin.zip
to
https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3.) Add implementation("com.amazonaws:aws-lambda-java-core:1.2.3") to the dependencies
4.) Use the following class class/code and run the local webhook

public class LambraEntryPoint implements RequestStreamHandler {

    /**
     * Handles a Lambda Function request
     *
     * @param input The Lambda Function input stream
     * @param output The Lambda function output stream
     * @param context The Lambda execution environment context object.
     */
    @Override
    public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {
    }
}

Observed result:

Result was tested on gradle-8.8-bin.zip and gradle-8.12.1-bin.zip

2025-02-05 11:32:34,658 | Running workflow 'JavaGradleWorkflow'
2025-02-05 11:32:34,658 |  Running JavaGradleWorkflow:GradleBuild
2025-02-05 11:32:35,619 | JavaGradleWorkflow:GradleBuild failed
Traceback (most recent call last):
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\aws_lambda_builders\workflows\java_gradle\actions.py", line 50, in _build_project
    self.subprocess_gradle.build(
  File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\aws_lambda_builders\workflows\java_gradle\gradle.py", line 45, in build
    raise GradleExecutionError(message=stderr.decode("utf8").strip())
aws_lambda_builders.workflows.java_gradle.gradle.GradleExecutionError: Gradle Failed: FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type BuildLifecycleController using ServicesProvider.createBuildLifecycleController().
   > Could not create service of type BuildModelController using VintageBuildControllerProvider.createBuildModelController().
      > Could not create service of type OutputFilesRepository using ExecutionBuildServices.createOutputFilesRepository().
         > java.io.IOException: Cannot delete file: C:\Users\USER~1\AppData\Local\Temp\tmp83ub653u\gradle-cache\buildOutputCleanup\buildOutputCleanup.lock

Expected result:

Build Succeeded

Additional environment details:

  1. OS: Win 11
  2. sam --version: SAM CLI, version 1.132.0
  3. AWS region: Frankfurt (eu-central-1)
{
  "version": "1.132.0",
  "system": {
    "python": "3.12.6",
    "os": "Windows-11-10.0.22631-SP0"
  },
  "additional_dependencies": {
    "docker_engine": "24.0.6",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

@TriNextErik TriNextErik added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

No branches or pull requests

1 participant