Closed janskwr closed 11 months ago
Hi! It seems to be a conflict of log4j2 versions. Can you check which versions of log4j2 are on your classpath?
It seems that this is due to issue described here: https://stackoverflow.com/a/40389834.
Tjahzi is built against log4j2 2.17.2. If you use log4j2 2.6 then these two are not compatible. I don't see how this could be resolved on the library side, you should probably upgrade Spring Boot and or log4j2 dependency.
Firstly, thank you so much for responding. I forgot to look inside parent's pom.xml
(new to Java). I'm using versions:
2.7
version of log4j2
1.5.22.RELEASE
of spring-boot-starter-log4j2
0.9.17
of log4j2-appender-nodep
1.5.19.RELEASE
of spring bootAccording to the stackoverflow link you provided, everything should work fine I guess, but I'm getting this error anyway. Is Tjahzi
compatible with log4j2
version 2.7
?
That makes sense. The 0.9.17
version of Tjahzi is very old and it indeed used log4j2 2.6
. It uses log4j2 2.7
since version 0.9.20
while current version of Tjahzi is 0.9.31
. Please upgrade to newest version and it should work correctly.
Unfortunately, it didn't help. I'm getting the same error (tried 0.9.20
version and 0.9.31
version).
Are you using maven to build your app? If yes then can you paste the output of mvn dependency:tree
?
Yes, I'm using Maven. Actually, I'm working at the Big Tech company, and it would probably be considered as a data leakage. I can send some fragments, though. What parts of mvn dependency:tree
would you like to see?
Sure, I am only looking for lines containing log4j2
or tjahzi
with associated versions. In case something is fishy you might spot it yourself, otherwise it should help pinpointing the issue.
Thanks for help!
Tjahzi:
[INFO] +- pl.tkowalcz.tjahzi:log4j2-appender-nodep:jar:0.9.20:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.7:compile
Log4j2:
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:2.7.9:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.7:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.7:compile
[INFO] | +- org.apache.logging.log4j:log4j-jul:jar:2.7:compile
[INFO] | \- org.slf4j:jul-to-slf4j:jar:1.7.26:compile
Let me know if you spot something! I will try to resolve it today using trial-and-error method :))
Were you able to fixe the issue? I created a simple project with dependencies that you use and it seems to work correctly.
Hi! I'm encountering the following issue in my project:
I've attempted to diagnose and resolve this issue, but I'm currently unable to find a solution (not a Java user though :c). If you have any suggestions, workarounds, or similar experiences, please share them. Thanks in advance!