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

Robert Munteanu commented on SLING-11906:
-----------------------------------------

As a data point, we have a renovate PR that updates the slf4j-api version in 
the starter ( https://github.com/apache/sling-org-apache-sling-starter/pull/180 
):

{noformat}
diff --git a/pom.xml b/pom.xml
index 0955dd00..6c37dae4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
         <!-- renovate: depName=org.apache.jackrabbit:oak-api -->
         <oak.version>1.52.0</oak.version>
         <!-- renovate: depName=org.slf4j:slf4j-api -->
-        <slf4j.version>1.7.36</slf4j.version>
+        <slf4j.version>2.0.7</slf4j.version>
         <!-- renovate: depName=com.composum.nodes:composum-nodes-commons -->
         <composum.nodes.version>4.2.1</composum.nodes.version>
         <!-- renovate: depName=com.fasterxml.jackson.core:jackson-core -->
{noformat}

It looks like there is at least some fallout, wih many bundles failing to 
resolve

{noformat}[ERROR] [bundle-packages] 
org.apache.jackrabbit:oak-store-document:1.52.0: Bundle is importing packages 
[Package org.slf4j.helpers;version=[1.7,2), Package 
org.slf4j.event;version=[1.7,2)] with start order 15 but no bundle is exporting 
these for that start order in the required version range.
[ERROR] [bundle-packages] org.apache.jackrabbit:oak-commons:1.52.0: Bundle is 
importing package org.slf4j.event;version=[1.7,2) with start order 15 but no 
bundle is exporting these for that start order in the required version range.
[ERROR] [bundle-packages] 
org.apache.felix:org.apache.felix.healthcheck.api:2.0.4: Bundle is importing 
package org.slf4j.helpers;version=[1.7,2) with start order 5 but no bundle is 
exporting these for that start order in the required version range.
[ERROR] [bundle-packages] org.apache.sling:org.apache.sling.hc.api:1.0.4: 
Bundle is importing package org.slf4j.helpers;version=[1.7,2) with start order 
20 but no bundle is exporting these for that start order in the required 
version range.
[ERROR] [bundle-packages] org.apache.sling:org.apache.sling.commons.log:5.4.2: 
Bundle is importing packages [Package org.slf4j.event;version=[1.7,2), Package 
org.slf4j.helpers;version=[1.7,2), Package org.slf4j.spi;version=[1.7,2)] with 
start order 1 but no bundle is exporting these for that start order in the 
required version range.
[ERROR] [bundle-packages] org.apache.jackrabbit:oak-query-spi:1.52.0: Bundle is 
importing package org.slf4j.event;version=[1.7,2) with start order 15 but no 
bundle is exporting these for that start order in the required version range.
[ERROR] [bundle-packages] org.apache.jackrabbit:oak-core:1.52.0: Bundle is 
importing package org.slf4j.event;version=[1.7,2) with start order 15 but no 
bundle is exporting these for that start order in the required version range.
[ERROR] [bundle-packages] org.apache.sling:org.apache.sling.xss:2.2.20: Bundle 
is importing package org.slf4j.helpers;version=[1.7,2) with start order 20 but 
no bundle is exporting these for that start order in the required version range.
[ERROR] [bundle-packages] org.apache.jackrabbit:oak-lucene:1.52.0: Bundle is 
importing package org.slf4j.event;version=[1.7,2) with start order 15 but no 
bundle is exporting these for that start order in the required version range.
{noformat}

and an error that probably needs to be addressed in the commons.log bundle

{noformat}
[ERROR] [requirements-capabilities] org.slf4j:slf4j-api:2.0.7: Artifact 
org.slf4j:slf4j-api:2.0.7 requires [slf4j.api/2.0.7] osgi.serviceloader; 
osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider; 
filter:="(osgi.serviceloader=org.slf4j.spi.SLF4JServiceProvider)" in start 
level 1 but no artifact is providing a matching capability in this start level.
{noformat}

> Migrate to slf4j 2.x
> --------------------
>
>                 Key: SLING-11906
>                 URL: https://issues.apache.org/jira/browse/SLING-11906
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Eric Norman
>            Priority: Major
>             Fix For: Commons Log 6.0.0
>
>
> Increasingly more libraries have been migrating to slf4j 2.x (for example 
> logback 1.3+, tika 2.5+ and jetty 10+)
> To be compatible with those, the sling commons log bundle should migrate to 
> slf4j v2.0.7 (and logback v1.4.7)
> It looks like slf4j 2.x exports both 2.x and 1.7.36 versions of the exported 
> packages, so it should hopefully be compatible with existing bundles that are 
> importing the 1.x version of the slf4j packages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to