Skip to content

SparkJava Example Deployment to App Engine fails #468

@eneskaya

Description

@eneskaya

When trying to deploy the sparkjava Example to App Engine using mvn appengine:deploy I get two errors, regarding the placement of the Dockerfile and the .jar file.

First, I get this:

[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.0.0:deploy (default-cli) on project getwhocares: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.0.0:deploy failed: Found 'Dockerfile' in the App Engine directory. Please move it to the Docker directory. -> [Help 1]

To fix that issue I copied the Dockerfile from the /src/main/appengine directory to /src/main/Docker. After that, it's not complaining anymore, but the second error occurs:

[INFO] GCLOUD: Step 1 : FROM gcr.io/google_appengine/openjdk8
[INFO] GCLOUD: latest: Pulling from google_appengine/openjdk8
[INFO] GCLOUD: Digest: sha256:284996b5de7e4b362357e1e046acd529b3df58538c49cf101f0b9a62617283cd
[INFO] GCLOUD: Status: Downloaded newer image for gcr.io/google_appengine/openjdk8:latest
[INFO] GCLOUD:  ---> fab027046bdf
[INFO] GCLOUD: Step 2 : VOLUME /tmp
[INFO] GCLOUD:  ---> Running in f43c079a504f
[INFO] GCLOUD:  ---> e675865688d7
[INFO] GCLOUD: Removing intermediate container f43c079a504f
[INFO] GCLOUD: Step 3 : ADD spark-1.0-jar-with-dependencies.jar app.jar
[INFO] GCLOUD: lstat spark-1.0-jar-with-dependencies.jar: no such file or directory
[INFO] GCLOUD: ERROR
[INFO] GCLOUD: ERROR: build step "gcr.io/cloud-builders/docker@sha256:1b5a8642d04ef785f7dd2dbb0296f837895f50442fdfe5ebd0b04c206ab0b1b5" failed: exit status 1
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [2] Build failed; check build logs for details

When running it locally it all works fine.
What's wrong here?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @tswast@jerjou@eneskaya@yoshi-automation

      Issue actions

        SparkJava Example Deployment to App Engine fails · Issue #468 · GoogleCloudPlatform/java-docs-samples