quarkus: Command line stuck for mvn quarkus:dev on windows 11

Describe the bug

I have a simple project (which runs fine in WSL 😃) created from the ‘kotlin’ template from this page https://quarkus.io/guides/kotlin. Whenever I run the goal mvn quarkus:dev from a windows 11 cmd or powershell it displays the following stacktrace, and it won’t accept any input (pressing r to run the tests does not work).

I also tried updating to the latest bom for quarkus platform: 2.14.3.

[INFO] --- quarkus-maven-plugin:2.14.3.Final:dev (default-cli) @ rest-poc ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ rest-poc
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.14.3.Final:generate-code @ rest-poc
[INFO] Invoking org.jetbrains.kotlin:kotlin-maven-plugin:1.7.21:compile @ rest-poc
[INFO] Applied plugin: 'all-open'
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile @ rest-poc
[INFO] Changes detected - recompiling the module!
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ rest-poc
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\OlivierBeltrando\dev\rest-poc\src\test\resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.14.3.Final:generate-code-tests @ rest-poc
[INFO] Invoking org.jetbrains.kotlin:kotlin-maven-plugin:1.7.21:test-compile @ rest-poc
[INFO] Applied plugin: 'all-open'
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile @ rest-poc
[INFO] Changes detected - recompiling the module!
Listening for transport dt_socket at address: 5005
Exception in thread "WindowsStreamPump" java.lang.UnsatisfiedLinkError: 'void org.fusesource.jansi.internal.Kernel32$MOUSE_EVENT_RECORD.init()'
        at org.fusesource.jansi.internal.Kernel32$MOUSE_EVENT_RECORD.init(Native Method)
        at org.fusesource.jansi.internal.Kernel32$MOUSE_EVENT_RECORD.<clinit>(Kernel32.java:583)
        at org.fusesource.jansi.internal.Kernel32$INPUT_RECORD.<init>(Kernel32.java:735)
        at org.fusesource.jansi.internal.Kernel32.readConsoleInputHelper(Kernel32.java:823)
        at org.fusesource.jansi.internal.WindowsSupport.readConsoleInput(WindowsSupport.java:106)
        at org.aesh.readline.terminal.impl.WinSysTerminal.readConsoleInput(WinSysTerminal.java:73)
        at org.aesh.readline.terminal.impl.AbstractWindowsTerminal.pump(AbstractWindowsTerminal.java:310)
        at java.base/java.lang.Thread.run(Thread.java:833)
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-12-07 11:30:51,254 INFO  [io.quarkus] (Quarkus Main Thread) rest-poc 0.0.1-SNAPSHOT on JVM (powered by Quarkus 2.14.3.Final) started in 1.677s. Listening on: http://localhost:8080

2022-12-07 11:30:51,259 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2022-12-07 11:30:51,260 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kotlin, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]
--
Tests paused
Press [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>

from cmd with mvn (3.8.6)

image

from pwershell with mvnw (that invokes mvn 3.8.6 behind the scenes)

image

This seems to happen only on pure windows 11 (I haven’t tested on any other windows version), but runs fine within WSL.

Many thanks in advance for your help. Cheers, Olivier

Expected behavior

The terminal should be able to receive user input. There should not be any stack traces

Actual behavior

Stack trace shows up. Terminal is frozen and won’t accept user input.

How to Reproduce?

from a powershell with

quarkus create app org.acme:rest-kotlin-quickstart --extension='kotlin,resteasy-reactive-jackson'

image

Output of uname -a or ver

Microsoft Windows [version 10.0.22000.1219]

Output of java -version

java -version openjdk version “17” 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.14.2.Final

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

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: C:\Users\OlivierBeltrando\bin\apache-maven-3.8.6-bin\apache-maven-3.8.6 Java version: 17, vendor: Oracle Corporation, runtime: C:\Users\OlivierBeltrando\bin\openjdk-17+35_windows-x64_bin\jdk-17 Default locale: fr_FR, platform encoding: Cp1252 OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 25 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the writeup

Hi @geoand, @gsmet , sorry, I wrote a lot and did not make enough effort to highlight what solves the issue (in a hacky way).

The workaround Add any of the deps org.aesh:readline:jar:2.2 or org.aesh:aesh:jar:2.6 to the applicative pom.xml (the one generated by the quarkus create app org.acme:rest-kotlin-quickstart --extension='kotlin,resteasy-reactive-jackson'). What I noticed is that adding any of those to pom.xml of the app changes the dependency scope of readline and jansi from test to compile. And that does the trick for my work laptop running on windows 11.

Those are current versions of the deps that are being bundled with latest quarkus (2.15.2.Final). What fixes or breaks in my case are just the scope of those deps.

What would probably solve the whole thing would be to make sure that any of those are present in the compile scope whenever an application pom.xml declares a quarkus version (let’s say 2.16.0.Final ;P)