Wednesday, July 18, 2012

Undeploying SOA Composite while soa-infra is down in Oracle SOA Suite

Undeploying SOA Composite while soa-infra is down in Oracle SOA Suite:

Recently we had an issue with soa-infra start-up, soa-infra application won’t come up due to corrupt composite. 

We have followed the Meta link note 1380835.1 to un-deploy the corrupted composite and bring up the soa-infra application.

Thought of sharing the same here, it may help whoever facing the same issue.

The SOA composites can’t be un-deployed when the soa-infra application. The below steps will help you to un-deploy the SOA composites when the soa-infra application is down.
  • First check the soa logs and identify which composite is causing the problem
  • Download and copy the ShareSoaInfraPartition.ear file to $MWHOME/Oracle_SOA/common/bin
  • Execute $MWHOME/Oracle_SOA/common/bin/wlst.sh
  •  connect()
             Provide username, password and server URL
  • Run the below command to deploy ShareSoaInfraPartition.ear
                 deploy('ShareSoaInfraPartition','ShareSoaInfraPartition.ear',upload='true')
  • Now run the below command by changing the "toLocation" ('/fmw11g/Middleware' is some location path on SOA machine)
   exportMetadata(application='ShareSoaInfraPartition',server='AdminServer',toLocation='/fmw11g/Middleware',docs='/deployed-composites/deployed-composites.xml')
A deployed-composites folder will be created at "toLocation" path with deployed-composites.xml in it
  • Delete the composite which is causing the problem from deployed-composites.xml and save the file
          for example FormatDate composite like below
            <composite-series name="default/FormatDate" default="default/FormatDate!1.0">
                  <composite-revision dn="default/FormatDate!1.0" state="on" mode="active"   location="dc/soa_b8c8782b-776e-42c3-8519-d29fdfb72032">
                 <composite dn="default/FormatDate!1.0*soa_b8c8782b-776e-42c3-8519-d29fdfb72032"  deployedTime="2012-07-11T04:14:47.665-07:00"/>
                </composite-revision>
            </composite-series>
  • 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')

 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.

DOWNLOAD ShareSoaInfraPartition.zip


16 comments:

  1. Hi Albin,

    I installed SOA suite in my machine and created a domain etc. When I log into the EM I see the soa-infra as new but not active. Why is it so? I am very new to fusion and would appreciate any information from you.

    Thank you,
    Salome

    ReplyDelete
    Replies
    1. Check for any error messages in the server log file.

      Regards
      Albin I

      Delete
  2. genarally we ll follows Archive is on the machine where this web browser is running. for deploy the applications from machine

    but i want to deploy from the server?what are the steps to folllow?

    ReplyDelete
  3. Hello,
    Can you please tell me the meaning of soa infra means..???
    What is the use of this soa infra..??

    Regards,
    Mithun

    ReplyDelete
  4. Thanks Albin, this is very helpful. It saved my day !

    ReplyDelete
  5. soa-infra means the soa infrastructure application deployed into SOA server.


    All the deployed Composites life cycles will be managed by this application.

    soa-infra should be up to deploy or undeploy or manage a composite application

    Regards
    Albin I

    ReplyDelete
  6. Hi Albin,

    just wanted to know what is the directory location of the final jar of the composites deployed in any domain.
    Although i know composites and there artifacts are stored in database(mds and soa-infra schema) but curious to know about any directory or xml file that contains the info about all the deployed composites in any domain.

    Thanks and Regards
    -Ashish

    ReplyDelete
  7. check into the following location - $SOA_SERVER_HOME/dc

    Regards
    Albin I

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Hey Hi Albin,
    i hv followed the above steps nd getting problem in the 'Connect' step.even if i provide the correct url it is giving the error"Error getting the initial context.There is no server running at URL(which i hv provided)".please help if there is any other reason or configuration for this error other than Url prblm....

    ReplyDelete
  10. Hi,

    Recently I have followed your blog post and found it useful. One thing to comment and possibly add to this is to ensure the when running Step regarding "exportMetadata", please ensure that the jdbc mds local tx datasource is targeted to the Admin Server. Othersie you will get error running the command. By Default on our environment, this datasource was only targeted to the SOA Nodes.

    This will hopefully save others falling fowl of the same issue

    Thanks Again
    Dave Gaskell (Griffiths Waite)

    ReplyDelete
  11. Hi Albin,

    In this case, do the composite gets deleted permanently, or is that it is only not shown in the list of composites?

    Regards,
    Sai

    ReplyDelete
    Replies
    1. No it does not get deleted. Only the reference will be removed. The actual jar file will be in same location $SOA_SERVER_HOME/dc

      $SOA_SERVER_HOME will be something like this - Oracle/Middleware/user_projects/domains/DEV/servers/SOAServer/dc

      Delete
  12. Hi Albin,

    I have restated SOA Server 10-12 times.and it got restarted and running state but the problem is in SOA-INFRA which always coming in Failed state.

    I checked the log as well

    and getting this message

    "Spining ...........Sleeping for 5000 milliseconds oracle.tip.mediator.common.error.ErrorDBLocker"

    In log file after four line this the above message is coming.

    Could you please help me into that.

    ReplyDelete