org.artifactory.webapp.servlet.logback.LogbackConfigListener: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext

JFrog JIRA | Radim Kolar | 5 years ago
  1. 0

    1. Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig This can be fixed by removing JAX-RS. Some useful discussion (including custom jboss descriptor) is linked from https://issues.jboss.org/browse/JBAS-8830 After removing JAX-RS from JBOSS it still does not work. Workaround is here - http://stackoverflow.com/questions/9518687/logback-and-jboss-7-dont-work-together 2. 21:39:58,487 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/artifactory]] (MSC service thread 1-16) Exception sending context initialized event to listener instance of class org.artifactory.webapp.servlet.logback.LogbackConfigListener: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext at org.artifactory.webapp.servlet.logback.LogbackConfigListener.getOrInitLoggerContext(LogbackConfigListener.java:89) [artifactory-web-application-2.5.1.1.jar:] at org.artifactory.webapp.servlet.logback.LogbackConfigListener.contextInitialized(LogbackConfigListener.java:71) [artifactory-web-application-2.5.1.1.j You need to write JBOSS deployement descriptor with merged fragments from these 2 discussions. JBOSS 7 will become JBOSS EAP 6.

    JFrog JIRA | 5 years ago | Radim Kolar
    org.artifactory.webapp.servlet.logback.LogbackConfigListener: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
  2. 0

    1. Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.ClassNamesResourceConfig This can be fixed by removing JAX-RS. Some useful discussion (including custom jboss descriptor) is linked from https://issues.jboss.org/browse/JBAS-8830 After removing JAX-RS from JBOSS it still does not work. Workaround is here - http://stackoverflow.com/questions/9518687/logback-and-jboss-7-dont-work-together 2. 21:39:58,487 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/artifactory]] (MSC service thread 1-16) Exception sending context initialized event to listener instance of class org.artifactory.webapp.servlet.logback.LogbackConfigListener: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext at org.artifactory.webapp.servlet.logback.LogbackConfigListener.getOrInitLoggerContext(LogbackConfigListener.java:89) [artifactory-web-application-2.5.1.1.jar:] at org.artifactory.webapp.servlet.logback.LogbackConfigListener.contextInitialized(LogbackConfigListener.java:71) [artifactory-web-application-2.5.1.1.j You need to write JBOSS deployement descriptor with merged fragments from these 2 discussions. JBOSS 7 will become JBOSS EAP 6.

    JFrog JIRA | 5 years ago | Radim Kolar
    org.artifactory.webapp.servlet.logback.LogbackConfigListener: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext

    Root Cause Analysis

    1. org.artifactory.webapp.servlet.logback.LogbackConfigListener

      java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext

      at org.artifactory.webapp.servlet.logback.LogbackConfigListener.getOrInitLoggerContext()
    2. org.artifactory.webapp
      LogbackConfigListener.getOrInitLoggerContext
      1. org.artifactory.webapp.servlet.logback.LogbackConfigListener.getOrInitLoggerContext(LogbackConfigListener.java:89)[artifactory-web-application-2.5.1.1.jar:]
      1 frame