Thank you. As you suggested, root cause must be DynamicImport-Package header
and the exception when specifying a range "[1.51.0, 1.6.0)" is solved
by changing it to [1.51.0, 1.60.0).

Thanks again,

*E. Ananthaneshan*
Associate Software Engineer
WSO2, Inc: http://wso2.com
Mob: +94 712307125


On Mon, Dec 22, 2014 at 3:00 PM, Kishanthan Thangarajah <[email protected]
> wrote:

>
>
> On Mon, Dec 22, 2014 at 1:47 PM, Kishanthan Thangarajah <
> [email protected]> wrote:
>
>> Can you check whether the new bundle (bcprov_1.51.0) has properly
>> exported all those sub packages above with the new version?
>> Also why do you need DynamicImport-Package header here? This is
>> considered as an anti pattern in OSGi world should only be used as the last
>> resort. Also the proper approach with import packages is to use version
>> range (Eg : [1.51.0, 1.6.0) ).
>>
>
> Version range should be  [1.51.0, 1.60.0).
>
>>
>> On Mon, Dec 22, 2014 at 12:14 PM, Ananthaneshan Elampooran <
>> [email protected]> wrote:
>>
>>> Hi Team,
>>>
>>> I am making a jar OSGI ready. It depends on "org.bouncycastle" package.
>>> An older version of the same is exposed by "org.bouncycastle;
>>> version="132.0.0"<wss4j_1.5.11.wso2v6 [423]>" but I want the new bundle
>>> (org.bouncycastle; version="1.51.0"<bcprov_1.51.0 [22]>)  to be resolved
>>> instead , so I defined it in maven bundle plugin.
>>>
>>> here is my configuration:
>>>
>>>> <plugin>
>>>>                 <groupId>org.apache.felix</groupId>
>>>>                 <artifactId>maven-bundle-plugin</artifactId>
>>>>                 <extensions>true</extensions>
>>>>                 <version>1.4.0</version>
>>>>                 <configuration>
>>>>                     <instructions>
>>>>
>>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>>>                         <Bundle-Name>${pom.artifactId}</Bundle-Name>
>>>>                         <Import-Package>
>>>>                             org.bouncycastle.*; version="1.51.0",
>>>>                             *;resolution:=optional
>>>>                         </Import-Package>
>>>>
>>>> <Export-Package>com.yubico.u2f.*,</Export-Package>
>>>>                         <DynamicImport-Package>*</DynamicImport-Package>
>>>>                     </instructions>
>>>>                 </configuration>
>>>>             </plugin>
>>>
>>>
>>> "org.bouncycastle" package of the new bundle is still resolves to older
>>> one.
>>>
>>> Imported packages
>>>>     org.bouncycastle.asn1.sec; version="132.0.0"<wss4j_1.5.11.wso2v6
>>>> [423]>
>>>>     org.bouncycastle.asn1.x9; version="132.0.0"<wss4j_1.5.11.wso2v6
>>>> [423]>
>>>>     org.bouncycastle.jce.provider;
>>>> version="132.0.0"<wss4j_1.5.11.wso2v6 [423]>
>>>>     org.bouncycastle.jce.spec; version="132.0.0"<wss4j_1.5.11.wso2v6
>>>> [423]>
>>>>     org.bouncycastle.math.ec; version="132.0.0"<wss4j_1.5.11.wso2v6
>>>> [423]>
>>>>     com.google.gson; version="2.2.4"<com.google.gson_2.2.4 [25]>
>>>>     com.google.common.io; version="18.0.0"<com.google.guava_18.0.0
>>>> [27]>
>>>>     com.google.common.collect; version="18.0.0"<com.google.guava_18.0.0
>>>> [27]>
>>>>     com.google.common.base; version="18.0.0"<com.google.guava_18.0.0
>>>> [27]>
>>>
>>>
>>> How would I solve this issue.
>>>
>>> Thanks in advance.
>>> Regards,
>>> *E. Ananthaneshan*
>>> Associate Software Engineer
>>> WSO2, Inc: http://wso2.com
>>> Mob: +94 712307125
>>>
>>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Senior Software Engineer,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> <http://kishanthan.wordpress.com>*
>> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Senior Software Engineer,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to