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

live reloading error with Kotlin #22581

Closed
rcnespoli opened this issue Jan 2, 2022 · 1 comment · Fixed by #22582
Closed

live reloading error with Kotlin #22581

rcnespoli opened this issue Jan 2, 2022 · 1 comment · Fixed by #22582
Assignees
Labels
area/kotlin kind/bug Something isn't working
Milestone

Comments

@rcnespoli
Copy link

rcnespoli commented Jan 2, 2022

Describe the bug

I'm using quarkus version 2.6.1.Final and kotlin version 1.6.10 and running in dev mode with command mvn quarkus:dev. The service started normally and i can run curl -v http://localhost:8080/hello and returns "Hello RESTEasy". If i change the code to return "Hello World", live reloading fails when i run curl again.

Expected behavior

Return Hello world

Actual behavior

Show this error in request with http status 500:

java.lang.IllegalArgumentException: Invalid argument: -parameters
	at org.jetbrains.kotlin.cli.common.CLITool.parseArguments(CLITool.kt:121)
	at io.quarkus.kotlin.deployment.KotlinCompilationProvider.compile(KotlinCompilationProvider.java:79)
	at io.quarkus.deployment.dev.QuarkusCompiler.compile(QuarkusCompiler.java:192)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.checkForChangedClasses(RuntimeUpdatesProcessor.java:688)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:435)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:417)
	at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$4.handle(VertxHttpHotReplacementSetup.java:152)
	at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$4.handle(VertxHttpHotReplacementSetup.java:139)
	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)
	at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)

And in console where i'm running mvn quarkus:dev shows this error:
Invalid argument: -parameters

How to Reproduce?

  1. visit code.quarkus.io, select Kotlin and RESTEasy JAX-RS extensions and download zip file
  2. extract zip file and go to folder
  3. run mvn quarkus:dev

Output of uname -a or ver

Linux 90678804c392 5.10.84-1-MANJARO #1 SMP PREEMPT Wed Dec 8 09:50:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-39)
OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.6.1.Final

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

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /usr/share/maven
Java version: 17.0.1, vendor: Oracle Corporation, runtime: /usr/java/openjdk-17
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.10.84-1-manjaro", arch: "amd64", family: "unix"

Additional information

  • This error is pretty similar with this issue, just a detail that i'm not using GraalVM;
  • Without kotlin extension, using java, live reload running fine;
@rcnespoli rcnespoli added the kind/bug Something isn't working label Jan 2, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 2, 2022

/cc @evanchooly

@geoand geoand self-assigned this Jan 3, 2022
geoand added a commit to geoand/quarkus that referenced this issue Jan 3, 2022
The maven-compiler-parameters are pretty much only for Java compilation
(the Kotlin plugin uses its own parameters) and they can actually make
the Kotlin compiler fail.

Fixes: quarkusio#22581
geoand added a commit that referenced this issue Jan 3, 2022
Prevent Maven compiler parameters from being used in Kotlin compiler
@quarkus-bot quarkus-bot bot added this to the 2.7 - main milestone Jan 3, 2022
@gsmet gsmet modified the milestones: 2.7 - main, 2.6.2.Final Jan 7, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jan 7, 2022
The maven-compiler-parameters are pretty much only for Java compilation
(the Kotlin plugin uses its own parameters) and they can actually make
the Kotlin compiler fail.

Fixes: quarkusio#22581
(cherry picked from commit 482cabd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kotlin kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants