# Metadata export: programs infinite recursion

**URL:** <https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019>\
**Category:** Support - Assistance technique\
**Created:** [16 February 2015 10:51 UTC](https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019 "2015-02-16T10:51:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marta](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/marta/32/160_2.png) [@marta](https://community.dhis2.org/u/marta)\
**Post date:** [16 February 2015 10:51 UTC](https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019/1 "2015-02-16T10:51:27Z")

</div>

Hello all,

I´m getting an exception when exporting metadata.

Infinite recursion (StackOverflowError) (through reference chain: org.hisp.dhis.program.Program\_$$_javassist\_53[“relatedProgram”]-\>org.hisp.dhis.program.Program_$$\_javassist\_53[“relatedProgram”]-\> … and so on…

I have two programs and each one is related program of the other… Is that forbidden?

Also I tried to modify the program to remove the “program relation” but changes are not saved. It is saved as a new version but  
“Program for new relative to be enrolled in” has the same value.

I see something similar was posted in novemember last year … any clue on how was it solved??  
**Screenshot of program config attached.**

**Version/revision info:**  
Version:  
2.18  
Build revision:  
18157

Thanks!

![image](https://dhis2.b-cdn.net/images/transparent.png)

![image](https://dhis2.b-cdn.net/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [19 February 2015 07:30 UTC](https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019/2 "2015-02-19T07:30:44Z")

</div>

Hi Marta

Wait about 1 hr, then you can download a new version of 2.18 that should have fixed the problem.

> **···**
>
> On Mon, Feb 16, 2015 at 5:51 PM, Marta Vila [martavila@gmail.com](mailto:martavila@gmail.com) wrote:
> 
> > Hello all,
> 
> > I´m getting an exception when exporting metadata.
> > 
> > Infinite recursion (StackOverflowError) (through reference chain: org.hisp.dhis.program.Program\_$$_javassist\_53[“relatedProgram”]-\>org.hisp.dhis.program.Program_$$\_javassist\_53[“relatedProgram”]-\> … and so on…
> 
> > I have two programs and each one is related program of the other… Is that forbidden?
> 
> > Also I tried to modify the program to remove the “program relation” but changes are not saved. It is saved as a new version but  
> > “Program for new relative to be enrolled in” has the same value.
> > 
> > I see something similar was posted in novemember last year … any clue on how was it solved??  
> > **Screenshot of program config attached.**
> > 
> > **Version/revision info:**  
> > Version:  
> > 2.18  
> > Build revision:  
> > 18157
> 
> > Thanks!
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –  
> Morten

---

<div class="post-metadata">

**Author:** ![marta](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/marta/32/160_2.png) [@marta](https://community.dhis2.org/u/marta)\
**Post date:** [20 February 2015 11:57 UTC](https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019/3 "2015-02-20T11:57:29Z")

</div>

Hi Morten,

thanks a lot. Meta-data export works perfectly fine now with this program configuration.

Just FYI -  
editing data from the “Shortcut link to add a relative” section in a program does not update the values for the fields:

_Relationship (e.g. Mother-Child)_  
_Who is the new relative to the existing tracked entity instance?_  
_Program for new relative to be enrolled in_

Only _Shortcut link label (e.g. Add child)_ is updated. The program is stored as a new version.

thanks again!

> **···**
>
> On 19 February 2015 at 08:30, Morten Olav Hansen [mortenoh@gmail.com](mailto:mortenoh@gmail.com) wrote:
> 
> > Hi Marta
> 
> > Wait about 1 hr, then you can download a new version of 2.18 that should have fixed the problem.
> 
> –  
> Morten
> 
> On Mon, Feb 16, 2015 at 5:51 PM, Marta Vila [martavila@gmail.com](mailto:martavila@gmail.com) wrote:
> 
> > Hello all,
> 
> > I´m getting an exception when exporting metadata.
> > 
> > Infinite recursion (StackOverflowError) (through reference chain: org.hisp.dhis.program.Program\_$$_javassist\_53[“relatedProgram”]-\>org.hisp.dhis.program.Program_$$\_javassist\_53[“relatedProgram”]-\> … and so on…
> 
> > I have two programs and each one is related program of the other… Is that forbidden?
> 
> > Also I tried to modify the program to remove the “program relation” but changes are not saved. It is saved as a new version but  
> > “Program for new relative to be enrolled in” has the same value.
> > 
> > I see something similar was posted in novemember last year … any clue on how was it solved??  
> > **Screenshot of program config attached.**
> > 
> > **Version/revision info:**  
> > Version:  
> > 2.18  
> > Build revision:  
> > 18157
> 
> > Thanks!
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [8 December 2021 17:59 UTC](https://community.dhis2.org/t/metadata-export-programs-infinite-recursion/28019/4 "2021-12-08T17:59:37Z")

</div>

A post was merged into an existing topic: [Exception with Meta Data Export for Programs](https://community.dhis2.org/t/exception-with-meta-data-export-for-programs/27270/6)
