SLF4J: Class path c...
 
Notifications
Clear all

SLF4J: Class path contains multiple SLF4J bindings.

8 Posts
4 Users
2 Reactions
119 Views
 Nik
(@nik)
Joined: 3 years ago
Posts: 16
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)
Joined: 3 years ago
Posts: 16
Topic starter  

update

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


   
ReplyQuote
(@luca)
Joined: 4 years ago
Posts: 14
 

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)
Joined: 3 years ago
Posts: 16
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)
Joined: 10 months ago
Posts: 7
 

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.


   
ReplyQuote
 Nik
(@nik)
Joined: 3 years ago
Posts: 16
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


   
ReplyQuote
(@arechick)
Joined: 7 days 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)
Joined: 10 months ago
Posts: 7
 

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