You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2010/03/17 10:50:27 UTC

[jira] Created: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

HttpCore OSGi bundle should not import the org.apache.http.* package
--------------------------------------------------------------------

                 Key: HTTPCORE-222
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
            Reporter: Willem Jiang


Current http-core-osgi OSGi META-INF has these import package, 
{code}
Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
 .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
 che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
 .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
 odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
 g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
 4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
 n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
 params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
 pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
 ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
 version="4.1",org.apache.http.util;version="4.1"
{code}
when you install the bundle, the OSGi container will complain the error about
" can't resolve the package xxx".
If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
some strange error will happen, as the bundle didn't import itself.
So we need to avoid the bundle import itself, and it's important to support 
install the multi-version of http-core-osgi.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847215#action_12847215 ] 

Willem Jiang commented on HTTPCORE-222:
---------------------------------------

Hi Oleg,
I think it should be OK, as we wrap bundles for ServiceMix in this way for about more than half a year, no one complain about it.

> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846887#action_12846887 ] 

Willem Jiang commented on HTTPCORE-222:
---------------------------------------

I think the [Felix FAQ|http://felix.apache.org/site/apache-felix-osgi-faq.html#ApacheFelixOSGiFAQ-importandexport] is updated.
As a library,  I think HTTP-CORE should not import its exported package.


> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846898#action_12846898 ] 

Oleg Kalnichevski commented on HTTPCORE-222:
--------------------------------------------

Willem

I must admit I know next to nothing about OSGi. If you think the Ignore-Package section is not a problem, I'll happily commit your patch.

Oleg

> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846384#action_12846384 ] 

Oleg Kalnichevski commented on HTTPCORE-222:
--------------------------------------------

Very bizarre. Version 4.1 is not referenced anywhere in the pom. I have no idea why Felix bundle plugin generates those entries in the first place. This looks awfully like a bug in the bundle plugin to me. 

Your patch fixes the problem with bogus imports, However, all those packages get listed in the Ignore-Package section of the manifest.
{code}
Ignore-Package: org.apache.http.impl.entity,org.apache.http.message,or
 g.apache.http.io,org.apache.http.impl.nio,org.apache.http.protocol,or
 g.apache.http.impl.io,org.apache.http.impl,org.apache.http.params,org
 .apache.http.entity,org.apache.http.impl.nio.codecs,org.apache.http.i
 mpl.nio.reactor,org.apache.http.impl.nio.ssl,org.apache.http.nio.util
 ,org.apache.http.nio,org.apache.http.nio.params,org.apache.http.nio.r
 eactor,org.apache.http.nio.protocol,org.apache.http.util,org.apache.h
 ttp.nio.entity,org.apache.http
{code}
I do not know if this is harmless or if could lead to some other side effects. 

I will try to contact Felix folks and see what their opinion on the problem is.

Oleg

> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-222.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1-beta1
                   4.0.2

Patch checked in to SVN trunk and 4.0.x branch. Many thanks, Willem, for contributing it.

Oleg

> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>             Fix For: 4.0.2, 4.1-beta1
>
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-222) HttpCore OSGi bundle should not import the org.apache.http.* package

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated HTTPCORE-222:
----------------------------------

    Attachment: httpcore-osgi.patch

Submitted a patch for it based on the trunk code. 
It should be great if the patch merge to 4.0.x branch.

> HttpCore OSGi bundle should not import the org.apache.http.* package
> --------------------------------------------------------------------
>
>                 Key: HTTPCORE-222
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-222
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>            Reporter: Willem Jiang
>         Attachments: httpcore-osgi.patch
>
>
> Current http-core-osgi OSGi META-INF has these import package, 
> {code}
> Import-Package: javax.net.ssl,org.apache.http;version="4.1",org.apache
>  .http.entity;version="4.1",org.apache.http.impl;version="4.1",org.apa
>  che.http.impl.entity;version="4.1",org.apache.http.impl.io;version="4
>  .1",org.apache.http.impl.nio;version="4.1",org.apache.http.impl.nio.c
>  odecs;version="4.1",org.apache.http.impl.nio.reactor;version="4.1",or
>  g.apache.http.impl.nio.ssl;version="4.1",org.apache.http.io;version="
>  4.1",org.apache.http.message;version="4.1",org.apache.http.nio;versio
>  n="4.1",org.apache.http.nio.entity;version="4.1",org.apache.http.nio.
>  params;version="4.1",org.apache.http.nio.protocol;version="4.1",org.a
>  pache.http.nio.reactor;version="4.1",org.apache.http.nio.util;version
>  ="4.1",org.apache.http.params;version="4.1",org.apache.http.protocol;
>  version="4.1",org.apache.http.util;version="4.1"
> {code}
> when you install the bundle, the OSGi container will complain the error about
> " can't resolve the package xxx".
> If there is a http-core-osgi 4.1 bundle installed in the OSGI container, 
> some strange error will happen, as the bundle didn't import itself.
> So we need to avoid the bundle import itself, and it's important to support 
> install the multi-version of http-core-osgi.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org