Open DaveO-Home opened 5 months ago
/cc @alesj (grpc), @cescoffier (grpc), @geoand (kotlin)
Note totally sure, but I cannot run the reproducer:
gradle quarkusDev
Welcome to Gradle 8.8!
Here are the highlights of this release:
For more details see https://docs.gradle.org/8.8/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
Could not resolve all dependencies for configuration ':classpath'. Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23. Required by: project : > org.jetbrains.kotlin.plugin.allopen:org.jetbrains.kotlin.plugin.allopen.gradle.plugin:1.9.23 > org.jetbrains.kotlin:kotlin-allopen:1.9.23 Unable to find a variant of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23 providing the requested capability org.jetbrains.kotlin:kotlin-gradle-plugin-api-gradle82:
- Variant compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant enforced-platform-compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-enforced-platform:1.9.23
- Variant enforced-platform-runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-enforced-platform:1.9.23
- Variant javadoc provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant platform-compile provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-platform:1.9.23
- Variant platform-runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api-derived-platform:1.9.23
- Variant runtime provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
- Variant sources provides org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
Did you try ./gradlew quarkusDev
. That should pick up gradle 8.7 and the Quarkus config.
Same result with:
./gradlew quarkusDev
Note: Kotlin does not support Java 22 yet. There is a ./gradle/wrapper/gradle-wrapper.properties
file right? Also there should be a ./gradle.properties
file.
I'm using Java v21.0.3.
The ./gradle/wrapper/gradle-wrapper.properties indicates Gradle 8.6:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
The ./gradle.properties has nothing out of the ordinary:
org.gradle.jvmargs=-Xmx4096m
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformVersion=3.9.5
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.9.5
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.9.23
try changing to 1.9.24 in build.gradle
I have "Intellij Community"installed on my machine. If that is a requirement to use Kotlin in Gradle, then that is a problem!
I'm using my plain terminal. I'm surprised it worse for you. Which gradle and java versions are you using?
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9) OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing)
I did change the Gradle version to 8.7 but 8.6 also works. I run in a plain terminal also on Fedora 40.
Just ran gh repo clone DaveO-Home/grpc-quarkus
and started up with gradlew quarkusDev
without a change.
Last resort - clear your maven cache
Upgraded Kotlin & Kotlin Plugin to 2.0.0 and Gradle to 8.8. Should run with Java 17-22
The problem is with the following (I use in the websockets app):
@RouteFilter(50)
void getRemoteAddress(RoutingContext rc) {
if (rc != null) {
if (rc.request() != null && rc.request().remoteAddress() != null) {
remoteAddress = rc.request().remoteAddress().toString();
}
rc.next();
}
}
Implemented from io.quarkus:quarkus-vertx-web:3.0.0.Beta1
.
Is there an alternative?
Ah, that may explain it. This may activate the request scope. I can't remember, do you have the stack trace you see?
No, only the warning is produced.
Ok, so we will have to find all the places where the request scope gets activated unconditionally.
Just a haed's up - still didn't have time to look into that. Maybe @alesj can have a look.
Describe the bug
When running gRPC combined with the Web Server, a warning is displayed:
Request context already active when gRPC request started
. Same warning for either a Java Client or Javascript Client.Expected behavior
Warning message is suppressed.
Actual behavior
Request context already active when gRPC request started
is logged.How to Reproduce?
Download
https://github.com/DaveO-Home/grpc-quarkus
, README.md included.Output of
uname -a
orver
Linux mini-pc 6.8.9-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 18:59:06 UTC 2024 x86_64 GNU/Linux
Output of
java -version
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)
Quarkus version or git rev
3.9.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 8.6 ------------------------------------------------------------ Build time: 2024-02-02 16:47:16 UTC Revision: d55c486870a0dc6f6278f53d21381396d0741c6e Kotlin: 1.9.20 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.2 (Oracle Corporation 21.0.2+13-LTS-jvmci-23.1-b30) OS: Linux 6.8.9-300.fc40.x86_64 amd64
Additional information
No response