In a project using maven,
I have the same issue as described in log4j2 ERROR StatusLogger Unrecognized conversion specifier. But the problem persist even after implementing both solutions described in the answer to that question. i.e. exclude Log4jPlugins.dat and use the manifest transformer plugin for log4j.
Moreover I can confirm that the Jar file does not contain a file name Log4j2Plugins.dat nor under META-INF nor anywhere else in the jar tree structure.
Error message:
2024-06-22T00:41:49.937Z main ERROR Unrecognized format specifier [d] 2024-06-22T00:41:49.952Z main ERROR Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. 2024-06-22T00:41:49.953Z main ERROR Unrecognized format specifier [thread] 2024-06-22T00:41:49.953Z main ERROR Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern. 2024-06-22T00:41:49.954Z main ERROR Unrecognized format specifier [level] 2024-06-22T00:41:49.954Z main ERROR Unrecognized conversion specifier [level] starting at position 35 in conversion pattern. 2024-06-22T00:41:49.954Z main ERROR Unrecognized format specifier [logger] 2024-06-22T00:41:49.954Z main ERROR Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern. 2024-06-22T00:41:49.955Z main ERROR Unrecognized format specifier [msg] 2024-06-22T00:41:49.955Z main ERROR Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern. 2024-06-22T00:41:49.955Z main ERROR Unrecognized format specifier [n] 2024-06-22T00:41:49.956Z main ERROR Unrecognized conversion specifier [n] starting at position 56 in conversion pattern. 2024-06-22T00:41:49.964Z main ERROR Unrecognized format specifier [d] 2024-06-22T00:41:49.964Z main ERROR Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. 2024-06-22T00:41:49.964Z main ERROR Unrecognized format specifier [thread] 2024-06-22T00:41:49.965Z main ERROR Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern. 2024-06-22T00:41:49.965Z main ERROR Unrecognized format specifier [level] 2024-06-22T00:41:49.965Z main ERROR Unrecognized conversion specifier [level] starting at position 35 in conversion pattern. 2024-06-22T00:41:49.965Z main ERROR Unrecognized format specifier [logger] 2024-06-22T00:41:49.965Z main ERROR Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern. 2024-06-22T00:41:49.965Z main ERROR Unrecognized format specifier [msg] 2024-06-22T00:41:49.965Z main ERROR Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern. 2024-06-22T00:41:49.965Z main ERROR Unrecognized format specifier [n] 2024-06-22T00:41:49.966Z main ERROR Unrecognized conversion specifier [n] starting at position 56 in conversion pattern. 2024-06-22T00:41:51.876Z main ERROR Unrecognized format specifier [p] 2024-06-22T00:41:51.876Z main ERROR Unrecognized conversion specifier [p] starting at position 4 in conversion pattern. 2024-06-22T00:41:51.877Z main ERROR Unrecognized format specifier [d] 2024-06-22T00:41:51.877Z main ERROR Unrecognized conversion specifier [d] starting at position 21 in conversion pattern. 2024-06-22T00:41:51.877Z main ERROR Unrecognized format specifier [C] 2024-06-22T00:41:51.877Z main ERROR Unrecognized conversion specifier [C] starting at position 27 in conversion pattern. 2024-06-22T00:41:51.877Z main ERROR Unrecognized format specifier [m] 2024-06-22T00:41:51.877Z main ERROR Unrecognized conversion specifier [m] starting at position 32 in conversion pattern. 2024-06-22T00:41:51.877Z main ERROR Unrecognized format specifier [n] 2024-06-22T00:41:51.877Z main ERROR Unrecognized conversion specifier [n] starting at position 35 in conversion pattern.
Extract from relevant maven pom:
plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>package-jar</id>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<excludes>
<exclude>org.broadinstitute.gatk:gsalib:tar.gz:*</exclude>
<exclude>org.broadinstitute.gatk:*:tar.bz2:example-resources</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/services/javax.annotation.processing.Processor</exclude>
<exclude>**/Log4j2Plugins.dat</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
<Main-Class>${app.main.class}</Main-Class>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>${resource.bundle.path}</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>