You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Amitav Mohanty (Jira)" <ji...@apache.org> on 2019/08/25 16:24:00 UTC

[jira] [Commented] (FELIX-6156) Not able to find class in commons-logging bundle

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

Amitav Mohanty commented on FELIX-6156:
---------------------------------------

I have a similar problem I think. I started with embedding of a package as discussed in this [post|[https://stackoverflow.com/questions/57633076/embedding-javassist-dependency-breaks-osgi-bundle?noredirect=1#comment101735707_57633076].] As the dependency on com.sun is optional in the package ([javassist|https://github.com/jboss-javassist/javassist/blob/master/pom.xml]) I am trying to embed, I considered making resolution optional in my bundle. However, I am still getting the problem.

The version I am using is 4.2.1.

> Not able to find class in commons-logging bundle
> ------------------------------------------------
>
>                 Key: FELIX-6156
>                 URL: https://issues.apache.org/jira/browse/FELIX-6156
>             Project: Felix
>          Issue Type: Bug
>            Reporter: uday ogra
>            Priority: Major
>
> I am using commons-jcs-core-2.1 which internally has dependency on commons-logging-1.2. In both the jars I have kept export-package as * and import-package as *;resolution:=optional in their corresponding Manifest.mf.
> When I run the code which uses JCS library I am getting this error:
> Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory not found by commons-jcs-core [3]
>  at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)
>  at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
>  at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>  
> I am not sure why is LogFactory class not visible to JCS code when commons-logging is exporting all the packages.I am starting commons-logging bundle first followed by commons-jcs-core. Any idea what am I missing?



--
This message was sent by Atlassian Jira
(v8.3.2#803003)