Monday, June 5, 2017

How to deploy MDS artifacts (WSDL and Schemas) through Jdeveloper


  1. Create a new application (Generic Application)
    2. Name the application as MDSApp (it can be anything) doesnt matter
     3. Create a Project (name it anything)
     4. Right Click on the project, Select "Project Properties".
    5. Navigate to deployment and Click on New
     6. Select the Archive type as "JAR File".
    7. Click on contributors and  select the folder (where your mds artifacts are located). The Folder structure in your local should be same as MDS location. Select the folder "apps". And click on Filters, to select the files you want to deploy.

     8. Click on application(not project), deploy-> New Deployment profile.
     9.Select SOA Bundle.
    10. Name the deployment profile(leave it as default)
     11. Click on dependencies and select the "archive1" (the jar file you have created in step 6) and Click on "Ok".
     12. Now deploy the application (Not the project) into the server.

Friday, June 2, 2017

Cannot find composite composite.xml in sar file

Problem: 

While deploying the Composite from Jdeveloper, you get the below error.

HTTP error code returned [500]
Error message from server:
There was an error deploying the composite on soa_server1: Error occured in processing sar file sca_testProject_rev1.4.jar before transfering into MDS store. Please make sure the sar file is a valid jar file.: Cannot find composite composite.xml in sar file : sca_testProject_rev1.4.jar. Abort deployment..

Check server log for more details.
Error deploying archive sca_testProject_rev1.4.jar to partition "default" on server soa_server1
####  Deployment incomplete.  ####


Reason:

If you open up the .jar file in deploy folder of the composite, you could find nothing in it or just scac.log and scac_out.xml files will be there. Ideally, your .jar file should contain all the files and folders of the composite.
Note: there is no problem with your composite.xml or any of your other files except ".jpr"

Root cause:

The problem is because of .jpr file in your composite, ".jpr" file help us create the jar file while deploying it to server. Normally if you open the .jpr file you could see below tag
 <hash n="oracle.jdeveloper.deploy.dt.DeploymentProfiles"> (Specifically "<hash n="profileDefinitions">" under that) which will describe what files will be part of .jar file.


Somehow your ".jpr" file is corrupted for your composite.

Solution:

To solve this issue-  Create a new composite (just the project skeleton) with exact same name and just copy the ".jpr" to your old composite which was not getting deploying. That should work.

Note: While creating the new project, create the project with same composite name, BPEL name, namespace as well.