SLF4J: Class path c...
 
Notifications
Clear all

SLF4J: Class path contains multiple SLF4J bindings.

11 Posts
5 Users
2 Reactions
3,864 Views
 Nik
(@nik)
Active Member
Joined: 5 years ago
Posts: 22
Topic starter  

Dear Support
any command like "zmprov <anything else>" raises the next messages :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/zextras/lib/jars/carbonio-message-dispatcher-auth.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/zextras/lib/jars/log4j-slf4j-impl-2.20.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/zextras/mailbox/jars/log4j-slf4j-impl-2.20.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

As far as I know these messages are just warrnings, and ewerything is fine.
But is there way to fix it.

I have updated carbonio up to 24.9.0 version.

Best regards.


   
Quote
 Nik
(@nik)
Active Member
Joined: 5 years ago
Posts: 22
Topic starter  

update

The /op/zextras/log/milter.out file contains the same messages as above


   
ReplyQuote
(@luca)
Famed Member
Joined: 5 years ago
Posts: 20
 

Hi Nik!

It looks like you're dealing with multiple SLF4J bindings. This typically happens when there are duplicated SLF4J-related jars on the classpath.

Please try running the autoremove command:

apt autoremove
or
yum autoremove

This should remove unnecessary packages and any duplicated jars, including /opt/zextras/lib/jars/log4j-slf4j-impl-2.20.0.jar, which may resolve the SLF4J conflict.

Let me know if that helps!

Luca


   
ReplyQuote
 Nik
(@nik)
Active Member
Joined: 5 years ago
Posts: 22
Topic starter  

Hi Luca,
Thanks for your reply, but it helped partially.

After "apt autoremove" command :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/zextras/lib/jars/carbonio-message-dispatcher-auth.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/zextras/mailbox/jars/log4j-slf4j-impl-2.20.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

Only one class was removed from the output.

I have Ubuntu 22.04.5 LTS and carbonio 24.9.0

Nik


   
ReplyQuote
(@djpark)
New Member
Joined: 2 years ago
Posts: 13
 

In Carbonio 24.7 before the last Carbonio upgrade to 24.9, there were 115 jar files in /opt/zextras/lib/jars folder including log4j-slf4j-impl-2.20.0.jar file. After upgrade, they are moved to new folder /opt/zextras/mailbox/jars along with many more total 170 jar files. Then there is a new carbonio-message-dispatcher-auth.jar in old lib/jars folder. Both folders are included in classpath within zmjava file. This new jar file also contains /org/slf4j/impl/StaticLoggerBinder.class thus causing the warning.

 

I guess Carbonio didn't set the class dependency correctly when they built the jar file and they have to issue a new update to fix it. I suspect there would be more of such duplicate.

 

Warning is just warning and it won't harm the operation except it is irritating to see them. I removed (renamed) log4j-slf4j-impl-2.20.0.jar file and calling zmprov and zmmailbox stopped giving the warning.


   
Sharif reacted
ReplyQuote
 Nik
(@nik)
Active Member
Joined: 5 years ago
Posts: 22
Topic starter  

@djpark

Hi djpark,
good job, thanks a lot for your help.
Renaming the file you mentioned actually helped.
We will wait for the fix in the official release.

Good luck,
Nik


   
Sharif reacted
ReplyQuote
(@arechick)
New Member
Joined: 2 years ago
Posts: 1
 

hye djpark

I have facing the same problem with Nik. I just want to know how you rename the file since i have tried many time rename the file inside the /opt/zextras/mailbox/jars, its still coming out the warning and forbid the migration of my mailbox user. I also tried rename the file as .bak and suddenly all the migration were failed.now im clueless how to migrate my user mailbox into carbonio.

Please help.


   
ReplyQuote
(@djpark)
New Member
Joined: 2 years ago
Posts: 13
 

I did this way (I do my maintenance as root).

# cd /opt/zextras/mailbox/jars
# mv log4j-slf4j-impl-2.20.0.jar log4j-slf4j-impl-2.20.0.jar..bak

Since the file permission & ownership are "-r--r--r-- root root", you will need to run as "sudo mv" instead of mv.


   
ReplyQuote
(@gailhamilton)
New Member
Joined: 6 days ago
Posts: 3
 

Posted by: @djpark

In Carbonio 24.7 before the last Carbonio upgrade to 24.9, there were 115 jar files in /opt/zextras/lib/jars folder including log4j-slf4j-impl-2.20.0.jar file. After upgrade, they are moved to new folder /opt/zextras/mailbox/jars along with many more total 170 jar files. Then there is a new carbonio-message-dispatcher-auth.jar in old lib/jars folder. Both folders are included in classpath within zmjava file. This new jar file also contains removed link thus causing the warning.

 

I guess Carbonio didn't set the class dependency correctly <a style="color: #000000;" href=" removed link " target="_blank" rel="noopener">TV Garden when they built the jar file and they have to issue a new update to fix it. I suspect there would be more of such duplicate.

 

Warning is just warning and it won't harm the operation except it is irritating to see them. I removed (renamed) log4j-slf4j-impl-2.20.0.jar file and calling zmprov and zmmailbox stopped giving the warning.

Yeah, you’re right—those SLF4J messages are just warnings, not errors, but they do point to a messy classpath where multiple logging bindings are competing. The clean fix is to keep only one binding (usually log4j-slf4j-impl or logback, not both) and remove the extra jars causing duplication, especially the ones bundled in different directories. It’s a bit like browsing something like “TV Garden”—if multiple streams of the same channel start playing at once, it still works, but the experience gets noisy and confusing, so trimming it down to a single source makes everything smoother and more predictable.

 


   
ReplyQuote
(@gailhamilton)
New Member
Joined: 6 days ago
Posts: 3
 

Messages indicate a cluttered classpath where several logging bindings are competing, but they are merely warnings and not errors. Keeping just one binding and eliminating the additional jars that are creating duplication—especially those wrapped in various directories—is the straightforward answer.


   
ReplyQuote
(@gailhamilton)
New Member
Joined: 6 days ago
Posts: 3
 

Though they are only warnings and not errors, they show a congested classpath where several logging bindings are contending. The simple solution is to keep only one binding and remove the other jars that are causing duplication, especially those packaged in different directories...


   
ReplyQuote