Background..
We have seen instances when due to some wrong deployments or incorrect MDS, deployment fails or sometimes after we delete the MDS and do a restart of the servers, the application may be referring to an XSD or document which has been removed from the mds repository recently. In such cases, the soa-infra fails to start and many times people end up recreating the domain or if by some easy means people do a schema refresh the approach suggested below can be used to recover from such a scenario very easily.
Now we need to understand how to delete the composites when the SOA infra is not up,once you have gone through the steps you might feel there is a 100% chance of corrupting the soa-infra while performing the steps, but truly speaking if we follow the steps clearly as mentioned below you can actually save a lot of time.
Behind the MDS, what happened actually ??
In case of situations when we need to delete the composites when the soa-infra is not up ( because of incorrect mds or unstable versions of code), we can remove the MDS or composites in the following way. This usually happens when one of the composites referred to a file that could not be found.
This can be resolved in the following way, which I tried and tested in my project and saved a lot of time and energy... ;)
- Download the SharedSoaresourcepartition.ear file from Oracle Technology Networks
- This EAR file can also be downloaded from the Oracle Metalink note id: [1380835.1]]
- Install the ear file in the weblogic server either through console or through WLST.
- Run the below command to export the metadata from the AdminServer. Change the values appropriate to your environment.
Command:
Connect to the Admin Server using wlst by running the wlst.sh under '<ORACLE_SOA1>/common/bin
connect('username','password','t3://adminserverurl:port')
exportMetadata(application='ShareSoaInfraPartition',server='AdminServer',toLocation='/orainstall/FMW_HOME/user_projects/domains/int_soa_domain',docs='/deployed-composites/deployed-composites.xml')
Note: Please change the values appropriately as per the environment.
Result:
Executing operation: exportMetadata.
Operation "exportMetadata" completed. Summary of "exportMetadata" operation is:
List of documents successfully transferred:
/deployed-composites/deployed-composites.xml
1 documents successfully transferred.
- Open the deployed-composites.xml within deployed-composites folder under your location where you have saved the file.
- Delete the composite series or revision which is causing the problem and save the file.
- Import the updated file from your saved location into MDS.
Command:
importMetadata(application='ShareSoaInfraPartition',server='AdminServer',fromLocation='/orainstall/FMW_HOME/user_projects/domains/int_soa_domain',docs='/deployed-composites/deployed-composites.xml')
Result:
Executing operation: importMetadata.
Operation "importMetadata" completed. Summary of "importMetadata" operation is:
List of documents successfully transferred:
/deployed-composites/deployed-composites.xml
1 documents successfully transferred.
- Restart your SOA servers and verify..