[ 
https://issues.apache.org/jira/browse/SLING-3185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797828#comment-13797828
 ] 

Bertrand Delacretaz commented on SLING-3185:
--------------------------------------------

What happens at startup of my patched launchpad is

{code}
[Loaded org.slf4j.helpers.SubstituteLoggerFactory from 
slinginstall:slf4j-api-1.6.4.jar]

[Loaded ch.qos.logback.classic.LoggerContext from 
slinginstall:org.apache.sling.commons.log-3.0.3-SNAPSHOT.jar]

*ERROR* [FelixStartLevel] ERROR: Error starting 
slinginstall:org.apache.sling.commons.log-3.0.3-SNAPSHOT.jar 
(java.lang.ClassCastException: org.slf4j.helpers.SubstituteLoggerFactory cannot 
be cast to ch.qos.logback.classic.LoggerContext)
  at 
org.apache.sling.commons.log.logback.internal.LogbackManager.<init>(LogbackManager.java:101)
  at 
org.apache.sling.commons.log.logback.internal.Activator.start(Activator.java:55)
{code}

According to Chetan, logback uses its own classloader, that's probably what 
causes the ClassCastException.

Once Sling starts, the commons.log bundle starts without problems.

> Circular dependency between o.a.s.commons.log and slf4j.api
> -----------------------------------------------------------
>
>                 Key: SLING-3185
>                 URL: https://issues.apache.org/jira/browse/SLING-3185
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Log 3.0.0
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> with the initial launchpad runmodes patch of SLING-3155, the 
> org.apache.sling.commons.log bundle does not start initially, due to a 
> circular dependency: 
> commons log imports org.slf4j,version=1.6.4 from slf4j.api
> slf4j.api imports org.slf4j.impl,version=1.6.4 from 
> org.apache.sling.commons.log



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to