You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Christoph Läubrich (Jira)" <ji...@apache.org> on 2025/01/23 09:51:00 UTC
[jira] [Commented] (LOGGING-198) The export package of org.apache.commons.logging is missing a use clause
[ https://issues.apache.org/jira/browse/LOGGING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916339#comment-17916339 ]
Christoph Läubrich commented on LOGGING-198:
--------------------------------------------
The 1.2 version has sadly the same issue, would it be possible to have a bugfix release for that one as well?
> The export package of org.apache.commons.logging is missing a use clause
> ------------------------------------------------------------------------
>
> Key: LOGGING-198
> URL: https://issues.apache.org/jira/browse/LOGGING-198
> Project: Commons Logging
> Issue Type: Improvement
> Reporter: Christoph Läubrich
> Priority: Major
>
> Currently the manifest of org.apache.commons.logging look like this:
> {code}
> Export-Package org.apache.commons.logging.impl;version="1.3.4"
> org.apache.commons.logging;version="1.3.4"
> {code}
> This tells the OSGi resolver that logging and logging.impl are independent packages (e.g. has no references to each other).
> This seems highly unlikely and we have an example where this is causing classpath issues.
> {code}Caused by: java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'org.apache.commons.logging.LogFactory'. {code}
> To prevent the issue, the export package should contain use clauses, at the minimum {code}uses:="org.apache.commons.logging,org.apache.log,org.apache.log4j"{code} but there could be more used by the impl!
> {code}
> Export-Package org.apache.commons.logging.impl;version="1.3.4";uses:="org.apache.commons.logging,org.apache.log,org.apache.log4j"
> org.apache.commons.logging;version="1.3.4"
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)