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

" java.lang.ClassNotFoundException: Worker" running "quarkusDev" or "build" when quarkus.docker.dockerfile-native-path=/docker/Dockerfile.native is used #40544

Open
mklueh opened this issue May 10, 2024 · 3 comments
Labels
area/gradle Gradle area/native-image kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.

Comments

@mklueh
Copy link
Contributor

mklueh commented May 10, 2024

Describe the bug

I've encountered a very sneaky issue:

In one branch I've added some additional config lines into the application.properties of the base module of my multi-module Gradle project

image

Neither build nor running the application was working and failed with

Could not write standard input to Gradle Worker Daemon 22.
java.io.IOException: Die Pipe wird gerade geschlossen
	at java.base/java.io.FileOutputStream.writeBytes(Native Method)
	at java.base/java.io.FileOutputStream.write(FileOutputStream.java:367)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:125)
	at java.base/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:252)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:240)
	at org.gradle.process.internal.streams.ExecOutputHandleRunner.writeBuffer(ExecOutputHandleRunner.java:98)
	at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:85)
	at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:64)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Fehler: Hauptklasse Worker konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: Worker

> Task :base:quarkusGenerateCode FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':base:quarkusGenerateCode'.
> There was a failure while executing work items
   > A failure occurred while executing io.quarkus.gradle.tasks.worker.CodeGenWorker
      > Failed to run Gradle Worker Daemon
         > Process 'Gradle Worker Daemon 22' finished with non-zero exit value 1

Turns out it is this specific line causing it

quarkus.docker.dockerfile-native-path=/docker/Dockerfile.native"

Expected behavior

I expect at least that quarkusDev is working, as this property should only affect the build.

Actual behavior

Build and run failing

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

3.10.0

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.7

Additional information

No response

@mklueh mklueh added the kind/bug Something isn't working label May 10, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 10, 2024

/cc @zakkak (native-image)

@geoand geoand added the area/gradle Gradle label May 10, 2024
@dmlloyd
Copy link
Member

dmlloyd commented May 10, 2024

This might possibly be the same issue as #40496.

@geoand
Copy link
Contributor

geoand commented May 17, 2024

Is this still an issue with #40496 now in?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle area/native-image kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.
Projects
None yet
Development

No branches or pull requests

3 participants