Skip to content

GCP HTTP Example fails to deploy - ClassNotFound exception - JarLauncher #1085

Closed
@ggranum

Description

@ggranum

Describe the bug
Building and deploying the Main branch version of spring-cloud-function-samples/function-sample-gcp-http fails with 'java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher'

The 4.0.x branch still packages and deploys as expected.

Steps
Clone project && cd project
./mvnw install
cd spring-cloud-function-samples/function-sample-gcp-http
mvn package
gcloud functions deploy function-sample-gcp-http
--entry-point org.springframework.cloud.function.adapter.gcp.GcfJarLauncher
--runtime java17
--trigger-http
--source target/deploy
--memory 512MB

deploy fails with above exception.

What works
cd projectRoot
git checkout 4.0.x
mvn clean
cd spring-cloud-function-samples/function-sample-gcp-http
mvn package
gcloud functions deploy function-sample-gcp-http
--entry-point org.springframework.cloud.function.adapter.gcp.GcfJarLauncher
--runtime java17
--trigger-http
--source target/deploy
--memory 512MB

Further Info
I tried JDK20, 21 and 17. All Temurin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions