Problem Statement:
Site got crashed and not able to import backed-up Experience Manager rules.
Error when you Import rules:
Nov 5, 2015 3:25:32 PM com.endeca.soleng.eac.toolkit.utility.IFCRUtility importNode
INFO: Uploading contents to: http://localhost:8006/ifcr/sites/APP_NAME/configuration/tools/xmgr
Nov 5, 2015 3:25:33 PM com.endeca.soleng.eac.toolkit.utility.IFCRUtility importNode
INFO: Finished uploading contents.
Caused by: com.endeca.soleng.eac.toolkit.utility.IFCRUtility$HttpStatusException: Internal Server Error (500): javax.jcr.ItemNotFoundException: 731f7677-dc43-47d3-968e-3d1
6c49970c2/{}contentCollectionReferences
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.execute(IFCRUtility.java:724)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.httpPost(IFCRUtility.java:671)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.httpPost(IFCRUtility.java:653)
at com.endeca.soleng.eac.toolkit.utility.IFCRUtility.deleteNode(IFCRUtility.java:261)
at com.endeca.soleng.eac.toolkit.component.IFCRComponent.importXml(IFCRComponent.java:195)
at com.endeca.soleng.eac.toolkit.component.IFCRComponent.importXmlWithPrompt(IFCRComponent.java:144)
... 7 more
Solution:
1) Make sure you have a good copy of content repository export. To do this, execute export_site on an working environment.
Ex: /opt/app/endeca/APP_NAME/control>./export_site.sh XMRules.xml
2) Stop workbench.
3) Go to $ENDECA_TOOLS_CONF/state/
4) Rename sling and jackrabbit directory in here to anything other than sling and jackrabbit, or back them up to a different directory.
5) Restart workbench, this will cause the sling IFCR repository to be cleaned up.
Note: If you have multiple apps, then all of them will be cleaned up. In this situation, run 6) and 7) below for each app.
6) Then run initialize_services./sh|bat --force from the app
Ex: /opt/app/endeca/APP_NAME/control>./initialize_services./sh|bat --force
7) Then import_site <export file>
Ex: /opt/app/endeca/APP_NAME/control>./import_site.sh XMRules.xml
8) Execute a baseline_update from dyn/admin followed by a promote_content