-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Compilation fails when using new Logging with Panache and logging in try/catch #20569
Comments
/cc @FroMage, @evanchooly, @loicmathieu |
cc @Ladicek |
I added a simple test with logging in a |
Nope, I couldn't reproduce this based on the (limited) information from Zulip. I'm afraid I'm gonna need a reproducer. |
I’ll see if I can create one this week. Just as an FYI, I was using normal RESTEasy. |
Been having the same problem, no try-catch for me, just plain logging. Didn't knew it had to do with the Log with Panache, so commented it out and the compilation passed. |
Thanks to the people on Zulip, I have a reproducer:
public void hello() {
if (Math.random() > 0L) {}
Log.info("Hello!");
} Note that if I remove the |
Could it be that is has to do with the presence of the hibernate with panache dependency in the pom.xml because I had it as a dependency too. |
Indeed that is the case. There are 2 class transformers generated for the same class, and the Hibernate with Panache transformation accidentally comes later than the Logging with Panache one. Which results in class reader options begin reset, and then the Logging with Panache transformation fails. |
Fix is in #20664. |
Describe the bug
After upgrading to Quarkus 2.3.0.Final, I wanted to use the new Logging with Panache functionality. After removing all explicit static loggers and replacing with the Quarkus
Log
, I ended up with the compilation failure as seen below. If I didn't log withincatch
clauses, compilation succeeded as expected.Expected behavior
Compilation succeeds.
Actual behavior
Compilation fails during class transformation build step:
How to Reproduce?
No response
Output of
uname -a
orver
Darwin C02YK01PLVCG-ML 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)------------------------------------------------------------ Gradle 7.2 ------------------------------------------------------------ Build time: 2021-08-17 09:59:03 UTC Revision: a773786b58bb28710e3dc96c4d1a7063628952ad Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.11 (AdoptOpenJDK 11.0.11+9) OS: Mac OS X 11.5 x86_64
Additional information
No response
The text was updated successfully, but these errors were encountered: