Monday, March 7, 2016

Undeploy SOA Composite using wlst

SOA composite undeploy when em is not working:

Method :1:

cd $MIDDLEWARE_HOME\ORACLE_SOA_HOME\common\bin
wlst.cmd
connect('weblogic','password','t3://localhost:8001')
wls:/soa_prod_domain/serverConfig> sca_listDeployedComposites('localhost','8001','weblogic','password')
wls:/soa_prod_domain/serverConfig> sca_undeployComposite('http://localhost:8001",'composite_name','1.0','weblogic','password');

Method :2:

Check the SOA logs and determine which composite is causing the problem and then follow the below process to undeploy the composite by editing deployed-composites.xml:

1. Download and copy the ShareSoaInfraPartition.ear file to $MIDDLEWARE_HOME/oracle_common/common/bin

2. cd to $MIDDLEWARE_HOME/oracle_common/common/bin

and

run wlst.sh
3.  Connect to a SOA server:

connect()
> Provide the username, password and server URL
connect('weblogic','password','t3://localhost:8001')

4. run the below command to deploy ShareSoaInfraPartition.ear to the server:

deploy('ShareSoaInfraPartition','ShareSoaInfraPartition.ear',upload='true')
5. Now run the below command by changing the "toLocation" ('/fmw11g/fmw1115/Middleware' is some location path on SOA machine)

exportMetadata(application='ShareSoaInfraPartition',server='AdminServer',toLocation='/fmw11g/fmw1115/Middleware',docs='/deployed-composites/deployed-composites.xml')
6. A deployed-composites folder will be created at "toLocation" path with deployed-composites.xml in it

7. Delete the composite which is causing the problem and save the file

For example, the MediatorTest composite:

<composite-series name="default/MediatorTest" default="default/MediatorTest!1.0">
<composite-revision dn="default/MediatorTest!1.0" state="on" mode="active" location="dc/soa_58b98be8-9ec8-41af-bb83-590f6004d1aa">
<composite dn="default/MediatorTest!1.0*soa_58b98be8-9ec8-41af-bb83-590f6004d1aa" deployedTime="2011-11-17T09:01:54.750+05:30"/>
8. Now run the below command by changing the "fromLocation" (this should be the same location as previous)

importMetadata(application='ShareSoaInfraPartition',server='AdminServer',fromLocation='/fmw11g/fmw1115/Middleware',docs='/deployed-composites/deployed-composites.xml')
9. Now bounce your server and the composite will not be deployed by SOA when it comes up and hence that should bring your soa-infra up.

Note:  When you remove a composite that contains task definitions manually, the Task definition references to the composite are still in WFTASKMETADATA table. Even though the composite is not loaded during startup there will be an  exception when loading the task definition,
<Error> <oracle.soa.services.workflow.task>
<BEA-000000> <<.> Could not locate composite.

The references to WFTASKMETADATA for that specific composite/version can only be removed when a composite containing task definitions is cleanly undeployed using em/wlst.

1 comment:

  1. As reported by Stanford Medical, It's really the SINGLE reason women in this country live 10 years more and weigh an average of 19 kilos lighter than we do.

    (And realistically, it has absolutely NOTHING to do with genetics or some secret diet and absolutely EVERYTHING related to "how" they eat.)

    P.S, What I said is "HOW", not "what"...

    Tap on this link to discover if this brief test can help you discover your true weight loss possibilities

    ReplyDelete