-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
LogManager error of type FORMAT_FAILURE: Formatting error #35614
Comments
Another observation: two very similar services with similar configuration. One that is NOT reporting the exception prints: 12:39:16 INFO <> [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-envers, hibernate-orm, jdbc-mysql, jdbc-oracle, micrometer, narayana-jta, oidc, oidc-client, oidc-token-propagation-reactive, opentelemetry, rest-client-reactive, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-context-propagation, smallrye-health, smallrye-openapi, vertx] The other that IS reporting the exeption prints: 12:39:15 INFO <> [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-envers, hibernate-orm, jdbc-mysql, jdbc-oracle, micrometer, narayana-jta, oidc, oidc-client, oidc-token-propagation-reactive, opentelemetry, rest-client-reactive, rest-client-reactive-jackson, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-context-propagation, smallrye-health, smallrye-openapi, vertx] The later one is using all extensions from the earlier one but is also adding the following extension: rest-client-reactive-jackson I don't know whether this fact has anything to do with the exception. I'm merely trying to find differences. |
Can you please attach a sample application that exhibits the problematic behavior? Thanks |
In general it's a %s that should be %d or the opposite. |
It's neither %s nor %d in this instance. It's {} when it should be {1} or {2} or similar. It's the java.text.MessageFormat that throws exception. |
I'm getting the same issue thrown by |
We'll really need a sample application that behaves as described so we can debug |
I need only the following <?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>logmanager-error</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.3.1</quarkus.platform.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> |
+1 from me, Quarkus 3.3.1 PS: Sorry for not adding something substantial. |
I could still not reproduce this. It does looks similar to #35638 however... |
@geoand This issue can be reproduced with a combination of
|
Thanks a lot @roman-svystun |
To be clear, it would be easy to overcome the issue mentioned here by simply not using that logging pattern in Quarkus code, but I would first really like to understand why it doesn't work, hence my question above. |
Which library is logging in this way? I saw the message that's failing but not the library which is doing it. To answer your question directly, the numeral-less |
Quarkus source code :) Apparently some folks (it looks like I am included in those people) thought it would work. |
Then I think it's a simple bug. This format style isn't supported. Quarkus source code should generally always just use the |
Gotcha, that's exactly what I wanted to know, thanks |
#35740 takes care of it |
Thanks for quick fix! Could this be included in 3.3.2 ? Just a wish. It's not very important though. The app continues to run despite this. |
It will be backported, yes |
It will be backported but not in 3.3.2 as this ship has sailed yesterday. |
Ah okay, 3.3.3 it is then (if that comes to be) |
Btw. it is just nitpicking, but the message to be logged uses pattern |
Sounds like a great opportunity for a contribution 😉 |
Closes: quarkusio#35614 (cherry picked from commit f2a2516)
Describe the bug
When starting a Quarkus 3.2.4 based app, the following is printed even before the Quarkus banner:
Debugging this reveals that the following message is passed to org.jboss.logmanager.ExtFormatter.formatMessage method:
VertxTracer delegate not set. Will not submit this trace. SpanKind: {}; Request: {}; Operation:{}.
...the logRecord passed to the method is an ExtLogRecord with formatStyle attribute being MESSAGE_FORMAT. Obviously indexes in the placeholders are missing for that formatStyle.
Expected behavior
No formatting exceptions in the early log.
Actual behavior
Like described
How to Reproduce?
Well, the opentelemetry extension is obviously a must, but I haven't established a recipy yet. It might even be a race since some services report this exception and some don't but are otherwise very similarly configured.
Output of
uname -a
orver
openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment (Red_Hat-17.0.7.0.7-1.el9_1) (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-17.0.7.0.7-1.el9_1) (build 17.0.7+7-LTS, mixed mode, sharing)
Output of
java -version
openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment (Red_Hat-17.0.7.0.7-1.el9_1) (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-17.0.7.0.7-1.el9_1) (build 17.0.7+7-LTS, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.2.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Maven home: /home/peter/JavaApps/apache-maven-3 Java version: 17.0.8, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-1.fc38.x86_64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.4.12-200.fc38.x86_64", arch: "amd64", family: "unix"
Additional information
No response
The text was updated successfully, but these errors were encountered: