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

Morten Christensen commented on HTTPCLIENT-1389:
------------------------------------------------

This that my bug report mentioned that the resources in question (incl. 
JavaMail API) are optional. When installed using OBR they get installed 
automatically too, unlike your example. If it is not a part of the manifiest, 
there must be something magic going on in the activator as you can see below:

obr:deploy "Apache HttpClient OSGi bundle"
Target resource(s):
-------------------
   Apache HttpClient OSGi bundle (4.2.5)

Required resource(s):
---------------------
   Commons Logging (1.1.2)

Optional resource(s):
---------------------
   JavaMail API (1.4.2)
   Apache Felix Http Bundle (2.0.4)
   slf4j-jdk14 (1.7.5)
   Apache Log4j (1.2.17)
   osgi.cmpn (4.2.0.200908310645)
   slf4j-api (1.7.5)
   osgi.core (5.0.0.201203141902) 
                
> HttpClient OSGi bundle (4.2.5)'s included JavaMail API bundle will not 
> resolve (should not depend hard on sun.* classes)
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1389
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1389
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.2.5
>         Environment: Felix 4.2.1 command shell
>            Reporter: Morten Christensen
>
> If I add the httpclient-osgi-4.2.5.jar and httpcore-4.2.5.jar in felix 
> console, I get various dependencies installed too like slf4j-jdk14, JavaMail 
> API etc. The JavaMail API bundle will not start (resolve) however, as it 
> illegally has a hard (non-optional) dependency on a sun.* internal class 
> ("sun.security.util"). This in turn gives problems when starting subsequent 
> plugins that depend on HttpClient which gets an exception.
> Session details here:
> obr:deploy "Apache HttpCore OSGi bundle"
> obr:deploy "Apache HttpClient OSGi bundle"
> Target resource(s):
> -------------------
>    Apache HttpClient OSGi bundle (4.2.5)
> Required resource(s):
> ---------------------
>    Commons Logging (1.1.2)
> Optional resource(s):
> ---------------------
>    JavaMail API (1.4.2)
>    Apache Felix Http Bundle (2.0.4)
>    slf4j-jdk14 (1.7.5)
>    Apache Log4j (1.2.17)
>    osgi.cmpn (4.2.0.200908310645)
>    slf4j-api (1.7.5)
>    osgi.core (5.0.0.201203141902)
> ...
> felix:lb
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (4.2.1)
>     1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
>     2|Active     |    1|Apache Felix Gogo Command (0.12.0)
>     3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
>     4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>     5|Active     |    1|Apache HttpCore OSGi bundle (4.2.4)
>     6|Resolved   |    1|Apache Felix Http Bundle (2.0.4)
>     7|Installed  |    1|JavaMail API (1.4.2)
>     8|Resolved   |    1|slf4j-jdk14 (1.7.5)
>     9|Resolved   |    1|Apache Log4j (1.2.17)
>    10|Resolved   |    1|osgi.cmpn (4.2.0.200908310645)
>    11|Active     |    1|Apache HttpClient OSGi bundle (4.2.5)
>    12|Resolved   |    1|slf4j-api (1.7.5)
>    13|Resolved   |    1|osgi.core (5.0.0.201203141902)
>    14|Resolved   |    1|Commons Logging (1.1.2)
> felix:start 7
> org.osgi.framework.BundleException: Unresolved constraint in bundle 
> javax.mail.mail [7]: Unable to resolve 7.0: missing requirement [7.0] 
> osgi.wiring.package; (osgi.wiring.package=sun.security.util)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to