Recovering from Composite Deployment Failure

I recently had to recover a SOA suite server after something went wrong with one of the composite deployments. During startup of the server it would show in the diagnostic logs that there was a problem finding the composite.xml of one of the composites. That resulted in the soa-infra deployment being unable to start (Really Oracle!!? Why would this be a terminal failure?)

Anyway, luckily there is a way of deleting that particular composite from the MDS. I found the solution in this note on Oracle Support: 1380835.1

 Once you've obtained the EAR file from the support note, the steps are pretty simple:

  1. Download and copy the ShareSoaInfraPartition.ear file to $MIDDLEWARE_HOME/oracle_common/common/bin
  2. cd to $MIDDLEWARE_HOME/oracle_common/common/bin
  3. run wlst.sh
  4. connect to AdminServer ex. connect('weblogic','password','t3://localhost:7001')
  5. run deploy('ShareSoaInfraPartition','ShareSoaInfraPartition.ear',upload='true')
  6. run exportMetadata(application='ShareSoaInfraPartition',server='AdminServer',toLocation='/fmw11g/fmw1115/Middleware',docs='/deployed-composites/deployed-composites.xml')
  7. Updated the deployed-composites.xml file and delete the offensive composite from the file.
  8. run importMetadata(application='ShareSoaInfraPartition',server='AdminServer',fromLocation='/fmw11g/fmw1115/Middleware',docs='/deployed-composites/deployed-composites.xml')
  9. Disconnect from the server ex. disconnect()
  10. Restart your SOA servers