initialize_services.sh Fails When an Application Is Created and Removed with "eaccmd.sh remove-app" Command

(Doc ID 1937264.1)

Last updated on JUNE 27, 2016

Applies to:

Oracle Commerce Guided Search / Oracle Commerce Experience Manager - Version 11.0 and later
Information in this document applies to any platform.

Symptoms

initialize_services.sh fails when application is created and removed by eaccmd.sh remove-app.  

This process worked with older versions.

Reproducible Steps:
---------------------------------------------------
1. deploy an app
2. run initialize_services.sh
3. remove the app by running the following command
  eaccmd.sh --remove-app --force
4. run initialize_services again fails with the error:

  [exec] [08.25.14 19:13:02] INFO: Provisioning site from prototype...
  [exec] [08.25.14 19:13:03] SEVERE: Precondition Failed (412): Cannot copy ContentItemWrapper, type=endeca/site, path=/prototype/default, resource=[JcrNodeResource, type=endeca/site, superType=null, path=/prototype/default] to /sites/beta_bld: destination exists
  [exec] Occurred while executing line 3 of valid BeanShell script:
  [exec] [[
  [exec]
  [exec] 1|
  [exec] 2| log.info("InitialSetup.");
  [exec] 3| IFCR.provisionSite();
  [exec] 4| // WorkbenchManager.updateWsConfig();
  [exec] 5|
  [exec] ]]
  [exec]
  [exec] [08.25.14 19:13:03] SEVERE: Caught an exception while invoking method 'run' on object 'InitialSetup'. Releasing locks.
  [exec]
  [exec] Caused by java.lang.reflect.InvocationTargetException
  [exec] sun.reflect.NativeMethodAccessorImpl invoke0 - null
  [exec] Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
  [exec] com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
  [exec] Caused by com.endeca.soleng.eac.toolkit.utility.IFCRUtility$HttpStatusException
  [exec] com.endeca.soleng.eac.toolkit.utility.IFCRUtility execute - Precondition Failed (412): Cannot copy ContentItemWrapper, type=endeca/site, path=/prototype/default, resource=[JcrNodeResource, type=endeca/site, superType=null, path=/prototype/default] to /sites/beta_bld: destination exists

Findings:
---------------------------------------------------
1. If InitialSetup in AppConfig.xml was commented out, this issue does not occur.
2. Running initialize_services --force twice in a row seems to overcome the problem


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms