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

Dev console "crashes" with Java 23 #44653

Closed
CodeSimcoe opened this issue Nov 22, 2024 · 7 comments · Fixed by #44796
Closed

Dev console "crashes" with Java 23 #44653

CodeSimcoe opened this issue Nov 22, 2024 · 7 comments · Fixed by #44796
Labels
area/core env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@CodeSimcoe
Copy link

Describe the bug

As discussed with @geoand on Zulip,
the dev console "crashes" when using Java 23.

Basic use case : bootstrap a "code-with-quarkus" app with rest only, launch app in dev mode via mvn quarkus:dev.
Got this weird output then nothing is displayed anymore (no standard or error output)
See that it fails to display Quarkus ascii art.

clem@CLEM-PC MINGW64 ~/repositories/code-with-quarkus
$ mvn quarkus:dev
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.acme:code-with-quarkus >---------------------
[INFO] Building code-with-quarkus 1.0.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus:3.16.4:dev (default-cli) @ code-with-quarkus ---
[INFO] Invoking resources:3.3.1:resources (default-resources) @ code-with-quarkus
[INFO] Copying 1 resource from src\main\resources to target\classes
[INFO] Invoking quarkus:3.16.4:generate-code (default) @ code-with-quarkus
[INFO] Invoking compiler:3.13.0:compile (default-compile) @ code-with-quarkus
[INFO] Nothing to compile - all classes are up to date.
[INFO] Invoking resources:3.3.1:testResources (default-testResources) @ code-with-quarkus
[INFO] skip non existing resourceDirectory C:\Users\clem\repositories\code-with-quarkus\src\test\resources
[INFO] Invoking quarkus:3.16.4:generate-code-tests (default) @ code-with-quarkus
[INFO] Invoking compiler:3.13.0:testCompile (default-testCompile) @ code-with-quarkus
[INFO] Nothing to compile - all classes are up to date.
Listening for transport dt_socket at address: 5005







--
Tests paused
Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>:←[39m] for the terminal, [←[94mh←[39m] for more options>39m] for more options> more options>terminal, [←[94mh←[39m] for

No issue when running app with -Djdk.console=java.base as advised by Georgios.
Therefore, it might by this change introduced in Jdk 22 : JLine As The Default Console Provider (JDK-8308591) ?

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

MINGW64_NT-10.0-22631 CLEM-PC 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys

Output of java -version

openjdk version "23" 2024-09-17 OpenJDK Runtime Environment (build 23+37-2369) OpenJDK 64-Bit Server VM (build 23+37-2369, mixed mode, sharing)

Quarkus version or git rev

3.16.4

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

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)

Additional information

No response

@CodeSimcoe CodeSimcoe added the kind/bug Something isn't working label Nov 22, 2024
@zakkak
Copy link
Contributor

zakkak commented Nov 22, 2024

Related to #44471

@geoand
Copy link
Contributor

geoand commented Nov 22, 2024

Thanks for reporting!

@maxandersen
Copy link
Member

the "weird" output is shown in zulip as [←[94m:←[39m] for the terminal, [←[94mh←[39m] for more options>[39m] for more options>ons>ti those are ansi codes not being interpreted correctly.

Why that is happening is the good question.

I also note you are on windows/mingw which probably could be related to it.

@CodeSimcoe
Copy link
Author

I also note you are on windows/mingw which probably could be related to it.

Same issue when using windows powershell 7.4.6.
But it works in my WSL Ubuntu, indeed

Copy link

quarkus-bot bot commented Nov 25, 2024

/cc @Sanne (core), @aloubyansky (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core)

@geoand
Copy link
Contributor

geoand commented Nov 25, 2024

I can confirm that this is not an issue for me on Linux.

@geoand geoand added the env/windows Impacts Windows machines label Nov 25, 2024
@geoand
Copy link
Contributor

geoand commented Nov 25, 2024

The way we are going to address #44471 for the time being, will also mean that the problem described here won't occur with the default settings (as we are going to default to the java.base console)

@geoand geoand closed this as completed in 88a0dce Nov 29, 2024
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Nov 29, 2024
@gsmet gsmet modified the milestones: 3.18 - main, 3.17.3 Nov 30, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 30, 2024
This is done because the new JLine console
which is the default from JDK 23 (maybe even 22?)
causes a large regression in startup time due to
it loading a very large number of classes.

If users really want to use the new console,
they have to start the application with
`-Djdk.console=jdk.internal.le`

Fixes: quarkusio#44471
Fixes: quarkusio#44653
(cherry picked from commit 88a0dce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants