<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.2.2.v20140723</version> <configuration> <httpConnector> <!--host>localhost</host--> <port>${jetty.http.port}</port> </httpConnector> <webApp> <contextPath>/bc</contextPath> </webApp> <webAppSourceDirectory> ${project.basedir}/src/main/webapp </webAppSourceDirectory> <scanIntervalSeconds>0</scanIntervalSeconds> <reload>manual</reload> <systemProperties> <systemProperty> <name>logback.configurationFile</name> <value>./src/main/resources/logback.xml</value> </systemProperty> </systemProperties> </configuration> <dependencies> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.3</version> </dependency> </dependencies></plugin>
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
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 org/codehaus/plexus/classworlds/realm/ClassRealm) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't use maven but maybe this link will help track down the warning you get about multiple matchesHope it helps.Also, do you have to use maven? There is a lot of sample Lift projects with logging, but based on sbt, and as long as you don't want to do black magic with it, it's pretty simple to get going.ThanksDiego
Thanks Matt, normally “provided" is what I’d set it to and supply the file via jetty maven plugin. I will check how to manually add with a maven based project and give it a try.
Also note that for other jetty based project this works, it’s only lift web project that doesn’t work while in dev environment.
Somehow, I think "org/codehaus/plexus/classworlds/realm/ClassRealm” is at play.
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
<scope>provided</scope>
</dependency>
<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.2.2.v20140723</version> <configuration> <httpConnector>
<port>${jetty.http.port}</port> </httpConnector> <webApp> <contextPath>/bc</contextPath> </webApp> <webAppSourceDirectory> ${project.basedir}/src/main/webapp </webAppSourceDirectory> <scanIntervalSeconds>0</scanIntervalSeconds> <reload>manual</reload> <systemProperties> <systemProperty> <name>logback.configurationFile</name> <value>./src/main/resources/logback.xml</value> </systemProperty> </systemProperties> </configuration> <dependencies> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version> </dependency> </dependencies></plugin>
SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/Users/colinbes/coding/AdvancedBioWS/biocharger-cloud/src/main/webapp/WEB-INF/lib/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/Users/colinbes/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.2.10.v20150310:run (default-cli) on project web-application: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.2.10.v20150310:run failed: An API incompatibility was encountered while executing org.eclipse.jetty:jetty-maven-plugin:9.2.10.v20150310:run: 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 org/codehaus/plexus/classworlds/realm/ClassRealm) for resolved class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type LoggerFactory; used in the signature
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.jetty:jetty-maven-plugin:9.2.10.v20150310
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/colinbes/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.2.10.v20150310/jetty-maven-plugin-9.2.10.v20150310.jar
[ERROR] urls[1] = file:/Users/colinbes/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar
[ERROR] urls[2] = file:/Users/colinbes/.m2/repository/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar
[ERROR] urls[3] = file:/Users/colinbes/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[4] = file:/Users/colinbes/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[5] = file:/Users/colinbes/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[6] = file:/Users/colinbes/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[7] = file:/Users/colinbes/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[8] = file:/Users/colinbes/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[9] = file:/Users/colinbes/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[10] = file:/Users/colinbes/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[11] = file:/Users/colinbes/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.1/maven-plugin-tools-api-3.1.jar
[ERROR] urls[12] = file:/Users/colinbes/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[13] = file:/Users/colinbes/.m2/repository/org/eclipse/jetty/jetty-util/9.2.10.v20150310/jetty-util-9.2.10.v20150310.jar
[ERROR] urls[14] = file:/Users/colinbes/.m2/repository/org/eclipse/jetty/jetty-webapp/9.2.10.v20150310/jetty-webapp-9.2.10.v20150310.jar
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/kfGNW9FoM8Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
That would make sense except that in my case I am serving several web apps from one jetty instance and have the logback-classic jar file in lib/ext. I need no logback-classic (and it’s dependencies) in my war file (which is purpose of scope=provided, but then dev breaks as discussed).
If logbook-classic is a regular dependency then it will complain of multiple bindings - one in ext directory and other in war file.
If I was only serving one web application I wouldn’t add .jar file to lib/ext but seeing as there are several web apps (war files) for one jetty instance I prefer having fixed dependency and managed by jetty install and not by one of the war files.
--
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.