Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5510

Maven causing ClassCastException with container plugins when project is using other SLF4J implementation than slf4j-simple

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.1.0
    • None
    • Bootstrap & Build, Logging
    • None

    Description

      On our project we're using directly logback to start up a custom mbean to be able to change log levels dynamically, among other things. Most of these operations are Logback-specific, they're not available via SLF4J API

      For testing we use Jetty, so when we're doing an mvn jetty:run, the mbean gets init'd and we get an Exception stating "ClassCastException: org.slf4j.impl.SimpleLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext", due to slf4j-simple being on maven's lib. This is very likely to happen with other container plugins (tomcat7 et al)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              juanpablo Juan Pablo Santos Rodríguez
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: