Multiple versions of logback in my classpath
Tom Zeller
tzeller at dragonacea.biz
Wed Aug 17 14:20:46 EDT 2016
> 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.
More information about the users
mailing list