On Thu, Mar 4, 2010 at 9:21 PM, harryh <[email protected]> wrote: >> Hmm, slf4j-log4j12-1.5.11.jar ends up being in the classpath twice (from >> /Users/harryh/foursquare.web/lib_managed/compile and >> /Users/harryh/foursquare.web/target/webapp/WEB-INF/lib). >> >> A quick fix would be to apply exclusion of slf4j-log4j12 in lift-util >> declaration. This will prevent having slf4j-log4j12-1.5.11.jar under >> target/webapp/WEB-INF/lib. > > Then I don't get slf4j-log4j12 at all and I get exceptions: > > java.lang.NoClassDefFoundError: org/apache/log4j/Logger > at net.liftweb.util.LogBoot$.net$liftweb$util$LogBoot$ > $_logger(Log.scala:207) > at net.liftweb.util.LogBoot$$anonfun$6.apply(Log.scala:209) > at net.liftweb.util.LogBoot$$anonfun$6.apply(Log.scala:209) > at net.liftweb.util.Log$.rootLogger(Log.scala:85) > at net.liftweb.util.Log$.warn(Log.scala:123) > at net.liftweb.http.LiftServlet.service(LiftServlet.scala:89) > > Maybe this is a weird SBT problem?
Maybe, see my previous reply. But note that SLF4j complained that two slf4j-log4j12 jars are in the classpath, Now you excluded one, but perhaps this also excluded the real log4j.jar (which contains the actual org/apache/log4j/Logger class). This could happen if the slf4j-log4j in lib_managed did not also include the log4j.jar You should be able to run the app by including the log4j dependency, but I don't think this is a real solution as slf4j-log4j12 will probably not be included in the war file if it's not WEB-INF/lib. I tend to think the underlying problem (two slf4j-log4j12 jars on the classpath) is in SBT, so maybe you should ask on the sbt list..... /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
