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

Dmitry Konstantinov commented on LOG4J2-1976:
---------------------------------------------

yes, it would be better. As I got there was no functional reason (like some new 
OSGi API is needed to use in log4j2 itself) to update the version. For such 
externally provided dependencies it is better to keep them with a minimal 
required version, increasing version to the latest one for OSGi framework API 
limits re-usability for log4j2 library. It may be a non-trivial task to update 
OSGi core/container and related libraries only to install an updated log4j2.

For example, the latest versions of log4j JARs (starting since 2.9.0) cannot be 
deployed as OSGi bundles to Apache Karaf 3.0.x container:
{code:java}
2018-03-11 16:24:29,013 | WARN  | raf-3.0.9/deploy | fileinstall | 7 - 
org.apache.felix.fileinstall - 3.5.2 | Error while starting bundle: 
file:/Users/test/apache-karaf-3.0.9/deploy/log4j-api-2.10.0.jar
org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.logging.log4j.api [64]: Unable to resolve 64.0: missing requirement 
[64.0] osgi.wiring.package; 
(&(osgi.wiring.package=org.osgi.framework)(version>=1.8.0)(!(version>=2.0.0)))
        at 
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)[org.apache.felix.framework-4.2.1.jar:]
        at 
org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]
        at 
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1243)[7:org.apache.felix.fileinstall:3.5.2]
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1215)[7:org.apache.felix.fileinstall:3.5.2]
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:506)[7:org.apache.felix.fileinstall:3.5.2]
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:355)[7:org.apache.felix.fileinstall:3.5.2]
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:307)[7:org.apache.felix.fileinstall:3.5.2]
{code}

> Update org.osgi.core from 4.3.1 to 6.0.0
> ----------------------------------------
>
>                 Key: LOG4J2-1976
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1976
>             Project: Log4j 2
>          Issue Type: Task
>          Components: OSGi
>            Reporter: Gary Gregory
>            Priority: Major
>             Fix For: 2.9.0
>
>
> Update org.osgi.core from 4.3.1 to 6.0.0. Update test dependencies as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to