Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-07 Thread Ralph Goers
The recommended approach is to do what Spring Boot does - build a jar that has all its dependent jars in a directory. A jar is just a zip file so you can either unzip it before running or have the start up program set the classpath to the directory inside the zip. Of course, that may mean you n

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-07 Thread Alain Désilets
On Thu, Jul 7, 2022 at 6:14 AM Piotr P. Karwasz wrote: > > > The removal of the `Log4j2Plugins.dat` files is exactly the source of > the problem. Log4j2 uses these files to load the list of available > plugins (like the Log4j 1.2 configuration factories), if it does not > find them it falls back

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-07 Thread Piotr P. Karwasz
Hi Alain, On Thu, 7 Jul 2022 at 11:35, Alain Désilets wrote: > If you look at my pom, you can see that there is a filter in the > configuration of the shade plugin that remove the Log4j2Plugins.dat files. > This seems to work because > > jar -tf iutools-core-1.0.2-jar-with-dependencies.jar | grep

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-07 Thread Alain Désilets
Le jeu. 7 juill. 2022, 2 h 54 a.m., Ralph Goers a écrit : > When you run as an uber jar you are most likely breaking things. > > Log4j uses a file named Log4j2Plugins.dat to define its plugins. Every jar > that has Log4j plugins will have one. When you create an uber jar most > likely only one is

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Ralph Goers
When you run as an uber jar you are most likely breaking things. Log4j uses a file named Log4j2Plugins.dat to define its plugins. Every jar that has Log4j plugins will have one. When you create an uber jar most likely only one is left and it probably doesn’t contain the core Log4j stuff. To so

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Alain Désilets
Here is another interesting thing. If I remove the log4j-1.2-api dependency from the pom, then the when I try to build the project from Terminal, I get the following failure: [*ERROR*] */Users/desilets/Documents/GitRepositories/SpikeLog4j2Compatibility/src/main/java/org/examples/HelloWorld.java:

"ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Alain Désilets
I am trying to use log4j2 through log4j-1.2-api in the context of an uber-jar created with the maven shade plugin and am experiencing issues. I wrote a simple HelloWorld class that illustrates the issue. When I run this class through intelliJ, everything works fine. But when I run it through a te