[Lift] Re: conflicting slf4j versions when using M3 with smile
> 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. Ya, I'm pretty sure you're right. I posted there: http://groups.google.com/group/simple-build-tool/browse_thread/thread/4d088713c85dbdb -harryh -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: conflicting slf4j versions when using M3 with smile
On Thu, Mar 4, 2010 at 9:21 PM, harryh 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 lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: conflicting slf4j versions when using M3 with smile
> 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? -harryh -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: conflicting slf4j versions when using M3 with smile
On Thu, Mar 4, 2010 at 8:35 PM, harryh wrote: > OK, did that (like so in sbt): > > override def ivyXML = > > > > > > > I'm also getting this error when running my app from within sbt just > javarebel (possibly this isn't a big issue, but the error is > disconcerting): > > SLF4J: Class path contains multiple SLF4J bindings. > SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/ > lib_managed/compile/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ > StaticLoggerBinder.class] > SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/target/ > webapp/WEB-INF/lib/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ > StaticLoggerBinder.class] > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. I don't know SBT.but is lib_managed/compile a SBT directory containing project dependencies or some internal SBT jars? If the former, it seems sbt puts both the jars from the compile dependencies as well as the jars in WEB-INF/lib on the classpath when running the application. This doesn't seem right (since when you deploy, only the jars in WEB-INF/lib are available).. /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: conflicting slf4j versions when using M3 with smile
On 05/03/10 1:05 AM, harryh wrote: OK, did that (like so in sbt): override def ivyXML = I'm also getting this error when running my app from within sbt just javarebel (possibly this isn't a big issue, but the error is disconcerting): 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. - Indrajit SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/ lib_managed/compile/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/target/ webapp/WEB-INF/lib/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. On Mar 4, 2:33 pm, Indrajit Raychaudhuri wrote: You can modify smile dependency declaration to exclude slf4j-jdk14 as thus: net.lag smile org.slf4j slf4j-jdk14 Or alternately, apply the exclusion of slf4j-log4j12 in the lift-util dependency section if you prefer to use slf4j-jdk14 instead. Cheers, Indrajit On 05/03/10 12:51 AM, harryh wrote: Smile (a scala memcached client) is pulling in slf4j-jdk14-1.5.2.jar, and lift-util is pulling in slf4j-log4j12-1.5.11.jar. What is the best way to deal with this conflict? -harryh -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: conflicting slf4j versions when using M3 with smile
OK, did that (like so in sbt): override def ivyXML = I'm also getting this error when running my app from within sbt just javarebel (possibly this isn't a big issue, but the error is disconcerting): SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/ lib_managed/compile/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/harryh/foursquare.web/target/ webapp/WEB-INF/lib/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/ StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. On Mar 4, 2:33 pm, Indrajit Raychaudhuri wrote: > You can modify smile dependency declaration to exclude slf4j-jdk14 as thus: > > > net.lag > smile > > > org.slf4j > slf4j-jdk14 > > > > > Or alternately, apply the exclusion of slf4j-log4j12 in the lift-util > dependency section if you prefer to use slf4j-jdk14 instead. > > Cheers, Indrajit > > On 05/03/10 12:51 AM, harryh wrote: > > > > > Smile (a scala memcached client) is pulling in slf4j-jdk14-1.5.2.jar, > > and lift-util is pulling in slf4j-log4j12-1.5.11.jar. > > > What is the best way to deal with this conflict? > > > -harryh -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.