You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@gmail.com> on 2011/06/11 09:50:18 UTC

[all] OSGI bundle info - WAS [jira] [Created] (DBCP-363) dbcp bundle should use DynamicImport

This is over my head.  For all I know this may apply to all of our
components, since I think the metadata comes from Commons Parent. 
Can someone knowledgeable in OSGI please have a look and comment on
the ticket and post back here if there is something we need to
change in Commons Parent?

Thanks!

Phil

-------- Original Message --------
Subject: 	[jira] [Created] (DBCP-363) dbcp bundle should use
DynamicImport
Date: 	Thu, 9 Jun 2011 18:41:58 +0000 (UTC)
From: 	Felix Mayerhuber (JIRA) <ji...@apache.org>
Reply-To: 	issues@commons.apache.org
To: 	issues@commons.apache.org



dbcp bundle should use DynamicImport
------------------------------------

                 Key: DBCP-363
                 URL: https://issues.apache.org/jira/browse/DBCP-363
             Project: Commons Dbcp
          Issue Type: Bug
    Affects Versions: 1.4, 1.3
            Reporter: Felix Mayerhuber


The bundle provided in the maven central of the commons.dbcp doesn't have a DynamicImport defined. This resolves in following error:
If you want to use a BasicDataSource class as dataSource and the class is provided by the osgi environment (equinox, ...) the dataSource is not able to be created due to a ClassNotFoundException. If the bundle would have set DynamicImport it works. (I had to change from your bundle to the commons.dbcp bundle provided by servicemix, because there the DynamicImport is set)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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


Re: [all] OSGI bundle info - WAS [jira] [Created] (DBCP-363) dbcp bundle should use DynamicImport

Posted by Niall Pemberton <ni...@gmail.com>.
On Tue, Jun 14, 2011 at 12:04 AM, Niall Pemberton
<ni...@gmail.com> wrote:
> On Sat, Jun 11, 2011 at 8:50 AM, Phil Steitz <ph...@gmail.com> wrote:
>> This is over my head.  For all I know this may apply to all of our
>> components, since I think the metadata comes from Commons Parent.
>> Can someone knowledgeable in OSGI please have a look and comment on
>> the ticket and post back here if there is something we need to
>> change in Commons Parent?
>
> Sorry I don't have an answer for you, but I have a couple of comments:
>
> In the past I've asked for advice on the Felix lists and they've been
> very helpful. So if no one shows up to reply here, then you might try
> that.
>
>    http://felix.apache.org/site/mailinglists.html
>
> It seems from the two comments on the ticket that theres disagreement
> on how this should be fixed - but if it does turn out that DBCP needs
> to configure the maven-bundle-plugin in a slightly different way than
> the default provided in commons-parent, then all the default OSGI
> "instructions" for the maven-bundle-plugin can be overriden (including
> DynamicImport) in DBCP's pom.xml using properties.
>
> So for example, if you look at the commons-chain pom.xml[1] it
> excludes javax.portlet from the<Import-Package> instruction and
> includes it in the <DynamicImport-Package> instruction:
>
>    <properties>
>        <commons.osgi.import>!javax.portlet,*</commons.osgi.import>
>        <commons.osgi.dynamicImport>javax.portlet</commons.osgi.dynamicImport>
>    </properties>

Sorry, wrong URL - chain pom is here:
http://svn.apache.org/repos/asf/commons/proper/chain/trunk/pom.xml

> Niall
>
> [1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/trunk/pom.xml
>
>> Thanks!
>>
>> Phil
>>
>> -------- Original Message --------
>> Subject:        [jira] [Created] (DBCP-363) dbcp bundle should use
>> DynamicImport
>> Date:   Thu, 9 Jun 2011 18:41:58 +0000 (UTC)
>> From:   Felix Mayerhuber (JIRA) <ji...@apache.org>
>> Reply-To:       issues@commons.apache.org
>> To:     issues@commons.apache.org
>>
>>
>>
>> dbcp bundle should use DynamicImport
>> ------------------------------------
>>
>>                 Key: DBCP-363
>>                 URL: https://issues.apache.org/jira/browse/DBCP-363
>>             Project: Commons Dbcp
>>          Issue Type: Bug
>>    Affects Versions: 1.4, 1.3
>>            Reporter: Felix Mayerhuber
>>
>>
>> The bundle provided in the maven central of the commons.dbcp doesn't have a DynamicImport defined. This resolves in following error:
>> If you want to use a BasicDataSource class as dataSource and the class is provided by the osgi environment (equinox, ...) the dataSource is not able to be created due to a ClassNotFoundException. If the bundle would have set DynamicImport it works. (I had to change from your bundle to the commons.dbcp bundle provided by servicemix, because there the DynamicImport is set)
>>
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>

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


Re: [all] OSGI bundle info - WAS [jira] [Created] (DBCP-363) dbcp bundle should use DynamicImport

Posted by Niall Pemberton <ni...@gmail.com>.
On Sat, Jun 11, 2011 at 8:50 AM, Phil Steitz <ph...@gmail.com> wrote:
> This is over my head.  For all I know this may apply to all of our
> components, since I think the metadata comes from Commons Parent.
> Can someone knowledgeable in OSGI please have a look and comment on
> the ticket and post back here if there is something we need to
> change in Commons Parent?

Sorry I don't have an answer for you, but I have a couple of comments:

In the past I've asked for advice on the Felix lists and they've been
very helpful. So if no one shows up to reply here, then you might try
that.

    http://felix.apache.org/site/mailinglists.html

It seems from the two comments on the ticket that theres disagreement
on how this should be fixed - but if it does turn out that DBCP needs
to configure the maven-bundle-plugin in a slightly different way than
the default provided in commons-parent, then all the default OSGI
"instructions" for the maven-bundle-plugin can be overriden (including
DynamicImport) in DBCP's pom.xml using properties.

So for example, if you look at the commons-chain pom.xml[1] it
excludes javax.portlet from the<Import-Package> instruction and
includes it in the <DynamicImport-Package> instruction:

    <properties>
        <commons.osgi.import>!javax.portlet,*</commons.osgi.import>
        <commons.osgi.dynamicImport>javax.portlet</commons.osgi.dynamicImport>
    </properties>

Niall

[1] http://svn.apache.org/repos/asf/commons/proper/commons-parent/trunk/pom.xml

> Thanks!
>
> Phil
>
> -------- Original Message --------
> Subject:        [jira] [Created] (DBCP-363) dbcp bundle should use
> DynamicImport
> Date:   Thu, 9 Jun 2011 18:41:58 +0000 (UTC)
> From:   Felix Mayerhuber (JIRA) <ji...@apache.org>
> Reply-To:       issues@commons.apache.org
> To:     issues@commons.apache.org
>
>
>
> dbcp bundle should use DynamicImport
> ------------------------------------
>
>                 Key: DBCP-363
>                 URL: https://issues.apache.org/jira/browse/DBCP-363
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.4, 1.3
>            Reporter: Felix Mayerhuber
>
>
> The bundle provided in the maven central of the commons.dbcp doesn't have a DynamicImport defined. This resolves in following error:
> If you want to use a BasicDataSource class as dataSource and the class is provided by the osgi environment (equinox, ...) the dataSource is not able to be created due to a ClassNotFoundException. If the bundle would have set DynamicImport it works. (I had to change from your bundle to the commons.dbcp bundle provided by servicemix, because there the DynamicImport is set)
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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