[Dev] How to import a specific version of a library from OSGI

2014-06-15 Thread Pulasthi Mahawithana
Hi, I want to use BouncyCastle v 1.45 with Identity Server. In my pom.xml for the service component I have used the following configuration to import the BouncyCastle classes, Import-Packageorg.apache.axis2.*, org.wso2.carbon.core.utils.*,

Re: [Dev] How to import a specific version of a library from OSGI

2014-06-15 Thread Dilshan Edirisuriya
Hi Pulasthi, I too faced the same issue when working with bouncycastle. Anyway I have created bouncycastle orbit bundles in carbon 4.2.0. You can use them. So in your imports you can add the versions as below. FYI bouncycastle in orbit version are 1.49 so you could use the same.

Re: [Dev] How to import a specific version of a library from OSGI

2014-06-15 Thread Manoj Kumara
Hi, Seems like the package was resolved with highest version which is 132.0.0. As Dilshan mentioned by providing import version range should resolve this. ex: org.bouncycastle.*; version:=[1.45.0.wso2v1, 1.5.0) Thanks, Manoj *Manoj Kumara* Software Engineer WSO2 Inc. http://wso2.com/

Re: [Dev] How to import a specific version of a library from OSGI

2014-06-15 Thread Pulasthi Mahawithana
Thanks Manoj, Dilshan, I got the correct version loaded by specifying the version range. However, It made one of the webapps not working, failing to load classes from this bundle. I double checked the reason by reverting the changes I made, and the webapp works as expected (It loads the classes

Re: [Dev] How to import a specific version of a library from OSGI

2014-06-15 Thread Dilshan Edirisuriya
Hi Pulasthi, I assume you are using multiple bouncycastle components such as bcprov, bcpkix etc. When there are dependencies to each other those bundles also tries to load the classes where it fails to find the newest version. These things have been already resolved in our orbit bundles. You