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 <[email protected]> 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 <[email protected]>
>> 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