Meta-Export from 2.19 to 2.24

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports

···

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

You are not saying which problem you have…

···

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You could use node to run it locally:

https://github.com/zaach/jsonlint

···

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Right link:

https://www.npmjs.com/package/json-lint

···

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Other https://www.quora.com/What-are-some-good-offline-JSON-validators

···

On 30 Jul 2016 14:48, “Knut Staring” knutst@gmail.com wrote:

Right link:

https://www.npmjs.com/package/json-lint

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi

Export from a 2.19 instance into a 2.24 will probably not work, as there have been too many changes to the metadata (especially around 2.20).

You might have better luck doing it version by version, and let DHIS 2 upgrade itself

If you are doing it on a remote instance, I would suggest downloading 2.19, import the metadata there… then go 2.20, 2.21, etc, it’s probably a safer options

···

On Sat, Jul 30, 2016 at 10:23 AM, Knut Staring knutst@gmail.com wrote:

Other https://www.quora.com/What-are-some-good-offline-JSON-validators


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On 30 Jul 2016 14:48, “Knut Staring” knutst@gmail.com wrote:

Right link:

https://www.npmjs.com/package/json-lint

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Apologies, the problem is that my meta-data JSON export from 2.19 can not be imported to 2.24. I installed the jsonlint npm package and can now validate on the command line. The JSON file is ok. However, there is an error in the tomcat logs which indicate that Enum instance names is expecting capitalised string values. e.g.

  • ERROR 2016-07-30 10:58:33,392 com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of org.hisp.dhis.validation.RuleType from String value ‘validation’: value not one of declared Enum instance names: [VALIDATION, SURVEILLANCE]

Any faster way round this? It appears when I replace the offending string value with the capitalised version, it proceeds to the next and there are just too many to replace.

···

On Sat, Jul 30, 2016 at 10:02 AM, Knut Staring knutst@gmail.com wrote:

You are not saying which problem you have…

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

Thanks Morten, let me try that, have been up all night!

···

On Sat, Jul 30, 2016 at 11:08 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Export from a 2.19 instance into a 2.24 will probably not work, as there have been too many changes to the metadata (especially around 2.20).

You might have better luck doing it version by version, and let DHIS 2 upgrade itself

If you are doing it on a remote instance, I would suggest downloading 2.19, import the metadata there… then go 2.20, 2.21, etc, it’s probably a safer options

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Jul 30, 2016 at 10:23 AM, Knut Staring knutst@gmail.com wrote:

Other https://www.quora.com/What-are-some-good-offline-JSON-validators


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On 30 Jul 2016 14:48, “Knut Staring” knutst@gmail.com wrote:

Right link:

https://www.npmjs.com/package/json-lint

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

  • ERROR 2016-07-30 10:58:33,392 com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of org.hisp.dhis.validation.RuleType from String value ‘validation’: value not one of declared Enum instance names: [VALIDATION, SURVEILLANCE]

Yeah, so this is the issue… in 2.20 we changed all of our constants to enums, so number became NUMBER, validation became VALIDATION etc… it’s a huge task to fix this manually in the metadata payload, so I would suggest upgrading version by version…

You might also be interested in reading the upgrade notes:

https://www.dhis2.org/220-upgrade

https://www.dhis2.org/221-upgrade

https://www.dhis2.org/222-upgrade

https://www.dhis2.org/223-upgrade

https://www.dhis2.org/224-upgrade

···

On Sat, Jul 30, 2016 at 11:12 AM, Moses Marimo marimo@ict.co.zw wrote:

Thanks Morten, let me try that, have been up all night!

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Jul 30, 2016 at 11:08 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Export from a 2.19 instance into a 2.24 will probably not work, as there have been too many changes to the metadata (especially around 2.20).

You might have better luck doing it version by version, and let DHIS 2 upgrade itself

If you are doing it on a remote instance, I would suggest downloading 2.19, import the metadata there… then go 2.20, 2.21, etc, it’s probably a safer options


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Jul 30, 2016 at 10:23 AM, Knut Staring knutst@gmail.com wrote:

Other https://www.quora.com/What-are-some-good-offline-JSON-validators


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On 30 Jul 2016 14:48, “Knut Staring” knutst@gmail.com wrote:

Right link:

https://www.npmjs.com/package/json-lint

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Thanks, doing version by version now. short-cuts do not always work!

···

On Sat, Jul 30, 2016 at 11:15 AM, Morten Olav Hansen morten@dhis2.org wrote:

  • ERROR 2016-07-30 10:58:33,392 com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of org.hisp.dhis.validation.RuleType from String value ‘validation’: value not one of declared Enum instance names: [VALIDATION, SURVEILLANCE]

Yeah, so this is the issue… in 2.20 we changed all of our constants to enums, so number became NUMBER, validation became VALIDATION etc… it’s a huge task to fix this manually in the metadata payload, so I would suggest upgrading version by version…

You might also be interested in reading the upgrade notes:

https://www.dhis2.org/220-upgrade

https://www.dhis2.org/221-upgrade

https://www.dhis2.org/222-upgrade

https://www.dhis2.org/223-upgrade

https://www.dhis2.org/224-upgrade

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Jul 30, 2016 at 11:12 AM, Moses Marimo marimo@ict.co.zw wrote:

Thanks Morten, let me try that, have been up all night!

On Sat, Jul 30, 2016 at 11:08 AM, Morten Olav Hansen morten@dhis2.org wrote:

Hi

Export from a 2.19 instance into a 2.24 will probably not work, as there have been too many changes to the metadata (especially around 2.20).

You might have better luck doing it version by version, and let DHIS 2 upgrade itself

If you are doing it on a remote instance, I would suggest downloading 2.19, import the metadata there… then go 2.20, 2.21, etc, it’s probably a safer options


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sat, Jul 30, 2016 at 10:23 AM, Knut Staring knutst@gmail.com wrote:

Other https://www.quora.com/What-are-some-good-offline-JSON-validators


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On 30 Jul 2016 14:48, “Knut Staring” knutst@gmail.com wrote:

Right link:

https://www.npmjs.com/package/json-lint

On 30 Jul 2016 14:46, “Knut Staring” knutst@gmail.com wrote:

You could use node to run it locally:

https://github.com/zaach/jsonlint

On 30 Jul 2016 13:28, “Moses Marimo” marimo@ict.co.zw wrote:

I am trying to import meta-data of a 2.19 deployment to a clean 2.24 deployment. I have a problem and I suspect there could be a problem with the JSON data. Its 15MB and I can not find any online JSON validator. Any idea how I can validate my big JSON file? Or does any one know a better way around 2.19 to 2.24 imports


ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.