You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Adrian Trenaman (JIRA)" <ji...@apache.org> on 2008/12/12 00:25:05 UTC

[jira] Created: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

commons-dbcp component doesn't allow dynamic imports
----------------------------------------------------

                 Key: SMX4-177
                 URL: https://issues.apache.org/activemq/browse/SMX4-177
             Project: ServiceMix 4
          Issue Type: Bug
    Affects Versions: 4.0-m1
            Reporter: Adrian Trenaman
             Fix For: 4.0-m2
         Attachments: commons-dbcp-1.2.2.patch

Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 

/Ade


------



Attachments are removed from the mailing lists, so please raise a JIRA
and attach your patch.
Btw, why not using the bnd tool to set up this manifest entry ?

If we configure the plugin, it should work too:

           <plugin>
               <groupId>org.apache.felix</groupId>
               <artifactId>maven-bundle-plugin</artifactId>
               <version>1.4.1</version>
               <extensions>true</extensions>
               <configuration>
                   <instructions>

<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

<Export-Package>${servicemix.osgi.export}</Export-Package>

<Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>

<Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
                       <DynamicImport-Packages>*</DynamicImport-Packages>
                       <_failok>${servicemix.osgi.failok}</_failok>
                   </instructions>
                   <unpackBundle>true</unpackBundle>
               </configuration>
           </plugin>

On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
Hi Guillaume,

Have attached a patch to this email. Basically, I had to add the following
to the shade configuration element:

                          <transformers>
                              <transformer

implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                  <manifestEntries>

<DynamicImport-Packages>*</DynamicImport-Packages>
                                  </manifestEntries>
                              </transformer>
                          </transformers>

Also, I had to set the version for shade to be 1.2 for this to work. I
haven't created a JIRA for this issue - can you apply the patch directly or
do you want me to put it all through JIRA?

Best,
Ade.









On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:

Yes, this looks like a bug and should be fixed.
Wanna provide a patch or I can do that if you prefer.

On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
wrote:

Hi there,

I was configuring yesterday a fragment of Spring for SMX4 to deploy an
Oracle dataSource and expose it as an OSGi service (and so share it
across
all bundles in the container). Using the Postgres pooled data source
works
fine: however, using the Oracle dataSource I get a
ClassNotFoundException.

This is because the commons-dbcp BasicDataSource is trying to dynamically
load the Oracle driver: it would seem, however, that my wrapping of the
commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
Manifest.MF.

Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
DynamicImport-Packages
to the Manifest.MF? I've checked the pom, but I don't see it explicitly
setting up DynamicImports.

Thanks in advance for any help!
Ade.












--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

---
Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
Progress Software Corp
Shelbourne Road, Dublin 4, Ireland
---
+353-1-637-2659 (Office)
+353-1-637-2882 (Fax)
+353-86-6051026 (Mobile)
adrian.trenaman (Skype)
----
Blog: http://trenaman.blogspot.com













-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

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


[jira] Updated: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Trenaman updated SMX4-177:
---------------------------------

    Attachment: commons-dbcp-1.2.2.patch

Adding patch.


> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Updated: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Trenaman updated SMX4-177:
---------------------------------

    Attachment: commons-dbcp-1.2.2.patch

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Resolved: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine resolved SMX4-177.
--------------------------------

    Resolution: Fixed
      Assignee: Chris Custine

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>            Assignee: Chris Custine
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48253#action_48253 ] 

Chris Custine commented on SMX4-177:
------------------------------------

I forgot to mention that <DynamicImport-Package>*</DynamicImport-Package> isn't generally recommended unless there is a very specific requirement like this so it is better for each bundle to configure this individually.

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48252#action_48252 ] 

Chris Custine commented on SMX4-177:
------------------------------------

I think Lars' solution is what Guillaume had in mind when he suggested using bnd.  The inheritance from the parent pom bundle plugin config isn't intuitive at first but it works well and is handy in cases like this.  Other than the extra s on DynamicImport-Package this patch works well and is a good general addition to the wrapped bundles build config.  I will go ahead and apply this approach since it seems like everyone approves.

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Lars Heinemann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48255#action_48255 ] 

Lars Heinemann commented on SMX4-177:
-------------------------------------

Adrian,

yeah...nasty little typos ;) Thanks for finding it out.

Chris: thanks for help.


> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>            Assignee: Chris Custine
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48254#action_48254 ] 

Chris Custine commented on SMX4-177:
------------------------------------

Added DynamicImport-Package option to bundles-pom and pom property to commons-dbcp pom.  Thanks to Adrian and Lars for patches.

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>            Assignee: Chris Custine
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48251#action_48251 ] 

Adrian Trenaman commented on SMX4-177:
--------------------------------------

Hi Lars,

I like your solution - I still think though that you need to change the <DynamicImport-Packages> to <DynamicImport-Package> (no trailing 's').

I wouldn't be keen to set DynamicImport-Package to * for always: we want to set it only when a bundle needs to do dynamic class loading, as is the case in commons-dbcp.

Cheers,
Ade

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Updated: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Trenaman updated SMX4-177:
---------------------------------

    Attachment:     (was: commons-dbcp-1.2.2.patch)

> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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


[jira] Commented: (SMX4-177) commons-dbcp component doesn't allow dynamic imports

Posted by "Lars Heinemann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMX4-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48250#action_48250 ] 

Lars Heinemann commented on SMX4-177:
-------------------------------------

Well...this looks not very general to me.

Guillaume, wouldn't it be better to patch it with something like this?  (not tested yet)

{noformat}
Index: bundles-pom/pom.xml
===================================================================
--- bundles-pom/pom.xml	(revision 727525)
+++ bundles-pom/pom.xml	(working copy)
@@ -38,6 +38,7 @@
         <servicemix.osgi.export.pkg />
         <servicemix.osgi.import.pkg />
         <servicemix.osgi.private.pkg />
+        <servicemix.osgi.dynamic.pkg />
         <servicemix.osgi.failok>false</servicemix.osgi.failok>
     </properties>
 
@@ -96,6 +97,7 @@
                         <Export-Package>${servicemix.osgi.export}</Export-Package>
                         <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
                         <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
+                        <DynamicImport-Packages>${servicemix.osgi.dynamic.pkg}</DynamicImport-Packages>
                         <_failok>${servicemix.osgi.failok}</_failok>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
Index: commons-dbcp-1.2.2/pom.xml
===================================================================
--- commons-dbcp-1.2.2/pom.xml	(revision 727525)
+++ commons-dbcp-1.2.2/pom.xml	(working copy)
@@ -42,6 +42,7 @@
         <servicemix.osgi.export.pkg>
             org.apache.commons*
         </servicemix.osgi.export.pkg>
+        <servicemix.osgi.dynamic.pkg>*</servicemix.osgi.dynamic.pkg>
     </properties>
 
     <dependencies>
{noformat}

Maybe we should even think about adding the DynamicImport * always?

Regards
Lars


> commons-dbcp component doesn't allow dynamic imports
> ----------------------------------------------------
>
>                 Key: SMX4-177
>                 URL: https://issues.apache.org/activemq/browse/SMX4-177
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.0-m1
>            Reporter: Adrian Trenaman
>             Fix For: 4.0-m2
>
>         Attachments: commons-dbcp-1.2.2.patch
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> Original email trail is below - Guillaume raised a question on why not use bnd - I used the shade plugin simply because that was what the existing pom used. 
> /Ade
> ------
> Attachments are removed from the mailing lists, so please raise a JIRA
> and attach your patch.
> Btw, why not using the bnd tool to set up this manifest entry ?
> If we configure the plugin, it should work too:
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>1.4.1</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Export-Package>${servicemix.osgi.export}</Export-Package>
> <Import-Package>${servicemix.osgi.import.pkg}*</Import-Package>
> <Private-Package>${servicemix.osgi.private.pkg}</Private-Package>
>                        <DynamicImport-Packages>*</DynamicImport-Packages>
>                        <_failok>${servicemix.osgi.failok}</_failok>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>            </plugin>
> On Thu, Dec 11, 2008 at 18:06, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Guillaume,
> Have attached a patch to this email. Basically, I had to add the following
> to the shade configuration element:
>                           <transformers>
>                               <transformer
> implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>                                   <manifestEntries>
> <DynamicImport-Packages>*</DynamicImport-Packages>
>                                   </manifestEntries>
>                               </transformer>
>                           </transformers>
> Also, I had to set the version for shade to be 1.2 for this to work. I
> haven't created a JIRA for this issue - can you apply the patch directly or
> do you want me to put it all through JIRA?
> Best,
> Ade.
> On 11 Dec 2008, at 11:41, Guillaume Nodet wrote:
> Yes, this looks like a bug and should be fixed.
> Wanna provide a patch or I can do that if you prefer.
> On Thu, Dec 11, 2008 at 11:21 AM, Adrian Trenaman <tr...@progress.com>
> wrote:
> Hi there,
> I was configuring yesterday a fragment of Spring for SMX4 to deploy an
> Oracle dataSource and expose it as an OSGi service (and so share it
> across
> all bundles in the container). Using the Postgres pooled data source
> works
> fine: however, using the Oracle dataSource I get a
> ClassNotFoundException.
> This is because the commons-dbcp BasicDataSource is trying to dynamically
> load the Oracle driver: it would seem, however, that my wrapping of the
> commons-dbcp.jar has not added a DynamicImport-Packages attribute to the
> Manifest.MF.
> Does the SMX4 bundles/commons-dbcp-1.2.2 wrapper add
> DynamicImport-Packages
> to the Manifest.MF? I've checked the pom, but I don't see it explicitly
> setting up DynamicImports.
> Thanks in advance for any help!
> Ade.
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
> adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com

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