# javax.jcr.ReferentialIntegrityException while trying to perform save action

**URL:** <https://community.bloomreach.com/t/javax-jcr-referentialintegrityexception-while-trying-to-perform-save-action/851>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [February 26, 2019, 10:46pm UTC](https://community.bloomreach.com/t/javax-jcr-referentialintegrityexception-while-trying-to-perform-save-action/851 "2019-02-26T22:46:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keshav.yerra](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@keshav.yerra](https://community.bloomreach.com/u/keshav.yerra)\
**Post date:** [February 26, 2019, 10:46pm UTC](https://community.bloomreach.com/t/javax-jcr-referentialintegrityexception-while-trying-to-perform-save-action/851/1 "2019-02-26T22:46:03Z")

</div>

When I try to save a particular document i get this error

IOException: Failed to map json object to product model org.hippoecm.hst.content.beans.ObjectBeanPersistenceException: javax.jcr.ReferentialIntegrityException: 1cd363a5-dedc-450f-a448-f3b3b5301523 cannot be removed because it is still being referenced.

the uuid (1cd363a5-dedc-450f-a448-f3b3b5301523) mentioned here is of the third document  
handle\_xxxx  
document-node\_xxxx  
document-node\_xxxx[2]  
document-node\_xxxx[3] —\> 1cd363a5-dedc-450f-a448-f3b3b5301523

I searched everywhere for this uuid in my data to find any references of it but no luck.  
But still i get a reference error.  
(P.S. Only this node is having this problem)  
Please help. Thanks!

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [February 28, 2019, 3:57pm UTC](https://community.bloomreach.com/t/javax-jcr-referentialintegrityexception-while-trying-to-perform-save-action/851/2 "2019-02-28T15:57:22Z")

</div>

You programmatically get the references through the node object.

node.getReferences()

This isn’t a common issue afaik. I found an old thread that had this problem, but it doesn’t look the same as your case:  
[https://groups.google.com/forum/#!topic/hippo-community/miakYiRr9hs](https://groups.google.com/forum/#!topic/hippo-community/miakYiRr9hs)
