Hi Asantha,

As Chamila mentioned you need to bundle the required library in your
feature as well, so that it is self contained, and can be installed
independently in any carbon server.

Have you added that in your PR? I couldn't see a bundleDef for org.json.

Regards,
Johann.

On Fri, Aug 19, 2016 at 3:04 PM, Asantha Thilina <asanthathil...@gmail.com>
wrote:

> Hi all,
>
> First of all let me apologize for the late reply ,I have changed the
> org.json version as chamila said and now it's working no need to add json
> lib manually and version changed will not affected to any of my code i have
> updated the PR[1] with latest modifications now it's need
> mongodb-java-driver only to run the module no other extra library required
>
> [1]https://github.com/wso2-extensions/identity-userstore-mongodb/pull/1
>
> Thanks,
> Asantha
>
> On Fri, Aug 19, 2016 at 1:26 AM, Chamila Wijayarathna <
> cdwijayarat...@gmail.com> wrote:
>
>> Hi Asantha,
>>
>> If you have used any new features of org.json which is not available in
>> that old version, I think you will have to create an orbit with new
>> org.json version.
>>
>> And I think it (either new or old version) need to be packed in your
>> feature, so it can be installed into any carbon based product.
>>
>> Thanks!
>>
>> On Fri, Aug 19, 2016 at 3:17 PM, Asantha Thilina <
>> asanthathil...@gmail.com> wrote:
>>
>>> Hi Chamila,
>>>
>>> ok thanks for the comment then i will change the version of my
>>> dependency and test it
>>>
>>> Thanks,
>>> Asantha
>>>
>>> On Fri, Aug 19, 2016 at 1:13 AM, Chamila Wijayarathna <
>>> cdwijayarat...@gmail.com> wrote:
>>>
>>>> Hi Asantha, Tharindu,
>>>>
>>>> I think IS already packs json, but the version is 20140107 which comes
>>>> from wso2 orbit bundle [1]. You are receiving the error due to version
>>>> mismatch, because you are using  version 20160212.
>>>>
>>>> Can you try using existing dependency and check if your features work
>>>> okay with that version?\\
>>>>
>>>> Thank You!
>>>>
>>>> [1]. https://github.com/wso2/orbit/blob/master/json/3.0.0.wso2v1
>>>>
>>>> On Fri, Aug 19, 2016 at 3:03 PM, Tharindu Edirisinghe <
>>>> tharin...@wso2.com> wrote:
>>>>
>>>>> I meant shipping with the product... by packing with the product.
>>>>>
>>>>> Yes, it should be packed by the feature.
>>>>>
>>>>> I'll look more into Charon's dependency as well.
>>>>>
>>>>> On Fri, Aug 19, 2016 at 10:26 AM, Chamila Wijayarathna <
>>>>> cdwijayarat...@gmail.com> wrote:
>>>>>
>>>>>> Hi Harsha,
>>>>>>
>>>>>> The license seems to be okay, isn't it? It doesn't mention anything
>>>>>> that prevent us from using it. Also I think we use same library for json
>>>>>> related stuff in charon as well. So it can't be an issue IMO.
>>>>>>
>>>>>> @Tharindu, Why we should pack this in product? Shouldn't we pack this
>>>>>> in the feature?
>>>>>>
>>>>>> Thank You!
>>>>>>
>>>>>> On Fri, Aug 19, 2016 at 2:11 PM, Harsha Thirimanna <hars...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> As in the license, there are some restrictions.
>>>>>>>
>>>>>>> http://www.json.org/license.html
>>>>>>>
>>>>>>> *Harsha Thirimanna*
>>>>>>> Associate Tech Lead | WSO2
>>>>>>>
>>>>>>> Email: hars...@wso2.com
>>>>>>> Mob: +94715186770
>>>>>>> Blog: http://harshathirimanna.blogspot.com/
>>>>>>> Twitter: http://twitter.com/harshathirimann
>>>>>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>>>>>> rsha-thirimanna/10/ab8/122
>>>>>>> <http://wso2.com/signature>
>>>>>>>
>>>>>>> On Fri, Aug 19, 2016 at 9:30 AM, Tharindu Edirisinghe <
>>>>>>> tharin...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Thanks Asantha.
>>>>>>>>
>>>>>>>> @Johann/Darshana - Would it be possible to pack org.json [1]
>>>>>>>> dependency to the product itself ?
>>>>>>>>
>>>>>>>> [1] https://mvnrepository.com/artifact/org.json/json/20160212
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> TharinduE
>>>>>>>>
>>>>>>>> On Fri, Aug 19, 2016 at 12:48 AM, Asantha Thilina <
>>>>>>>> asanthathil...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Tharindu,
>>>>>>>>>
>>>>>>>>> As you instructed i have finished all above process and i already
>>>>>>>>> sent a PR[1] to product-is with my modifications and earlier i have 
>>>>>>>>> sent a
>>>>>>>>> PR[2] to identity-userstore-mongodb
>>>>>>>>> during the deployment of the product-is i face the following issue
>>>>>>>>> In my MongoDBUserStoreManager plugin i will be using org.json[2]
>>>>>>>>> lib for query purposes so it is a dependent for my plugin to work 
>>>>>>>>> ,For the
>>>>>>>>> moment i manually added json lib to dropin folder to activate my 
>>>>>>>>> bundle
>>>>>>>>> otherwise i will get following error when i open osgi console and 
>>>>>>>>> checked
>>>>>>>>> Missing optionally imported package org.json_[20160212.0.0,2016021
>>>>>>>>> 3.0.0).
>>>>>>>>> In order to activate the bundle need to add mongo-java-driver[4]
>>>>>>>>> also to dropins folder after that it will activate successfully,
>>>>>>>>> Is there any method to ship the json lib also with my bundle when
>>>>>>>>> deploying it to IS?
>>>>>>>>> [1]https://github.com/wso2/product-is/pull/668
>>>>>>>>> [2]https://github.com/wso2-extensions/identity-userstore-mon
>>>>>>>>> godb/pull/1
>>>>>>>>> [3]https://mvnrepository.com/artifact/org.json/json/20160212
>>>>>>>>> [4]https://mvnrepository.com/artifact/org.mongodb/mongo-java
>>>>>>>>> -driver/3.2.2
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Asantha
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 18, 2016 at 2:19 AM, Tharindu Edirisinghe <
>>>>>>>>> tharin...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Asntha,
>>>>>>>>>>
>>>>>>>>>> Please follow steps below to complete the project.
>>>>>>>>>>
>>>>>>>>>> 1. In your features [1] folder, you have to create etc folder and
>>>>>>>>>> put feature.properties file in it. This is same as [2].
>>>>>>>>>> 2. You have to create server.feature in [1]. Refer [3] and do the
>>>>>>>>>> same. Make necessary modifications to pom file.
>>>>>>>>>> 3. Once you do above, you can commit and push so that your PR [4]
>>>>>>>>>> will automatically get these changes appended.
>>>>>>>>>>
>>>>>>>>>> Next step is to add this feature to IS product so when the
>>>>>>>>>> product is built, the jar file is automatically packed to the 
>>>>>>>>>> product. For
>>>>>>>>>> that, follow the instructions below.
>>>>>>>>>>
>>>>>>>>>> 4. Clone product-is [5] and do a clean repo build skipping tests.
>>>>>>>>>> (you can just backup .m2 directory in your home and create an empty 
>>>>>>>>>> folder
>>>>>>>>>> with name .m2. Then you can run mvn clean install 
>>>>>>>>>> -Dmaven.test.skip=true"
>>>>>>>>>> command in product-is.
>>>>>>>>>> 5. Once the product is built, you can get the zip file in
>>>>>>>>>> modules/distribution folder. Run the product and check if you can 
>>>>>>>>>> access
>>>>>>>>>> management console.
>>>>>>>>>> 6. Next step is to build your feature so local m2 repository get
>>>>>>>>>> the jar files of your feature.
>>>>>>>>>> 7. Then, you can fork product-is and modify parent pom [6] adding
>>>>>>>>>> a new property for your feature's version. Similar to below 
>>>>>>>>>> property, you
>>>>>>>>>> can add your own one.
>>>>>>>>>>
>>>>>>>>>> <identity.userstore.remote.version>5.1.1</identity.userstore
>>>>>>>>>> .remote.version>
>>>>>>>>>>
>>>>>>>>>> 8.  Modify the p2-profile-get pom file [7] and include your
>>>>>>>>>> feature there. You can search for "*user.store.remote.feature*"
>>>>>>>>>> and following that, add details for your feature.
>>>>>>>>>> 9. Then re-build the product-is, get the zip file, run it and in
>>>>>>>>>> Management Console, check if mongodb userstore is listed. Also you 
>>>>>>>>>> can
>>>>>>>>>> check if the jar file is packed in plugins.
>>>>>>>>>> 10. Finally send a PR to product-is with these changes.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/asanthamax/identity-userstore-mongodb/tre
>>>>>>>>>> e/master/features
>>>>>>>>>> [2] https://github.com/wso2-extensions/identity-userstore-remote
>>>>>>>>>> /blob/master/features/etc/feature.properties
>>>>>>>>>> [3] https://github.com/wso2-extensions/identity-userstore-remote
>>>>>>>>>> /tree/master/features/org.wso2.carbon.identity.user.store.re
>>>>>>>>>> mote.server.feature
>>>>>>>>>> [4] https://github.com/wso2-extensions/identity-userstore-mongod
>>>>>>>>>> b/pull/1
>>>>>>>>>> [5] https://github.com/wso2/product-is/
>>>>>>>>>> [6] https://github.com/wso2/product-is/blob/master/pom.xml
>>>>>>>>>> [7] https://github.com/wso2/product-is/blob/master/modules/p2-pr
>>>>>>>>>> ofile-gen/pom.xml
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> TharinduE
>>>>>>>>>>
>>>>>>>>>> On Tue, Aug 16, 2016 at 1:13 PM, Asantha Thilina <
>>>>>>>>>> asanthathil...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Tharindu,
>>>>>>>>>>>
>>>>>>>>>>> According to your instructions i have added the components
>>>>>>>>>>> folder with the mongodbuserstore package to my forked repo[1] and i 
>>>>>>>>>>> also
>>>>>>>>>>> sent the pull request to origin also[2] i have refactor the main 
>>>>>>>>>>> package to *org.wso2.carbon.identity.user.store.mo
>>>>>>>>>>> <http://org.wso2.carbon.identity.user.store.mo>**ngodb *
>>>>>>>>>>> expecting your feedback
>>>>>>>>>>> [1] https://github.com/asanthamax/identity-userstore-mongodb
>>>>>>>>>>> [2] https://github.com/wso2-extensions/identity-userstore-mo
>>>>>>>>>>> ngodb/pull/1
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Asantha
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Aug 16, 2016 at 2:45 AM, Tharindu Edirisinghe <
>>>>>>>>>>> tharin...@wso2.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Asantha,
>>>>>>>>>>>>
>>>>>>>>>>>> Now that you have completed the project [1], for the final
>>>>>>>>>>>> evaluation, you need to contribute your code to WSO2 codebase.
>>>>>>>>>>>>
>>>>>>>>>>>> For that, we have created the repository [2].
>>>>>>>>>>>>
>>>>>>>>>>>> You can refer [3] to get some idea about the package structure
>>>>>>>>>>>> of the repo.
>>>>>>>>>>>>
>>>>>>>>>>>> Further, you can refactor your project and rename the main
>>>>>>>>>>>> package to *org.wso2.carbon.identity.user.store.mo
>>>>>>>>>>>> <http://org.wso2.carbon.identity.user.store.mo>**ngodb*.
>>>>>>>>>>>>
>>>>>>>>>>>> You can send a pull request with these.
>>>>>>>>>>>>
>>>>>>>>>>>> I will help you with writing the feature and creating the
>>>>>>>>>>>> parent pom file later.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> [1] https://docs.wso2.com/display/
>>>>>>>>>>>> GSoC/Project+Proposals+for+2016#ProjectProposalsfor2016-Prop
>>>>>>>>>>>> osal21:[IS]DocumentBasedNoSQLSupportforWSO2IdentityServerDat
>>>>>>>>>>>> abase
>>>>>>>>>>>> [2] https://github.com/wso2-extens
>>>>>>>>>>>> ions/identity-userstore-mongodb
>>>>>>>>>>>> [3] https://github.com/wso2-extens
>>>>>>>>>>>> ions/identity-userstore-remote
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you,
>>>>>>>>>>>> TharinduE
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>>> Tharindu Edirisinghe
>>>>>>>>>>>> Senior Software Engineer | WSO2 Inc
>>>>>>>>>>>> Platform Security Team
>>>>>>>>>>>> Blog : tharindue.blogspot.com
>>>>>>>>>>>> mobile : +94 775181586
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Tharindu Edirisinghe
>>>>>>>>>> Senior Software Engineer | WSO2 Inc
>>>>>>>>>> Platform Security Team
>>>>>>>>>> Blog : tharindue.blogspot.com
>>>>>>>>>> mobile : +94 775181586
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Tharindu Edirisinghe
>>>>>>>> Senior Software Engineer | WSO2 Inc
>>>>>>>> Platform Security Team
>>>>>>>> Blog : tharindue.blogspot.com
>>>>>>>> mobile : +94 775181586
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Dev mailing list
>>>>>>>> Dev@wso2.org
>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dev mailing list
>>>>>>> Dev@wso2.org
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Chamila Dilshan Wijayarathna,
>>>>>> The University of New South Wales (UNSW Canberra)
>>>>>> Australian Defence Force Academy
>>>>>> PO Box 7916, Canberra BA ACT 2610
>>>>>> Australia
>>>>>> Mobile:(+61)416895795
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Tharindu Edirisinghe
>>>>> Senior Software Engineer | WSO2 Inc
>>>>> Platform Security Team
>>>>> Blog : tharindue.blogspot.com
>>>>> mobile : +94 775181586
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Chamila Dilshan Wijayarathna,
>>>> The University of New South Wales (UNSW Canberra)
>>>> Australian Defence Force Academy
>>>> PO Box 7916, Canberra BA ACT 2610
>>>> Australia
>>>> Mobile:(+61)416895795
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>
>>
>> --
>> Chamila Dilshan Wijayarathna,
>> The University of New South Wales (UNSW Canberra)
>> Australian Defence Force Academy
>> PO Box 7916, Canberra BA ACT 2610
>> Australia
>> Mobile:(+61)416895795
>>
>>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Technical Lead & Product Lead of WSO2 Identity Server
Governance Technologies Team
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777776950*
Blog - *http://nallaa.wordpress.com <http://nallaa.wordpress.com>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to