|Re: [jetty-users] Embedded Jetty + Logging - cannot log to file|
Still not working.
I had added a Log4jConfigListener to my web.xml because I'd read somewhere that was how to get my log4j.xml imported into the app. I removed that. I also removed the JDK logging and changed to ch.qos.logback.
Now I'm getting errors like this:
Exception in thread "main" 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 resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature
I opened a question (and now with a bounty) summarizing all this on StackOverflow here: http://stackoverflow.com/questions/26041712/cannot-get-logging-to-work-right-with-embedded-jetty?noredirect=1#comment40879112_26041712
I would greatly appreciate anybody who can help me get this working. And there's a 50 XP in it on SO.
From: jetty-users-bounces@xxxxxxxxxxx [jetty-users-bounces@xxxxxxxxxxx] on behalf of Joakim Erdfelt [joakim@xxxxxxxxxxx]
Sent: Wednesday, September 24, 2014 11:45 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] Embedded Jetty + Logging - cannot log to file
That log4j error appears to be from an expected spring configuration you have.
You should look into that, it might be a something discovering log4j on the classpath (possibly in your mexp.jar) or from a forced configuration telling spring to always assume/start log4j based logging.
Either way, you have to clean up your classpath and make sure that mexp.jar has no duplicates of classes from other jars.
Mixing fat/uber jars with normal jars is possible, but rarely done, as it requires an intimate knowledge of everything in the fat/uber jar.
On Wed, Sep 24, 2014 at 8:35 AM, Dunn, Barclay <Barclay.Dunn@xxxxxxxxxx> wrote:
Back to the top