Multiple versions of logback in my classpath

Wessel, Keith kwessel at illinois.edu
Wed Aug 17 14:34:32 EDT 2016


I mentioned earlier that, when I remove logback-classic-1.1.3.jar from $JETTY_BASE/lib/logging, I get noise from Jetty on start-up. Jetty.sh start gives me:

Starting Jetty: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Jetty still starts, though.

I'm wondering if I have something else in my $JETTY_BASE/lib/logging that's causing problems or if our versions of logback.xml for Jetty are slightly different. Aside from logback-classic which I removed, $JETTY_BASE/lib/logging contains logback-core and logback-access, both V1.1.3, as well as jcl-over-slf4j-1.7.12.jar and slf4j-api-1.7.12.jar.

Does any of that belong there?

Keith

-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Tom Zeller
Sent: Wednesday, August 17, 2016 1:21 PM
To: Shib Users <users at shibboleth.net>
Subject: Re: Multiple versions of logback in my classpath


> I was a bit surprised, too, that the IDP wouldn't start when I removed logback-classic from the war.

The IdP’s LogbackLoggingService is dependent on Logback (logback-classic specifically), it might be possible to abstract that out to SLF4J, not sure.

> I get the following in jetty.log when I remove the one from $IDP_HOME/webapp/lib and rebuild the war:
> 
> 11:02:28.201 - WARN [org.eclipse.jetty.deploy.DeploymentManager:506] - Unable to reach node goal: started
> java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature

Hmm, I get a NoClassDefFoundError instead, but I’m probably not doing things exactly the same way you are.

But what works for me is removing logback-classic from $jetty.base/lib/logging/, I don’t think it should be there, and that also removes the "SLF4J: Class path contains multiple SLF4J bindings” warning, at least for me.
-- 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list