[
https://issues.apache.org/jira/browse/LOGGING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved LOGGING-198.
-------------------------------------
Fix Version/s: 1.3.5
Resolution: Fixed
> 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
> Fix For: 1.3.5
>
>
> 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)