Saturday, September 26, 2009

Deploy Soa Suite 11g composite applications with Ant scripts

With Soa Suite 11g you can deploy your composite applications from JDeveloper or with ANT. In this blog I will do this with the SOA 11g ANT scripts. These ant scripts can only deploy one project so I made an ANT script around the SOA ANT scripts which can deploy one or more composites applications to different SOA environments. So now you can use it to automate your deployment or use it in your build tool.
In my ant script I will deploy shared artifacts to the MDS, compile, build and package the composite applications and deploy this to the SOA Server. After this I use an ANT script to start the unit tests and generate a JUnit result XML and at last I can optional disable the composite.
This JUnit XML can be used in your continuous build system. You can easily extend this build script so you use it to manage the composite applications.
For more info over ANT deployment see the official deployment documentation .
The official ANT scripts are located in the jdeveloper\bin folder. Here is a summary of the scripts and what they can do
  • ant-sca-test.xml, This script can start the test suites of the composite and generates a juinit report and not Attaches, extracts, generates, and validates configuration plans for a SOA composite application, The official documentation description is not correct.
  • ant-sca-compile.xml, Compiles a SOA composite application ,this script is also called in the package scrip, so we don't need to call this directly.
  • ant-sca-package.xml, Packages a SOA composite application into a composite SAR file and also validates and build the composite application.
  • ant-sca-deploy.xml, Deploys a SOA composite application.
  • ant-sca-mgmt.xml, Manages a SOA composite application, including starting, stopping, activating, retiring, assigning a default revision version, and listing deployed SOA composite applications.

Here is the main build.properties where you have to define the jdeveloper and your application home, which composite applications you want to deploy and what is the environment dev or acc.


Every application can have one or more SOA projects so the main ant script will load the application properties file which contains all the project with its revision number.
Here is a example of SoaEjbReference.properties file
projects=Helloworld
Helloworld.revision=1.0
Helloworld.enabled=true
Helloworld.partition=default

Because in my example I have two soa environments so I need to create two configuration plans. With this plan ( which look the wls plan ) can change the url of endpoints so it matches with the environment.
Select the composite application xml and generate a configuration plan.
Add the dev or acc extension to the file name.
Here you see how the plan looks like.



And here is the main ANT build script which can do it all and calls the Oracle ANT scripts.

For development testing environment I need to have dev.jndi.properties
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://localhost:8001/soa-infra
java.naming.security.principal=weblogic
java.naming.security.credentials=weblogic1
dedicated.connection=true
dedicated.rmicontext=true


And finally the CMD script to run this ANT script. To make this work we need the ant-contrib library and put this in the classpath of ANT or put it in the ANT lib folder.
set ORACLE_HOME=C:\oracle\MiddlewareJdev11gR1PS3
set ANT_HOME=%ORACLE_HOME%\jdeveloper\ant
set PATH=%ANT_HOME%\bin;%PATH%
set JAVA_HOME=%ORACLE_HOME%\jdk1.6.0_23

set CURRENT_FOLDER=%CD%

ant -f build.xml deployAll


See my github project for the source code https://github.com/biemond/soa_tools
Latest changes.

  • PS3 / PS4 support
  • Activation of the composite
  • partition support
  • Build number generator
  • Build logging
  • SAR and MDS z ipsfiles are bundled under build number.
  • Demo mode, in which you can test the ANT configuration without deploying
The new file structure with a logs and build folder.
 The logging of a run.

201 comments:

  1. Really the blog is usefull and solved most of our questions around ant scripts..

    I am facing an issue while running deployAll.bat file after setting my server properties into build.properties file. My 11g server is up and running.

    Below is the error message:

    deployComposite] Received HTTP response from the server, response code=404
    [deployComposite] Problem in sending HTTP request to the server. Check standard
    HTTP response code for 404
    [deployComposite] ---->response code=404, error:null

    ReplyDelete
    Replies
    1. I have fixed this issue after changing the port in to 7001

      # dev deployment server weblogic
      dev.serverURL=http://localhost:7001
      dev.overwrite=true
      dev.user=weblogic
      dev.password=********
      dev.forceDefault=true
      dev.server=localhost
      dev.port=7001

      Delete
    2. port number is 8001 for soa as we need to deploy to soa-server

      Delete
  2. Hi,

    You can take a look at the admin or soa server log. There should be the real error.

    and you can add more echos to the ant script to see the parameters.

    thanks Edwin

    ReplyDelete
  3. Hi Edwin,

    Thanks for your valueable inputs.

    Could you please explain what is the importants of dev.jndi.properties file. Please provide deatils on eanch entry of this file.Could you please expalin more about the value " t3://localhost:8001/soa-infra ".
    Where i can find this value for my local server.

    Thanks and Regards
    Veeresh

    ReplyDelete
  4. Hi Edwin,
    Just wanted to thank you for the blog and the scripts....It was great help...we were facing the exact issue of finding a simpler way of attaching unit test scripts with deployment and this blog solved it all...

    ReplyDelete
  5. Hi

    Could you please explain what is the importants of dev.jndi.properties file.

    this is the jndi file for the ant test file so it can connect to wls server and dev is the development version of this file.

    Please provide details on each entry of this file.

    you mean jndi file. this are the default for wls. like the server and port number of wls , and username / password.

    Could you please expalin more about the value " t3://localhost:8001/soa-infra ".

    soa suite contains an admin server which runs on 7001 , this holds the em and console webapps. on port 8001 runs the soa wls server and this holds some webservices these are located at soa-infra.

    Where i can find this value for my local server.

    take a look in the wls console and select the soa servers and look at the port number

    thanks Edwin

    ReplyDelete
  6. Hi Edwin,

    Thanks for your reply.

    I have some confusion around this below value. Please clarify.

    t3://localhost:8001/soa-infra.

    This looks as URL for SOA server.
    why we use t3 instead of http.

    if i use http://localhost:8001/soa-infra. the script error out with response code 500.

    But if i use t3://localhost:8001/soa-infra. the script completed successfully.

    Please explain why we use "t3"

    Thank you
    Veeresh

    ReplyDelete
  7. Hi,

    in java you can also use rmi protocols, this is a lot faster then http and this java code needs the rmi protocol and t3 is the wls version of rmi, in oc4j you can use for example ormi.

    http is used in browser and in web services because rmi has different implementation this can't be used everywhere. but this java code contains wls libraries so it can t3

    hope this helps

    ReplyDelete
  8. Thanks for clearing up the command line deployment in Oracle 11g(WebLogic).
    With your insight and experience, wondering if you can answer this question :
    Is it possible to install or have multiple SOA Suites within a signle WebLogic home ? Maybe each SOA Suite in a separate Weblogic domain ? Independant, not load balanced or clustered.

    The Oracle Documentation has a picture of it, but no instructions or additional details.

    ReplyDelete
  9. Hi,

    That is easy just create two or more soa repositories and use the configuration wizard to create a new soa domain and the second soa domain should a different soa repos and have its own port numbers.

    thanks

    ReplyDelete
  10. Hi Edwin, very useful blog. I am having some trouble deploying schemas and wsdl's that utilise the oramds importing technique; when deploying the mds cannot be seen. Is there a workaround?
    Regards and thanks
    Jason

    ReplyDelete
  11. Hi,

    are you using PS1 then see this blog http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html

    when you create a mds connection to the database MDS do you see these files.

    what is the error you get.

    thanks

    ReplyDelete
  12. Edwin,
    I can see the files within Jdeveloper when I create an MDS connection to it. I was using your script that you linked to above and the error in the .err file is:

    scac:
    [scac] Validating composite : 'C:\wesleyan\ReleaseCompositeScript/src/soa/ConfigurationsPS/composite.xml'
    [scac] oracle.fabric.common.wsdl.XSDException: Error loading schema from file:/C:/wesleyan/ReleaseCompositeScript/src/soa/ConfigurationsPS/Config
    urationsPS.wsdl [Cause=Error in getting XML input stream: oramds:/apps/xsd/Configurations_v1.xsd: unknown protocol: oramds]
    [scac] at oracle.fabric.common.wsdl.SchemaBuilder.loadEmbeddedSchemas(SchemaBuilder.java:496)



    Using (in WSDL):
    import namespace="http://www.client.co.uk/client" schemaLocation="oramds:/apps/xsd/Configurations_v1.xsd"

    Seems it doesnt resolve the oramds at deployment time using ANT. Hope this is clear the the error I am receiving. Regards, Jason

    ReplyDelete
  13. Edwin, quick update:
    It seems your Build script does not import the following oramds.jar (Middle Line) inside the ant-sca-compile.xml


    include name="oracle.mds_11.1.1/mdsrt.jar"/
    include name="oracle.mds_11.1.1/oramds.jar"/
    include name="oracle.webservices_11.1.1/orawsdl.jar"/

    So for anyone that has this problem - make sure this library is being imported

    Regards
    Jason

    ReplyDelete
  14. Hi,

    Ok thanks are you using PS1 and do start this build.xml from jdeveloper/bin folder else it cant find it.

    I don't need to include these jars in version R1 & R1 PS1

    i just need to start my build.xml from the jdev bin folder

    thanks

    ReplyDelete
  15. Ah, theres the difference then. We wanted to run the deployAll.cmd from a network drive and not within a Jdeveloper sub directory. This is using 11gR1 PS1. Thanks a lot for the ANT build script.

    Regards
    Jason

    ReplyDelete
  16. hi,

    My client wants to shut down the composite once it is deployed in the prod env using ant scripts.

    Is there any 'sedate' ant scripts supplied with wls that can be called from the main ant build script.

    ReplyDelete
  17. Firstly Thanks a lot for the ANT build scripts.
    Currently one of the other requirements that have come up is to "turn off" the composites once they are deployed.Is it possible to achieve the same?

    ReplyDelete
  18. Hi,

    you can use or include ant-sca-mgmt.xml
    this manages a SOA composite application, including starting, stopping, activating, retiring, assigning a default revision version, and listing deployed SOA composite applications.

    thanks

    ReplyDelete
  19. Hi Edwin,

    Hope you are doing good. I have same requirement of shot down the compoistes once it deployed to server. As you said , there is ant-sca-mgmt out of box Ant command.

    Could you please leverage this in ur current example and post the same. I am wonder, how to use this in current build.xml for every composite.

    Thanks
    Veeresh

    ReplyDelete
  20. Hi,

    I update the blog and example , you can now disable a composite and I added MDS (un) deployment and it works now with 11g R1 PS1

    thanks Edwin

    ReplyDelete
  21. Thank you Edwin.

    I am currently having requirement of checking out code from subversion. I have written custom build.xml to check out the code from subversion. But my build.xml should checkout projects as mentioned by user which will be maintaing in one of projects.properties file.

    Here is my current code where i am facing some error while execution
    Cause: The name is undefined.
    Action: Check the spelling.
    Action: Check that any custom tasks/types have been declared.
    Action: Check that any / declarations have taken place.

    Here is the code snippet
























    and projects.properties file contains
    projects=abc,bcd

    Can you help me to debug this issue

    ReplyDelete
  22. Hi Edwin,

    I got the solution to checkout code on the basis of name listed in one of properties file.

    Thanks for your contineous support

    Regards
    Veeresh

    ReplyDelete
  23. Hi Edwin,

    Hope you are doing good.

    I have one interesting thing to discuss and need your inputs on that.

    The current build.xml, uses sca-deploy.xml and sca-mgmt.xml to deploy the composite first and then to stop the composite.

    So when sca-deploy runs it will deploy the composite in active mode into server, then sca-mgmt.xml will stop composite after few second.

    But my requirement here is the composite should deploy with shutdown mode into server.

    Please share your inputs on this.

    Regards
    Veeresh

    ReplyDelete
  24. Ok,

    this is easy just open your composite.xml and change state attribute from on to off and voila it is disabled.

    <composite name="soaspring" revision="1.0" label="2009-12-12_21-23-28_078" mode="active" state="off"

    thanks Edwin

    ReplyDelete
  25. Thank you edwin,

    Can we pass state or mode as inactive or off to current build.xml while calling ant-sca-deploy.xml.

    Instead of manually editing inside composite.xml, I need to pass as parameter to current build.xml to turn off or shutdown the composite at the time deployment itself.

    Please provide your inputs on this.

    Thanks and Regards
    Veeresh

    ReplyDelete
  26. Hi,

    try to make a configuration plan and try to change this state attribute with this plan.

    and with deployment use this or a other plan to enable or disable it.

    thanks

    ReplyDelete
  27. Hi Edwin,
    Thanks for your reply. I tried to find attribute in configuration plan to control state of composite...but i din't find any such attribute....

    Could you please provide example to achieve this..

    ReplyDelete
  28. Hi Edwin,

    Did you get any solution for controlling turn off state of composite using configuration plan or current build.xml.

    Please provide your inputs.

    Thanks and Regards
    Veeresh

    ReplyDelete
  29. Hi,

    I tested this , but I can only change composite properties like fault policies.

    so then this workaround, disable all composites manually. and enable composites with my ant scripts

    thanks

    ReplyDelete
  30. Hi,

    How are you doing! Is it possible to share the ant scripts that you discussed with Veeresh to turn on the composite.

    Regards

    PS

    ReplyDelete
  31. Hi,

    I updated my ant scripts with start and stop of the composite, just download it again.

    thanks

    ReplyDelete
  32. Hi Edwin,
    How are you.Firstly Thanks a lot for the ANT build scripts.
    Currently one of the other requirements that Java embadded code need to compile from ANT scripts. Can you please update me snippet.

    Thanks,Bharat

    ReplyDelete
  33. Hi Edwin,

    Hope you are doing good.Currently one of the other requirements that need compile the Java Embadded code in BPEL through ANT scripts.

    Is it possible to share the ant scripts for Java Embadded compilation in BPEL.

    Thanks, Bharat Somaraju

    ReplyDelete
  34. Hi,

    I thought that soa ant compile task should do this. Did you have this java code in your composite project and is the java code used in a java callout. Let me know.

    thanks

    ReplyDelete
  35. Hi Edwin,

    We are installing a second 11.1.2SOA Server.

    According to the Oracle docs
    http://download.oracle.com/docs/cd/E15523_01/doc.1111/e13925.pdf

    They show Figure 2-1 Multiple Instances or Oracle SOA Suite on a Single System

    Creating two domains with two admin servers. Is that the preffered way of doing two SOA servers on a single physical box? I assume you cannot have two SOA Server installs under a single domain? I am also assuming that you must have two admin servers?

    The Oracle docs are really light on this subject. Any guidance would be HUGELY appreciated!

    Thanks!

    ReplyDelete
  36. Hi,

    you are right you need to have two domain and every domain got its own admin, soa (server or cluster) and MDS repository.

    for a customer I had 3 domains on 1 server. this works perfectly.

    you can't have two separate soa servers in one domain because the soa server is close connected to the admin server and fmwconfig config.
    For example the soa server uses a datasource called xxx and this connects to the MDS repos. the other soa server needs its own MDS what not possible is

    I know this is high on the wishlist of Oracle because in ESB you got system & groups and BPEL you got domains.

    hopely in PS2 the domains are back.

    thanks

    ReplyDelete
  37. Thanks Edwin! Appreciate the information.

    Any idea when PS2 is scheduled to be released?

    ReplyDelete
  38. Hi,

    I checked it , it is called Composite Folders and it should be released in H1 CY2010, but I think it will be released before the summer.

    thanks

    ReplyDelete
  39. Hi Edwin,

    I am new to BPEL I have developed test cases for my bpel composite whrn I tried to run the test using target called 'test' I am getting an exception called "oracle.fabric.common.FabricException" and stack trace is as follows java.lang.ClassNotFoundException: Failed to load class oracle.fabric.common.FabricException
    at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:208)
    at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:135)
    at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:306)
    at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:399)
    at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:257)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
    at weblogic.rjvm.ResponseImpl.getThrowable(ResponseImpl.java:190)
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:232)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
    at oracle.soa.management.internal.ejb.impl.SOATestBean_ra84ps_SOATestBeanImpl_1031_WLStub.getTestSuites(Unknown Source).

    Can you please suggest me what may be the problem with my bpel test suite.

    Thanks,
    Subba Rao.

    ReplyDelete
  40. Hi,

    are using 11g and did you run the unit test in the enterprise manager.

    Is everything else working fine.

    thanks

    ReplyDelete
  41. Hi,

    Would you also include in your sample ANT script tasks for subversion check-out?

    Thanks.

    ReplyDelete
  42. Hi,

    Thanks for the article.

    I've run my test using ant-sca-test.xml, but how can I generate JUnit report using it ? I tried 'report' task, but it didn't seem to produce anything.

    Thanks & Regards,

    Setya

    ReplyDelete
  43. Hi,

    did you make a testsuite if so then it can generate a report , this can be a xml. The xml is located in the junit.output.dir variable

    thanks

    ReplyDelete
  44. Hi,

    Yes, I run ant-sca-test.xml against my testsuite, it did produce xml file, but I thought it's supposed to be htmls. Then I tried the 'report' target that I think it should do the job since it has 'junitreport' in it, but it produced blank report.

    Thanks & Regards,

    Setya

    ReplyDelete
  45. Hi,

    you should use native as scatest.format or leave it empty

    thanks

    ReplyDelete
  46. Hi,

    Sorry, I didn't look at your examples carefully, turns out that I have to set scatest.format to 'junit', since the default is 'native'.

    Thanks & Regards,

    Setya

    ReplyDelete
  47. Thank you very much for the ANT scripts. They help a lot!
    Our composite uses xpath extension functions which we have a JAR file to contain the registration file and the class. The JAR is added in Jdevloper by going to Tools > Preferences > SOA, and the composite can be compiled and deployed by JDeveloper without problem. However, when using the ANT script, and package failed by giving the error of 'could not resolve xpath function, XXX because function XXX not registered.

    Do you have any idea of where to look for?

    Really appreciate your help!

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

    ReplyDelete
  49. Hi,

    can you try the following.

    put the classes in workspace_home\SCA-INF\classes

    or project_home\SCA-INF\classes or SCA-INF\lib

    or try to set the CLASSPATH in the bat script.

    thanks

    ReplyDelete
  50. Thanks for the prompt response!
    I tried to put the JAR in the following places
    1. workspace_home\SCA-INF\classes
    2. project_home\SCA-INF\classes or SCA-INF\lib
    3. set CLASSPATH=%d:\work;%CLASSPATH% in the bat file (while the JAR is under d:\work\)
    And idea?

    ReplyDelete
  51. Hi,

    can you unpack the jar in those folders and try again

    and let me know

    ReplyDelete
  52. Hi Edwin,
    I'm using the config plan to try to change some variable values inside my bpel process, but i don't know why when i use the Config Plan to deploy my project even the console give a message that it's correct deployed the project is not deployed.
    I thought it was a problem of the server but i built some example projects to test the config plan and it worked fine.
    I only found in the server that during the deployment with a config plan there was a problem maybe during the unzip action of the project.
    Here is the trace messages :

    [2010-05-27T16:31:32.297+02:00] [soa_server1] [NOTIFICATION] [SOA-21043] [oracle.integration.platform.blocks.deploy.servlet] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000IZQBDdC8tlk6wzAhMG1Bzbr^00000A,0] [APP: soa-infra] [arg: c:\temp\sar_base_dir_1274970692172\sca_BPL_ReadEmployees_rev2.2.jar] [arg: default] Deploying SAR file: c:\temp\sar_base_dir_1274970692172\sca_BPL_ReadEmployees_rev2.2.jar to domain: default.
    [2010-05-27T16:31:33.203+02:00] [soa_server1] [NOTIFICATION] [SOA-21038] [oracle.integration.platform.blocks.deploy.servlet] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000IZQBDdC8tlk6wzAhMG1Bzbr^00000A,0] [APP: soa-infra] [arg: c:\temp\sar_base_dir_1274970692172] Removing temporary directory: c:\temp\sar_base_dir_1274970692172.
    [2010-05-27T16:31:33.234+02:00] [soa_server1] [WARNING] [SOA-21060] [oracle.integration.platform.blocks.deploy.servlet] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000IZQBDdC8tlk6wzAhMG1Bzbr^00000A,0] [APP: soa-infra] [arg: c:\temp\sar_base_dir_1274970692172] Cannot remove temporary directory: c:\temp\sar_base_dir_1274970692172
    [2010-05-27T16:31:33.234+02:00] [soa_server1] [NOTIFICATION] [SOA-21057] [oracle.integration.platform.blocks.deploy.servlet] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000IZQBDdC8tlk6wzAhMG1Bzbr^00000A,0] [APP: soa-infra] [arg: sca_BPL_ReadEmployees_rev2.2.jar] [arg: 1.062] CompositeDeploymentServlet-----> completed deploying sca_BPL_ReadEmployees_rev2.2.jar successfully. Time spent: 1,062 sec.

    Do you know how to solve this issue?

    Regards
    Yuri

    ReplyDelete
  53. Hi,

    in the deployment process did you enable override same version.

    or try to clean your c:\temp.

    Very strange

    ReplyDelete
  54. Hi Edwin,

    First of all great blog u got here.. Really helped me alot coz I'm so new to all this.. Anyways.. I have a situation n i need ur help.. I've created ant scripts for my components.. N it runs perfectly for each components.. Now I need to implement a script to test the deployment on a clustered environment.. I have 2 domains on my dev server..

    Any advise on how I go about with it?.. Really appreciate it if you could help me..

    Thank u in advance..~

    ReplyDelete
  55. Hi,

    I think it should work because you to deploy it to a soa server and the server put it in the MDS repos so every Soa server can pick it up.

    thanks

    ReplyDelete
  56. Hi Edwin,

    Thanx for the reply.. It really does work.. Thanx again..~ :)

    ReplyDelete
  57. I'm looping through a directory of BPEL projects and calling the package target within my own ant wrapper. It processed several bpel projects fine and then for some reason, it failed. The reason is it's unable to delete the dist folder (line 131, in the ant-sca-package.xml file.

    I'm using 11.1.1.2 version of JDeveloper. Do you have any ideas?

    ReplyDelete
  58. Hi,

    I don't have a glue, I compared ant-sca-package.xml with the PS2 scripts but there is no difference in that delete part.

    maybe you can change the ant-sca-package.xml script and make a workaround.

    thanks

    ReplyDelete
  59. Hi Edwin,

    Do you know how Maven can be used to deploy SCA components?

    Many Thanks

    Sander

    ReplyDelete
  60. Hi,

    Maven is not supported by Oracle SOA. You have to do it yourself.

    I know the JDev team made a maven plugin but dont think it will support soa / bpm development soon

    thanks

    ReplyDelete
  61. Trying to adapt these scripts for our 11.1.1.2 Linux environment and we get down fairly far in the script when we get this error:

    /u01/oracle/SOA/SOATEST/WEBLOGIC/Oracle_SOA1/bin/ant-sca-test.xml:100: java.lang.NoClassDefFoundError: com/collaxa/cube/ant/AntResources

    Online it shows that class in orabpel-ant.jar but I do not have this jar anywhere in my jDev directories or in the Linux server.

    I should be able to convert this script to be used on Linux correct?

    ReplyDelete
    Replies
    1. Hi Robert/Edwin,
      were you able to solve this error ? I am also getting same error on windows machine.

      Regards,
      Gaurav

      Delete
    2. I got this working. Problem was with jndi.properties path. I added absolute path and it worked.

      Thanks.

      Delete
  62. Hi,

    Very strange, I never had this error and I also dont have this class ( on windows )

    but it should work with jdev ps1 and the soa suite plugin.

    thanks

    ReplyDelete
  63. Hi Edwin,
    Can you please look at my error and respond.

    I am stuck in deploying a simple process through unix. I am successful doing it from client using Jdev and ant (cmd). I copied the Project to unix directory and trying to build and deploy it gives me following error. I don't want to use the MDS Repository, So I said 'foreign.mds.type = jdev'.Can you please help me on this:

    scac:
    [scac] Validating composite : '/u01/app/Workspace/Applications/HelloWorld/HelloWorld/deploy/..//composite.xml'
    [scac] FATAL_ERROR: location {/ns:composite}(12,61): Parse of component type files failed, check the adf-config.xml file : "oracle.fabric.common.FabricException: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
    [scac] MDS-00503: The metadata path "/u01/app/MWoracle/Oracle_SOA1/integration" does not contain any valid directories.
    [scac] : MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
    [scac] MDS-00503: The metadata path "/u01/app/MWoracle/Oracle_SOA1/integration" does not contain any valid directories.
    [scac] : oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
    [scac] MDS-00503: The metadata path "/u01/app/MWoracle/Oracle_SOA1/integration" does not contain any valid directories.
    [scac] : MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
    [scac] MDS-00503: The metadata path "/u01/app/MWoracle/Oracle_SOA1/integration" does not contain any valid directories.
    [scac] "

    BUILD FAILED__
    /u01/app/Workspace/Applications/HelloWorld/HelloWorld/deploy/build.xml:10: The following error occurred while executing this line:
    /u01/app/MWoracle/Oracle_SOA1/bin/ant-sca-package.xml:36: The following error occurred while executing this line:
    /u01/app/MWoracle/Oracle_SOA1/bin/ant-sca-compile.xml:264: Java returned: 1 Check log file : /tmp/out.err for errors

    Here are build.properties and build.xml:

    # build file for your composite
    composite.name=HelloWorld
    # revision of the composite
    composite.revision=1.0
    # Set oracle.home to /jdeveloper, where is JDEV # installation directory
    oracle.home=/u01/app/MWoracle/Oracle_SOA1
    # soa-server side oracle home directory - needed for deployment plans
    # and the weblogic sca library deployment
    soa.server.oracle.home=/u01/app/MWoracle/Oracle_SOA1
    foreign.mds.type=jdev
    ###### Deployment server connection information
    # the admin server connection information
    admin.server.host=xxxx.xxxx.com
    admin.server.port=7001
    # the domain where soa infra is installed
    server.domain.name=ststdomain
    # connection information for the managed server, used for soa-deployment
    managed.server.host=xxxx.xxxx.com
    managed.server.port=8001
    # User and credentials for the servers
    server.user=weblogic
    server.password=webl0gic

    # wls server where soa is targeted.
    server.targets=soa_server1


    --------------------------------------------------------------------------------






























    Deploying to http://${managed.server.host}:${managed.server.port}/soa-infra/deployer

    ReplyDelete
  64. Hi,

    Can you check the adf-config.xml, this need to contain a reference to a internal oracle MDS.

    you always need a MDS, Oracle Soa Suite uses MDS for their composite components . JDev and the server has deze artifacts already installed so only reference to it is needed.

    thanks

    ReplyDelete
  65. Hi Edwin,
    Thanks for the script, that helps a lot!

    I have a problem here that my composite application uses shared object in MDS, thus there is reference as oramds:/apps/itas/FAInterface.wsdl

    This project can be deployed by Jdeveloper without errors. But when running ANT to deploy the composite to the server, it is giving error as

    Caused by: java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/itas/FAInterface.wsdl does not exist.

    1. I checked .adf/META-INF/adf-config, which seems to be fine.
    2. I checked that FAInterface.wsdl file is at the server MDS repository under apps/itas/ by browsing SOA-MDS connection from JDeveloper Resource palette.
    3. I checked ant-sca-compile.xml, and oramds.jar is included in the classpath

    What else can be wrong? Really appreciate your help!

    Grace

    ReplyDelete
  66. Hi Edwin

    I tried ur Zip Ant scripts file and i get this error:

    C:\Oracle\Middleware\jdev_11gR1\jdeveloper\bin\soa11g_ant\soa\tools\ant\build.xm
    l:20: Problem: failed to create task or type if
    Cause: The name is undefined.
    Action: Check the spelling.
    Action: Check that any custom tasks/types have been declared.
    Action: Check that any / declarations have taken place.


    Please help I want to Automate my Deployments.

    Regards
    Emmnauel

    ReplyDelete
  67. Hi,

    please check if you have the ant soa scripts in the jdeveloper bin folder.

    and change these variables with your folders

    set ORACLE_HOME=C:\oracle\MiddlewareJdev11gR1PS1
    set ANT_HOME=%ORACLE_HOME%\jdeveloper\ant
    set PATH=%ANT_HOME%\bin;%PATH%
    set JAVA_HOME=%ORACLE_HOME%\jdk160_14_R27.6.5-32

    set CURRENT_FOLDER=%CD%

    ant -f build.xml deployAll -Dbasedir=%ORACLE_HOME%\jdeveloper\bin

    then it should work

    ReplyDelete
  68. Thanx Edwin

    I was missing this file ant-contrib-1.0b3.jar

    how do u create the mds.zip?
    my deployment failed with this error

    BUILD FAILED
    C:\Oracle\Middleware\jdev_11gR1\jdeveloper\bin\soa11g_ant\soa\tools\ant\build.xm
    l:23: The following error occurred while executing this line:
    C:\Oracle\Middleware\jdev_11gR1\jdeveloper\bin\soa11g_ant\soa\tools\ant\build.xm
    l:43: The following error occurred while executing this line:
    C:\Oracle\Middleware\jdev_11gR1\jdeveloper\bin\soa11g_ant\soa\tools\ant\build.xm
    l:76: The following error occurred while executing this line:
    C:\oracle\Middleware\jdev_11gR1\jdeveloper\bin\ant-sca-deploy.xml:132: sar locat
    ion cannot be found:c:/temp/Woningnet-Test/Woningnet-Test_mds.zip


    please help

    Thanks

    Regards
    Emmanuel

    ReplyDelete
  69. Hi,

    when you don't use MDS disable this and if you do you need to supply the right folder in this build.properties parameter

    mds.applications=Woningnet-Test

    thanks Edwin

    ReplyDelete
  70. Hi,

    I updated my ant scripts so it works with PS1 and PS2, you don't need to set the basedir anymore and it is faster now because it doesn't need to import the soa build xml's .

    http://www.sbsframes.nl/jdeveloper/soa11g_ant.zip

    thanks

    ReplyDelete
  71. Hi Edwin

    I'm new in Ant Script
    I followed your example its builds successfull. but i get this error

    [java] Caused by: oracle.fabric.management.deployedcomposites.mbean.Composi
    teNotFoundException: The configuration file, deployed-composites.xml, does not c
    ontain the default/ReadFile!1.0 composite-revision element


    I checked everything, dont know what I missed.

    Thank in Advance

    ReplyDelete
  72. hi,

    it cant find the ReadFile composite. did you make a reference to this composite.

    thanks

    ReplyDelete
  73. Hi Edwin

    Thanks a lot for your responses.

    I finally managed to deploy my project. But i cant deploy more tha one project.below is my application build.properties :

    projects=DomainValueMap, WriteFile

    DomainValueMap.revision=1.0
    DomainValueMap.enabled=false

    WriteFile.revision=1.0
    WriteFile.enabled=false


    It deploy the first project for the second one it say WriteFile.revision is not defined.

    any idea around this??

    Thanks
    Emmanuel

    ReplyDelete
  74. Hi,

    and when you change projects property to projects=WriteFile,DomainValueMap

    or do they need each other and need to be deployed together.

    thanks

    ReplyDelete
  75. Hi Edwin

    Thanks for your response

    I have an Application with two projects (WriteFile & DomainValueMap)

    so i need to deploy all my projects within my Application.

    when i set the projects property to:

    projects=DomainValueMap

    DomainValueMap.revision=1.0
    DomainValueMap.enabled=true

    projects=WriteFile

    WriteFile.revision=1.0
    WriteFile.enabled=true


    it deploy the last project(WriteFile)

    so when i set to projects=WriteFile, DomainValueMap
    it takes the project with thw revision set first.
    for the second one it say revision not defined

    Thanks
    Emmanuel

    ReplyDelete
  76. Hi,

    more the one project in the project variable seperated with a , should work because I do this.

    foreach list="${projects}" param="project" target="deployProject" inheritall="true" inheritrefs="false"

    strange I will test it

    ReplyDelete
  77. Hi Edwin,

    Thanks a lot for your assistant.

    the order of the property counts

    I managed to deploy all my projects

    if u set projetcs=project1,project2

    the revision should be:

    project2.revision=1.0
    project1.revision=1.0

    I guess.


    Thanks a lot
    Emmanuel

    ReplyDelete
  78. Thank you very much for your articles. They are very complete.
    My name is Rodrigo. I'm from Argentina. I need advice on best practice for the use of CI Hudson in SOA projects.
    This is my current situation.
    Using the script ant-sca-compile and ant-sca-packacge, compile and package the composites. After this, if everything went well, ejectulo the ant-sca-deploy and send the composite to the server. Then, through a script in soapUI (testrunner.bat) run the appropriate tests for the deployed service. If all went well, so there ends my process. But otherwise, I run through ant undeploy-sca-deploy (undeploy) and then again run the deployment of the latest stable version of the service.
    This operation, in several complex services, it is truncated to the middle.
    Think that is a matter of performance of the server configuration? or by an error in the process?
    Thank you very much and I hope your answer.
    Regards

    Rodrigo

    ReplyDelete
  79. Hi,


    Do you have logging on the client ( ant logging, verbosee ) and the logging of the soa_server1.

    maybe this can give you more information.

    thanks

    ReplyDelete
  80. Hi

    The deployment ant scripts were extremely helpful. I am getting an error in the validate composite. I generated a config plan and validated the plan. I could see the replaced values correctly. I have 2 imports in my composite.xml - one is that specific BPEL process wsdl and the other is an external wsdl whose hostname I am changing with searchreplace. This change is not happening.



    What am I doing wrong?

    ReplyDelete
  81. Hi,

    strange the deployment plan is not used in the validation step, it is only used in the deployment step and you can only see the result on the server.

    And the deployment plan needs to have the same name as the composite + _ + XXXX where XXXX = your env name

    thanks

    ReplyDelete
  82. You can also find a much easier and ready to use article on building and deploying soa composites using ant at - http://harishkv.blogspot.com/2010/06/build-and-deploy-soa-composites-using.html

    ReplyDelete
  83. Hello,

    When i deploy a composite, I have the following error :
    [deployComposite] setting user/password..., user=weblogic
    [deployComposite] Processing sar=C:/Developpement/workspace/SOA/Commun\JDEV\Project Routeur/deploy/sca_Routeur_rev1.0.jar
    [deployComposite] Adding sar file - C:\Developpement\workspace\SOA\Commun\JDEV\Project Routeur\deploy\sca_Routeur_rev1.0.jar
    [deployComposite] Creating HTTP connection to host:soa-bpel-qua-01.stef-tfe.fr, port:8001
    [deployComposite] Received HTTP response from the server, response code=500
    [deployComposite] ---->response code=500, error:Error during deployment: Deployment Failed: Impossible de trouver un fichier WSDL ayant une dÚfinition
    pour le service {http://xmlns.oracle.com/Application+Routeur/Project+Routeur/Mediator}Mediator_ep et le port execute_pt. Assurez-vous que l'attribut
    de port de la liaison dÚfinie dans le fichier de composite est correct en vÚrifiant l'espace de noms, le nom de service et le nom de port. De plus, as
    surez-vous que le fichier WSDL associÚ Ó l'espace de noms de liaison est importÚ et est accessible actuellement (vÚrifiez les noeuds d'import dans la
    partie supÚrieure du fichier de composite). Enfin, vÚrifiez les paramÞtres de proxy HTTP pour le serveur..

    Do you have an idea ?

    ReplyDelete
  84. Hi,

    It looks like it can't find a reference WSDL. do you have deployment order problem or put the wsdl in your composite and use this instead of the http address.

    thanks

    ReplyDelete
  85. First of all, big thanks to you Edwin. This article just got me jumpstarted on ant and on config plans.

    I would like to mention one thing though. When I first ran the build.xml, it failed as it could not find junit test cases

    C:\Oracle\Middleware\jdev_home\jdeveloper\bin\ant-sca-test.xml:101: An error occ
    urred while loading test cases. Composite "default/MyServer" does not exist.: Co
    mposite "default/MyServer" does not exist.


    I would like to say that it should not be 'mandatory' to have these test cases. So I modified the
    build.properties on the application level and added a new property
    MyServer.testcases=false

    Then in build.xml, modified an if statement near to target="activateComposite" to read



    It works now

    ReplyDelete
  86. Hi Edwin,
    I am deploying ProviderABCS with the help of the script provided by you but unable to deploy the ABCS because I am not able to set the classpath for AIA.jar properly.
    To over come the same I added aia.jar to classpath in ant-sca-compile.xml. still,scac is not recognizing aia.jar




    Below is the error message

    [scac] The class path setting is incorrect.
    [scac] Ensure that the class path is set correctly. If this happens on the
    server side, verify that the custom classes or jars which this BPEL process is d
    epending on are deployed correctly. Also verify that the run time is using the s
    ame release/version.

    Request you to provide some clue.

    Regards

    Rebonto

    ReplyDelete
  87. Hi,

    did you set the classpath with these to values.
    ;%AIA_HOME%/lib/aia.jar;%AIA_HOME%/lib/aia-utils.jar;

    like they do in the aiaenv.bat.

    thanks

    ReplyDelete
  88. Realy interesting !!

    can you give me a clue how to deploy human tasks used by BPM and BPEL components ?

    ReplyDelete
  89. Hi,

    It can deploy a composite and a composite is a deployment unit which can contain a human task, BPEL, mediator etc.

    So, no problem. It can deploy everything what is in the composite.

    thanks

    ReplyDelete
  90. This blog is very usefull for me. From my composite i call ejb. When i run ant build i was getting erros ns:/composite/ns:wire/ns:target.uri[.=EJBComponent]. on .err file classNotFoundException. Can you help me on this how to use ant file to build my application.

    ReplyDelete
  91. Hi Edwin

    you usin following in your build.xml



    that means, we can deploy multiple SOA applications (i am not talking about multiple projects).

    If i use in properties file following applications sepearted by comma, it deploys ONLY OADApp and deos not deploy second application. what is way ?
    thanks

    applications=OADApp,PostApp

    ReplyDelete
  92. Hi,

    it works perfectly with 2 or more projects.

    add your workspaces separated with a , in the applications param

    in every application/ workspace folder add a property file with the soa projects.

    thanks

    ReplyDelete
  93. Hi Edwin,

    Thanks for your post.

    However when we are trying to deploy the metadata our configuration plan doesnt replace the URLs in the wsdls of the partner link.

    I have a sharedMetaData.zip, which has all the partner link wsdls,xsd,etc.

    I deploy this using ant-sca-deploy and this is the command

    ant -f ant-sca-deploy.xml
    -DserverURL=http://localhost:8001
    -DsarLocation=D:/applications/sharedMetaData.zip
    -Doverwrite=true
    -Duser=weblogic
    -DforceDefault=true
    -Dconfigplan=ABC_cfgplan.xml

    and my config plan is



    http://ip1:port1
    http://ip2:port2

    <search

    ReplyDelete
  94. oops..my config plan didnt come properly in the previous post.




    http://IP:PORT
    http://IP:PORT

    ReplyDelete
  95. Hi,

    do you want to update your MDS and also want to use a deployment plan.

    deployment plan only works with a composite.

    there is no need to put a endpoint in a wsdl. Endpoint is only necessarry in the ws.binding element of the composite reference

    thanks

    ReplyDelete
  96. Hey Ediwn, Thanks for very useful article. i just wanted to check will this script work in linux environment as well?
    I want to run this script from Server environment(SOA11g PS2 Linux. Can you please let me know what all are setup needed at server side to run this script.

    Thanks

    ReplyDelete
  97. Hi,

    I am deploying my BPEL project on Web-logic server through my JDeveloper 11g. its working fine. but when I selected my different environment for deployment(new one) then I got the following error. Error is due to one of my BPEL prcess "TaskProcess1".
    but the same setup when I deploy to my own server its deploying and running very fine.

    code=500
    [04:53:57 PM] Error deploying archive sca_RegistrationUpload_rev24.0.jar to partition "default" on server DAMS_Batch_Server1 [urasvr140.uradevt.gov.sg:8001, Cluster:DAMS_Batch_Cluster]
    [04:53:57 PM] HTTP error code returned [500]
    [04:53:57 PM] Error message from server:
    #;There was an error deploying the composite on DAMS_Batch_Server1: Operation failed - Member(Id=1, Timestamp=2011-06-02 15:25:57.428, Address=172.16.10.45:8088, MachineId=46637, Location=site:uradevt.gov.sg,machine:urasvr140,process:3968, Role=WeblogicServer):Error occurred during deployment of component: TaskProcess1 to service engine: implementation.bpel, for composite: RegistrationUpload: ORABPEL-01005
    #;
    #;Failed to compile bpel generated classes.
    #;failure to compile the generated BPEL classes for BPEL process "TaskProcess1" of composite "default/RegistrationUpload!24.0*soa_f19c6537-e518-4c05-940c-688c1ddb2593"
    #;The class path setting is incorrect.
    #;Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    #;; . Please see the server diagnostic logs on DAMS_Batch_Server1 for details.

    ReplyDelete
  98. Hi,

    When you install jdev with the soa suite extension then it should work on linux

    only have to change the c:/ path in the ant properties files

    thanks

    ReplyDelete
  99. Hi,

    Do you have some custom plugin which are not installed on the new domain or does the domain lib folder of your working domain contains some jars.

    and check your weblogic server logs to see the real error.

    thanks

    ReplyDelete
  100. Hi Andy,

    Can you please tell How to attached the configuration plan.
    Do I need to add the 'configplan' property in build.properties file?


    deployment.plan.environment=dev

    # dev deployment server weblogic
    dev.serverURL=http://localhost:8001
    dev.overwrite=true
    dev.user=weblogic
    dev.password=weblogic
    dev.forceDefault=true
    dev.server=localhost
    dev.port=8001
    dev.configplan=Helloworld_cfgplan_dev.xml

    ReplyDelete
  101. Hi Edwin,
    Can you please tell how to attache the configuration plan?
    Do we need to add the 'configplan' property in build.properties file or configuration file will automatically picked up by ant script?

    ReplyDelete
  102. Hi,

    just create one in the project folder and use this name convention

    ${proj.compositeName}_cfgplan_${deployment.plan.environment}.xml

    like Hello_cfgplan_acce.xml

    and it the ant deploy will use it.

    thanks

    ReplyDelete
  103. Hi,
    Currently I am using using your script to deploy jar file(sar) from jdev.The problem I am facing is that if I have more than one jar file in my folder all the jar gets deployed even though I pass configuration of 1 jar.Here is the buil.properties file

    dev.serverURL=http://localhost:8001
    dev.overwrite=true
    dev.user=weblogic
    dev.password=weblogic11
    dev.forceDefault=true
    dev.server=localhost
    dev.port=8001
    dev.partition=default
    dev.failonerror=true

    projects=EditorProject

    EditorProject.revision=8.0
    EditorProject.enabled=true

    In my folder I have another jar file of HelloWorld.Though I have passed info about EditorProject only,Helloworld jar also get deployed along with EditorProject

    ReplyDelete
  104. Hi Edwin,

    First of all I would like to say Thank you for your wonderful scripts. This blog is really useful for me. I am new to the SOA.

    I am facing an issue while deploying the SOA 11g project from Hudson. The host I am trying to deploy is AIX machine. The idea is Hudson should check out the codes from SVN, compile all the SOA projects and deploy them in WLS which is in AIX. Hudson also deployed in that same WLS.

    I have used the ant scripts provided by you.

    It is failing while the compiling the composite. Getting the following error:

    scac:
    [scac] Validating composite "/home/fmwdev/.hudson/jobs/FirstDevBuild/workspace/TestApplications/Project1/composite.xml"
    [scac] Schema Check ... [+0.1 ms]
    [scac] Loading Composite... [+1.093 sec]
    [scac] scac.properties = {} [+449.4 ms]
    [scac] Parse Composite... [+0.7 ms]
    [scac] FAILED [+2.852 sec]
    [scac] info: Validating composite "/home/fmwdev/.hudson/jobs/FirstDevBuild/workspace/TestApplications/Project1/composite.xml"
    [scac] info: Pass
    [scac] error: location {/ns:composite}(12,61): Parse of component type files failed, check the adf-config.xml file : "oracle.fabric.common.FabricException: oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean"

    In the .err file, the errors are ....

    Caused by: oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean

    Any guidance would be very much appreciated!!!

    ReplyDelete
  105. Issue realted to SOA+Hudson+AIX resolved. Thank you.

    ReplyDelete
  106. Hi,

    You can control which applications and projects you want to deploy.

    In the main properties file you define the applications ( workspaces ) you want to use.

    In the workspace folder there is also a property file and it contains the projects you want to include in the deployment

    Thanks

    ReplyDelete
  107. Hi Edwin,
    Could you please let us know how to deploy projects in to different domain.
    Let's say I have two projects A and B and we want to deploy Project A in 'Default' domain and Project B in 'Custom' domain.


    Thanks,

    ReplyDelete
  108. Hi,

    The solution is to add a project property called partition to the project property file, like helloworld.partition=default

    Then load this property just like the composite version

    Then fill the partition parameter of SOA deploy and undeploy ant task
    Good luck

    ReplyDelete
  109. Thanks again Adwin for quick reply ?…I followed the steps you suggested to deploy the project into specific domain.

    1) Add a project property called partition to the project property file
    helloworld.partition=Custom

    2) load this property just like the composite version


    3) fill the partition parameter of SOA deploy and undeploy ant task

    ..


    Although I am able to deploy project into specific domain, It gives the following error

    compositeMgrTask:
    [java] Connecting to: service:jmx:t3://localhost:8001/jndi/weblogic.management.mbeanservers.runtime
    [java] connection initiated
    [java] javax.management.MBeanException: The configuration file, deployed-composites.xml, does not contain the Custom/HelloWorld!1.0 composite-revision
    [java] at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterMBean.doInvoke(OracleStandardEmitterMBean.java:902)
    [java] at oracle.as.jmx.framework.generic.spi.interceptors.ContextClassLoaderMBeanInterceptor.internalInvoke(ContextClassLoaderMBeanInterceptor.java:94)
    [java] at oracle.as.jmx.framework.generic.spi.interceptors.AbstractMBeanInterceptor.doInvoke(AbstractMBeanInterceptor.java:245)
    ...
    ..
    [java] at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    [java] at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    [java] Caused by: oracle.fabric.management.deployedcomposites.mbean.CompositeNotFoundException: The configuration file, deployed-composites.xml, does not contain the
    HelloWorld!1.0 composite-revision element.

    ReplyDelete
  110. Hi,

    Add partition support to the ANT script ( deploy, activate and test all uses the partition parameter ) and updated the blog and scripts in the zip

    please download the zip again and add the following property to every project in the project.properties file

    myproject.partition=default

    thanks

    ReplyDelete
  111. Thanks Edwin for uploading updated files..it works as expected :)

    ReplyDelete
  112. Hi Edwin,

    Is there way to generate reports for all deployments which we make from the script.Suppose if 10 coposites are deployed using script can we generate any html or xml report which can give statistics like name of all deployed composites,time take for deployment.

    ReplyDelete
  113. Hi,

    this is indeed possible I think I can use this xml ant framework for that.

    http://www.oopsconsultancy.com/software/xmltask/

    Make a template xml and add for every workspace, a new element to the output xml and also for the composites under this workspace together with all the actions and parameters.

    if I have some time I will try it out.

    thanks

    ReplyDelete
  114. Hi Edwin;

    Back to Anonymous' comment back in August 2010.

    I, too, was getting this error:

    [java] Caused by: oracle.fabric.management.deployedcomposites.mbean.Composi
    teNotFoundException: The configuration file, deployed-composites.xml, does not c
    ontain the default/CancelRFXBUYProvABCSImpl!.5 composite-revision element

    And I was deploying ONLY this project, there was only ONE in my application's build.properties file. The day before I had 9 projects to build and the revision was 20.0 and I had the same problem. Because I was lazy and just messing around I changed the version to 20 from 20.0 and it worked. So when I had the same problem today I changed to the version to 1 from .5 and it, too, worked.

    It seem to not like versions with decimal points in them.

    So I am going to change the build.properties file to mimic the ordering recommended by Anonymous to see if it works and I'll let you know.

    Ingrid

    ReplyDelete
  115. Hi,

    I made some changes to the scripts.

    PS3 / PS4 support

    Activation of the composite

    partition support

    Build number generator

    Build logging

    SAR and MDS zip files are bundled under build number.

    Demo mode, in which you can test the ANT configuration without calling the oracle ant files.

    thanks

    ReplyDelete
  116. Hi Edmond;

    I used your new scripts and they mostly worked fine but I still got this error on some of my projects:

    [java] at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    [java] Caused by: oracle.fabric.management.deployedcomposites.mbean.Composi
    teNotFoundException: The configuration file, deployed-composites.xml, does not c
    ontain the default/CreateUpdateRFXBUYProvABCSImpl!1.0 composite-revision element
    .

    THe compile worked fine but the issue occurred in the deploy. The difference in the projects between those that deployed and those that didn't is that the ones that didn't invoked one or more bpel flows running on the same server. This was partially handled by the cfgplan that overlaid the location of the wsdl in the composite.xml. But the WSDL location is also referenced in the projectname.componentType. The cfgplan doesn't seem to overlay it here so I manually did it.

    Also, the log file is great improvement however it did not catch this failure which I think it should:

    -->deployApplication deploy application EbizBuyRFQPO

    ---->deployProject deploy project CreateUpdateRFXBUYProvABCSImpl for environment soadev
    ------>partition default
    ------>compositeName CreateUpdateRFXBUYProvABCSImpl
    ------>revision 1.0
    ------>compositeDir D:\Oracle\Middleware\jdev_bpmbeta\jdeveloper\bin/COSDFMWAPPLICATIONS/EbizBuyRFQPO
    ------>build sar package
    ------>deploy on http://soadev:7012 with user weblogic
    ------>deploy sarFile D:\Oracle\Middleware\jdev_bpmbeta\jdeveloper\bin/COSDFMWAPPLICATIONS/EbizBuyRFQPO/CreateUpdateRFXBUYProvABCSImpl/deploy/sca_CreateUpdateRFXBUYProvABCSImpl_rev1.0.jar
    ------>deployment plan used D:\Oracle\Middleware\jdev_bpmbeta\jdeveloper\bin/COSDFMWAPPLICATIONS/EbizBuyRFQPO/CreateUpdateRFXBUYProvABCSImpl/CreateUpdateRFXBUYProvABCSImpl_cfgplan_soadev.xml
    ------>activate CreateUpdateRFXBUYProvABCSImpl
    ------>unit test CreateUpdateRFXBUYProvABCSImpl
    ------>finish

    I don't know how to catch this type of fault in ANT. If you do you could make this enhancement the next time you are fiddling with these scripts.

    Thanks, Ingrid

    ReplyDelete
  117. Hi Edwin,

    I have a problem deploying composites from Dev to UAT, for example when there is a service that i reference in my composite and when on that service they change the schema/XSD.

    when i use Ant to deploy it validate the XSD in Dev with the one in UAT and my deploy fails.

    any Idea, which propety i can change not to validates schemas?

    Thanks

    ReplyDelete
  118. Hi,

    I don't know why you want to do this.

    And by way you should put the reference wsdl or xsd in your own project or in the mds (much better )

    then it will use the local wsdl and xsd to validate and only need the endpoint to the reference composite.

    if you don't do that you can get invalid composites while starting the soa server.

    thanks

    ReplyDelete
  119. Hi
    Thanks for such a nice help. This is very very helpful to us.
    I have a question here. I am setup my custom build.xml and build.properties file in the Jdev along with composite. I have followed your instruction. Now i am facing an error as given below
    ===================================

    deployProject:
    [echo] deploy project ${project} for environment ${deployment.plan.environment}

    BUILD FAILED
    D:\Debarshi\AllLocalWorkSpace\CorelogicDevApplication\Project1\build.xml:216: Property '${project}.revision' is not defined.

    Total time: 0 seconds
    ============================
    I am attaching build.properties file here also.

    ----------------------------------
    ********************************

    projects=Project1

    Project1.revision=2.0
    Project1.enabled=true
    Project1.partition=default



    # demo = true , then no soa scripts will be called.
    demo.mode=false

    # global
    wn.bea.home=D:/oracle/Middleware
    java.passed.home=${wn.bea.home}/jdk1.6.0_23
    # PS4
    #wn.bea.home=D:/Oracle/MiddlewareJDevPS4
    #java.passed.home=${wn.bea.home}/jdk160_24
    oracle.home=${wn.bea.home}/jdeveloper
    wl_home=${wn.bea.home}/wlserver_10.3

    # temp
    tmp.output.dir=c:/temp
    junit.output.dir=../../

    # my settings
    applications.home=../../applications
    applications=CorelogicDevApplication

    # my settings
    mds.repository=C:/oracle/Middleware/jdeveloper/integration/seed/apps/
    mds.applications=Woningnet-Test

    #demo applications
    #applications.home=workspaces
    #applications=wrkspc1,wrkspc2

    #demo mds locations
    #mds.repository=mds/seed/apps/
    #mds.applications=company,common

    mds.enabled=true
    mds.undeploy=true

    deployment.plan.environment=dev

    # dev deployment server weblogic
    dev.serverURL=http://fada1wad02.firstam-reis.net:7001
    dev.overwrite=true
    dev.user=ofmwAdmin
    dev.password=*ofmwbea
    dev.forceDefault=true
    dev.server=fada1wad02.firstam-reis.net
    dev.port=7001

    # acceptance deployment server weblogic
    acc.serverURL=http://fada1wad02.firstam-reis.net:7001
    acc.overwrite=true
    acc.user=ofmwAdmin
    acc.password=*ofmwbea
    acc.forceDefault=true
    acc.server=fada1wad02.firstam-reis.net
    acc.port=8001

    #==================================================


    *********************************

    ReplyDelete
  120. Hi

    Can you check these parameters
    applications.home=../../applications
    applications=CorelogicDevApplication

    it looks like it cant find the build.properties inside this CorelogicDevApplication folder.

    else add more echo in ANT.

    thanks Edwin

    ReplyDelete
  121. Hi Edwin;

    I have built our deployment using this as a model. I am however having problems deploying the ADF Worklist forms. Should I compile and deploy them as separate tasks from the BPEL Composites? When I deploy the composite that includes a worklist adf form the form has deployed (in one case, a simple one) but it's deployment shows as FAILED on the server. The other forms are not deploying at all. Do you have any samples of compiling the ADF Java form, creating the ear and war files and doing the deploy to the server? I think this is what I will have to do.

    Ingrid

    ReplyDelete
  122. Hi,

    Indeed you need to do a different deployment not like soa. You need to deploy it as a normal war /ear to the adminserver and not against the soa server. And I think it has to be deployed under the workflow url.

    don't know what jdev normally generates but if it is like a normal adf app then Oracle puts a lot of stuff in an ear ( adf-config and jazn). War is relatively easy (just a deployment profile ), else you can better use ojdeploy utility to generate the ear or war.

    thanks

    ReplyDelete
  123. Hi Beimond,
    Will the deployment plan take care of updating the host port in the componenttype file.
    or is there any seperate tag/code i need to add to replace the hostname in the componettype file.

    ReplyDelete
  124. Hi Edwin;

    Back to my side job of deployments... now I am moving the deployment scripts from my PC to UNIX. I have got it to the point where it's starting the validation and compile however.... the last thing it displays is

    scac:
    [scac] Validating composite "/home/ijackson/composites/CoSDEAIA_EbizBuyRFQPO/CancelRFXBUYProvABCSImpl/composite.xml"
    [scac] Schema Check ... [+30.4 ms]
    [scac] Loading Composite... [+397.3 ms]
    [scac] Parse Composite... [+25.7 ms]
    [scac] Parse ComponentTypes [+2.113 sec]
    [scac] Getting MetaDataManager [+15.0 ms]
    [scac] Getting WSDL Manager [+0.2 ms]
    [scac] Done with Load Composite [+107.0 ms]
    [scac] Loading WSDLs ... [+0.3 ms]
    [scac] WSDL [CancelRFXBUYProvABCSImplRef.wsdl]
    [scac] WSDL [oramds:/apps/cosdeaia/UtilityArtifacts/RuntimeFault.wsdl]
    [scac] WSDL [DeleteDownLoadHistoryHeaderOnly.wsdl]
    [scac] WSDL [DeleteDowLoadHistoryForLine.wsdl]
    [scac] WSDL [DeleteSolAttachText.wsdl]
    [scac] WSDL [DeleteSolAttachFile.wsdl]
    [scac] WSDL [DeleteBuyerSubmissionComments.wsdl]
    [scac] WSDL [DeleteAwards.wsdl]
    [scac] WSDL [DeleteSubmissions.wsdl]
    [scac] WSDL [DeleteRFXLine.wsdl]
    [scac] WSDL [DeleteRFQLineLocations.wsdl]
    [scac] WSDL [SelectSolAttachIdForHeader.wsdl]
    [scac] WSDL [SelectSolAttachmentLine.wsdl]
    [scac] WSDL [SelectTextSolAttachForHeader.wsdl]
    [scac] WSDL [SelectSolAttachForLine.wsdl]
    [scac] Validating WSDLs ... [+224.6 ms]

    FREEZESTOPFREEZESTOP

    There is nothing put in the .err files ANYWHERE it just stops. I have looked endlessly at the classpaths and found one problem but it stopped at the same place after I corrected it. Any ideas of how I could troubleshoot this? Is there a log somewhere that I am missing?

    I have not changed any of the jvm args. Do you think that could be the problem? They are the same as on my desktop.

    jvmarg value="-Xms128m"
    jvmarg value="-Xmx1024m"
    jvmarg value="-XX:PermSize=32m"
    jvmarg value="-XX:MaxPermSize=256m"


    Ingrid

    ReplyDelete
  125. Hi,

    I think he is trying to download and validate a wsdl and the http location is not found and maybe because of the high tcp timeout parameters he is forever waiting.

    please check this else try to isolate this by making simple testcases.

    thanks

    ReplyDelete
  126. Hi Edwin,

    I have a BPEL process with references to external web services.

    I'm configuring a continuous integration environment.

    In the SVN, the BPEL process has the references to DEV environment of the web services.

    So, in my CI environment I checkout the code from the SVN, then run sca_package and sca_deploy.

    On sca_deploy I use a config plan to replace the urls, so the process is deployed referencing CI web services.

    But it fails the sca_compile, because DEV web services aren't accessible.

    What do u suggest to solve this?

    Regards,

    ReplyDelete
  127. Hi,

    your reference services (the wsdl and xsd ) should always be in the MDS like described here.

    http://blogs.oracle.com/aia/entry/aia_11g_best_practices_for_dec

    you only need the endpoint on runtime

    If you don't this you can also get invalid composite when the server reboots or the other is deployed before the other.

    thanks

    ReplyDelete
  128. @Robert, I have the same problem as you. Have you solved the issue?

    ReplyDelete
  129. Hi Marinus,

    Did you download jdeveloper for linux / generic and downloaded the soa plugin.

    Cant use it on a soa middleware home.

    thanks

    ReplyDelete
  130. hi edwin

    can u explain me how to deploy from jdev(using ant)not with command prompt.i have generated build.xml and build.properties files using jdev. i have no idea where to add the weblogic server hostnames and password .and while deploying i am getting java.awt headless exception .please help

    ReplyDelete
  131. Hi,

    you can import, move the build.xml and properties files into a jdeveloper project and run it from there.

    the bat files jars and path you can add to the jdeveloper project.

    thanks.

    ReplyDelete
  132. Hi Edwin,

    I am deploying composites to servers using scripts. Everything is working fine other than one composite where i am using custom xpath functions.The composite fails to build itself using scripts.

    That composite is getting builded fine using JDeveloper.

    Now my doubt is did i have to point the script to that custom functions jar?

    ReplyDelete
    Replies
    1. Hi,

      Can you put the jar in the classes dir of the composite.







      this is a snippet from the compile ant script

      thanks
      thanks

      Delete
    2. <!-- jars needed to run scac ant task -->
      <path id="scac.tasks.class.path">
      <!-- project classpath -->
      <pathelement path="${scac.input}/../classes"/>
      <pathelement path="${scac.input}/../SCA-INF/classes"/>

      Delete
  133. Thank you Ed,

    With out your help we might have suffered a lot.

    Posting this for the help of other users.

    Got the way. Just placed xml file(config xml file for custom functions) in the sca-inf/classes/meta-inf folder and placed the class file(not jar) inside sca-inf/classes folder.(placed the same structure of the package. i.e if the class is com.util.example created util directory inside the com directory and placed the com directory inside sca-inf/classes folder)

    ReplyDelete
    Replies
    1. Hello Suriya and Edwin,

      I am facing the same issue while compiling composite referring to custom XPath functions using ant script. It fails during compilation.

      I have placed jar files under Workspace\SCA-INF\classes
      But still no luck.

      I was going through Suriya Reply..Can you please explain config xml file for custom functions. i didn't get this point.

      Please help me with steps..Its very urgent. Thanks inadvance.

      Delete
  134. Hi Edwin,

    I see you suggest having one configuration file per environment like one for dev, one for test and one for PROD etc. Have you come across a way of having just one template configuration file and have a way to replace with appropriate url's using properties file or something? Currently I am investigating to see if that is possible. Please let me know your suggestions on this

    ReplyDelete
    Replies
    1. Hi,

      that is possible with ANT , I saw a blogpost on this
      http://albinoraclesoa.blogspot.com/2012/03/oracle-soa-11g-generic-plan-file-to.html

      just need to generate a xml before you deploy with ANT.

      thanks

      Delete
    2. Thanks Edwin, I happened to notice that already. I was wondering is if there is any other approach that you may aware of, otherwise thanks a lot for the response.

      Delete
  135. Hi Edwin,
    Problem Description: When i run the ant-sca-test i am getting the below exception. I have run the setSOADomainEnv.cmd to set the classpath. Is there anything else i need to do? We are using SOA 11.1.1.5 on dev environment. ant-sca-compile and others are working.

    Command
    --------------------------------------------------------------------------
    ant -f ant-sca-test.xml -Dscatest.input=HelloSyncTestSum -Djndi.properties=C:/Oracle/Middleware/scajndi.properties

    Error
    ---------------------------------------------------------------
    [scatest] javax.naming.NameNotFoundException: Unable to resolve 'FacadeFinderBean'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'FacadeFinderBean'. Resolved '']; remaining name 'FacadeFinderBean'
    [scatest] at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
    [scatest] at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
    [scatest] at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    [scatest] at weblogic.jndi.internal.ServerNamingNode_1035_WLStub.lookup(Unknown Source)
    [scatest] at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
    [scatest] at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)

    Thanks

    ReplyDelete
    Replies
    1. Hi

      does scajndi.properties has a reference to the soa server and not to the admin server.

      thanks.

      Delete
  136. Hi Edwin,

    My ant scripts were working fine but when we started to use Custom XPATH function, they are failing with the following error:
    in HosActivationFactService.bpel(120): could not resolve xpath function "writeLog", because function "logging:writeLog" not registered.
    [scac] error: in HosActivationFactService.bpel(140): could not resolve xpath function "writeLog", because function "logging:writeLog" not registered.

    Project is getting built from Jdev.

    Thanks,
    Saurav

    ReplyDelete
    Replies
    1. Hi

      did you see this comment

      Suriya narayananMarch 2, 2012 11:32 AM

      Thank you Ed,

      With out your help we might have suffered a lot.

      Posting this for the help of other users.

      Got the way. Just placed xml file(config xml file for custom functions) in the sca-inf/classes/meta-inf folder and placed the class file(not jar) inside sca-inf/classes folder.(placed the same structure of the package. i.e if the class is com.util.example created util directory inside the com directory and placed the com directory inside sca-inf/classes folder)

      Delete
  137. Hi Edwin,

    I've seen that it's possible to change a reference endpoint using a deployment plan o changing the right property in the EM console, but I've a doubt, I need customized url for input service endpoints in a composite, do you know how it could be done?

    Thanks in advance,

    ReplyDelete
    Replies
    1. Can you tell me more in detail what you exactly means

      thanks

      Delete
  138. Hi Edwin,

    I created sharedritfacts.zip and deployed the jar file. Where exactly (directory location) can i find my deployed artifacts.

    Note we are not implementing AIA and AIA is not installed as part of soa suite install

    Thanks
    Charandeep

    ReplyDelete
    Replies
    1. Hi,

      on the soa server, its in the MDS db, you can make a mds connection to it from jdeveloper

      thanks

      Delete
  139. Hi Edwin,

    We have created a jar file to log the BPEL information in a composite. Now when I tried to compile the composite with the ant-sca-package.xml as per your script it is unable to find the jar file. Below things I have tried.

    1. I have set the command line variable CLASSPATH
    2. Updated the ant-sca-compile.xml to include my jar file to the <Path scac.tasks.class.path

    When I run ant with debug mode, I see that -classpath is having my jar file in the classpath, but in the out.err, I see totally different classpath. Do you know how to overcome this problem?

    ReplyDelete
    Replies
    1. Hi,

      did you also add it to the sca-inf/classes or sca-inf/lib folder of your bpel composite.

      Delete
  140. Hi Edwin,
    your blog is full of interesting information on Oracle SOA Suite and i'm glad to you for this.

    Now let's talk about my problem, i need an hint on deployments process. I deployed my application (7 composites) without problems, but sometimes i have to fix some bugs and redeploy the affected composite.
    In this case running instances of the redeployed composite will be terminated and this isn't a good thing.

    Are there some better way to manage deploy without terminate running instances?

    Thank you a lot.

    ReplyDelete
    Replies
    1. Hi,

      In that case you should do raise the composite version and deploy that one (make that default) and retire the previous version. New request will be handled by the default composite and retired composite will finish current instances.

      hope this helps

      thanks

      Delete
    2. Mhh ok, i have two additional questions:

      1) Is it possible to "migrate" running instances from old to new revision?
      2) Can i terminate one instance with all its childs? On EntrerpriseManager terminate button only close the main instance.

      Thank you!

      Delete
    3. Hi,

      I know with PS5, there are more options ,especially with BPM. but if you change too much you will get some problems.

      2) don't think so but maybe you can kill the childs , this will also crash the main composite.

      thanks

      Delete
  141. Hi Edwin,

    I am trying to redeploy a SOC composite.I have created a batch file that contains all the required commands for redeploying the SOA composite.

    following is the batch file created

    ECHO Disabling the SOA composite
    call ant -f D:\Oracle\Middleware\Oracle_IDM1\server\workflows\registration\registerworkflows-mp.xml disable
    PAUSE
    call ant -f d:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml undeploy
    PAUSE
    call ant -f d:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml
    PAUSE
    call ant -f D:\Oracle\Middleware\Oracle_IDM1\server\workflows\registration\registerworkflows-mp.xml enable

    Disable and enable are working fine. But for undeploy and deploy I am getting the following error.

    "d:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml:78: taskdef class oracle.integration.platform.blocks.deploy.servlet.client.ant.DeployCompositeTask not found"

    when I run the same commands from a normal command prompt every thing is working fine.

    Please suggest what needs to be done to resolve this issue as this is very urgent.Thanks in advance for your help.

    Thanks

    ReplyDelete
    Replies
    1. Hi,

      maybe it is a classpath issue changed by one of the previous scripts or it uses a relative paths to the jars and you should run it from the soa bin folder.

      thanks.

      Delete
  142. Hi Edwin,
    Thanks for the the great blog.
    It would be great if you could clarify my doubts about SOA composite deployment.
    As we see we have a depnedecy on MDS while compilation and deployment of SOA composites for common XSD, WSDL etc.So when we move our deployable (SAR) from CERT to PROD adf-config.xml part of SAR file gets moved to PROD, so we have compile the code against prod MDS reference then deploy to PORD.
    Is it the right approach for SOA deployment?
    How we complie once and deploy to multiple environment using env specif config plan, with out warrying about MDS entry available in adf-config.xml?
    Is there any way we can change those MDS entry from adf-config.xml while deploying to a targer sewrver using configuration plan?

    Thanks,
    Biltu

    ReplyDelete
    Replies
    1. Hi,

      First, your composites and MDS should be separate deployments and keep them in sync. Build them once on DEV , deploy them together to PROD and use config plans to update endpoints to the PROD ones.

      And keep in mind composites WS references should use MDS wdsl's and not be depended of remote or local ws endpoints at deploy time.

      thanks

      Delete
  143. Hi Edwin,
    I am trying to deploy the SOA applications on a dev environment; the script works fine and deploys the projects successfully which I verified from EM console; and the build is successful; but I see the below error (I saw some references to this error in the comments thread; and I already see the script having wljmsclient.jar in the jar loaded list). I did enable tunneling as well in the console. Please advise any other possible reasons/resolutions?

    ompositeMgrTask:
    [java] Connecting to: service:jmx:t3://AHOST.in.oracle.com:10101/jndi/webl
    ogic.management.mbeanservers.runtime
    [java] java.net.MalformedURLException: Unsupported protocol: t3
    [java] at javax.management.remote.JMXConnectorFactory.newJMXConnector(J
    MXConnectorFactory.java:327)
    [java] at oracle.fabric.management.deployedcomposites.CompositeManagerH
    elper.createJMXConnector(CompositeManagerHelper.java:91)
    [java] at oracle.fabric.management.deployedcomposites.CompositeManager.
    initConnection(CompositeManager.java:48)
    [java] at oracle.fabric.management.deployedcomposites.CompositeManagerA
    ntWrapper.execute(CompositeManagerAntWrapper.java:221)
    [java] at oracle.fabric.management.deployedcomposites.CompositeManagerA
    ntWrapper.main(CompositeManagerAntWrapper.java:275)
    [echo] finish

    BUILD SUCCESSFUL
    Total time: 45 seconds

    Thanks,
    Ajit.

    ReplyDelete
    Replies
    1. Hi,

      maybe you can generate wlfullclient and use that instead of all the weblogic jars. the jmx url looks fine.

      thanks

      Delete
  144. Hi Edwin,
    I am trying to use your script but i am getting following error.
    I am not sure what you are expecting in applications property in build.properties
    I have given the path of my jdev mywork where my application reside.
    C:\Kesko\Build>ant -f build.xml deployAll
    Buildfile: build.xml

    deployAll:
    [echo] date = 2012-10-11 17:20:58
    [echo] build = 10
    [mkdir] Created dir: C:\Kesko\Build\builds\10

    deployApplication:
    [echo] deploy application ${applications}

    deployProject:
    [echo] deploy project ${projects} for environment ${deployment.plan.environ
    ment}

    BUILD FAILED
    C:\Kesko\Build\build.xml:68: The following error occurred while executing this l
    ine:
    C:\Kesko\Build\build.xml:204: The following error occurred while executing this
    line:
    C:\Kesko\Build\build.xml:216: Property '${projects}.revision' is not defined.

    I have pasted my build.properties file below.
    # demo = true , then no soa scripts will be called.demo.mode=false
    #global
    wn.bea.home=C:/oracle/MiddlewareJdev11gR1PS3
    java.passed.home=C:/Java/jdk1.6.0_31
    # PS4
    #wn.bea.home=D:/Oracle/MiddlewareJDevPS4
    #java.passed.home=${wn.bea.home}/jdk160_24
    oracle.home=${wn.bea.home}/jdeveloper
    wl_home=C:/Oracle/Middleware/wlserver_10.3
    # temp
    tmp.output.dir=c:/temp
    junit.output.dir=../../
    # my settings
    applications.home=C:/JDeveloper/mywork/HudsonSOABuild
    applications=C:/JDeveloper/mywork/HudsonSOABuild
    # my settings
    mds.repository=C:/Harsh/MyMDS/apps
    mds.applications=Woningnet-Test

    #demo applications
    #applications.home=workspaces
    #applications=wrkspc1,wrkspc2
    #demo mds locations
    #mds.repository=mds/seed/apps/
    #mds.applications=company,common

    mds.enabled=true
    mds.undeploy=true
    deployment.plan.environment=dev
    # dev deployment server weblogic
    dev.serverURL=http://localhost:7001
    dev.overwrite=true
    dev.user=weblogic
    dev.password=welcome1
    dev.forceDefault=true
    dev.server=localhost
    dev.port=7001
    # acceptance deployment server weblogic
    acc.serverURL=http://localhost:7001
    acc.overwrite=true
    acc.user=weblogic
    acc.password=welcome1
    acc.forceDefault=true
    acc.server=localhost.port=7001

    With Regards,
    Harshwardhan

    ReplyDelete
    Replies
    1. Hi,

      applications.home means the home where all the workspace folders exists.
      applications, contains the workspaces you want to build
      in the workspace folder you should have a property file with all the projects you want to build.

      thanks.

      Delete
  145. Hi Edwin,

    Seeking your advice on an issue I have stumbled upon. Several of our soa composites have reference to the concrete wsdl of AIAAsyncErrorHandlerBPELProcess from em console. As a result, the composites get undeployed every time the server is restarted. Since these composites are already in production, is there any way we can redeploy the jars with a modified configuration file that'll refer to the AIAAsyncErrorHandlerBPELProcess concrete wsdl from MDS ? Is it possible that the file be made global so that all the Requestor and Provider ABCS having reference to AIAAsyncErrorHandlerBPELProcess points to MDS? what would the configuration file be like? Kindly guide me in achieving the same.

    Sincere Thanks,
    Chandrika Mitra

    ReplyDelete
    Replies
    1. Hi,

      Did you see this blogpost https://blogs.oracle.com/aia/entry/aia_11g_best_practices_for_dec and can you put this aia error wsdl + xsd in the mds

      thanks

      Delete
  146. It's realy good blog for build and deploymet.

    ReplyDelete
  147. Hello,

    I am facing an issue to deploy Customizable Composite...
    Can you tell me if it is possible to compile and package Customizable Composite from command line ?

    Best regards

    ReplyDelete
    Replies
    1. Hi,

      Can you explain what you mean with Customizable Composite and soa suite composites can only be compiles and packaged from jdeveloper or using the ANT scripts.

      Thanks

      Delete
  148. This comment has been removed by the author.

    ReplyDelete
  149. Hi Edwin,

    When I talk about customizable composite I mean SOA Suite composite services based on generic templates.
    So, we define templates in JDev with Default role, and then we fill template in customization developer role.

    I can compile standard composites from ant-sca-compile or ant-sca-package, but with template based composite it does not work. In JDev, it is the same thing, if I compile my customizable composite with default role it does not work, I need to do it in customization developer role.

    In fact, I would like to compile composites as if I would open JDev in Customization Developer role rather than Default role, but with command line.

    Best regards

    Alex

    ReplyDelete
    Replies
    1. Hi,

      Interesting, I think SOA suite always uses the internal ANT for compiling in JDeveloper maybe they provide some extra parameters. Can you check the sca-out of the composite, there should be some extra info about the compiling.

      Thanks

      Delete
  150. Hi Edwin,
    Thanks for this article.

    is there any way to get HTML report output as a Junit result instead of XML ? I couldn't find any attribute in ant-sca-test.xml

    Regards,
    Gaurav

    ReplyDelete
    Replies
    1. Hi,

      soa junit output is xml but you use a xlst to generate html or let hudson invoke the unit tests and read back the xml result plus present it in the hudson console.

      Thanks

      Delete
  151. This comment has been removed by the author.

    ReplyDelete
  152. Hi Edwin,
    Thanks for this article.This is very helpful.

    I've a question to you.I'm explaining the scenario first:
    My SOA application containing one composite and a task flow project.Now I'm able to build and the deploy the composite jar along with the task flow project ear from jdeveloper.But when I'm using ant script for the same I'm building and deploying the composite jar to soa server first and then packaging the war and ear for the taskflow project like a j2ee project.
    Is that the right approach to build and deploy the task flow project separately in this way?Could you please tell me the best approach for this to build and deploy the both?
    regards,
    Anirban

    ReplyDelete
  153. Hi Edwin,

    I tried using the above script to compile and deploy my business rules composite, but it failed in compilation itself. On investigating, I could see that we add an extra library to our project, which is 'Oracle Rules'. Now how do I make sure that my code gets compiled from my ANT script. I mean where do I place this library, since it is not a custom one.

    Thanks in advance

    ReplyDelete
    Replies
    1. Hi,

      Can you try this placed the class file(not jar) inside sca-inf/classes folder or inside sca-inf/lib
      Please check the comments of this blogpost , you are not the first :-)

      Thanks

      Delete
    2. what do u mean when u say to place the classpath and not the jars?

      Delete
  154. what do u mean when u say to place the classpath and not the jars?

    ReplyDelete
  155. Can someone tell me which all class files have I to place in the classes folder because for the 5 jars, there are many class files, are all of them needed..?
    Expecting a quick response as it's a little urgent.

    Thanks in advance

    ReplyDelete
    Replies
    1. Hi,

      Can you put them in the sca-inf/lib of your composite

      the compile ant task uses this as classpath.






      Thanks

      Delete
    2. <!-- jars needed to run scac ant task -->
      <path id="scac.tasks.class.path">
      <!-- project classpath -->
      <pathelement path="${scac.input}/../classes"/>
      <pathelement path="${scac.input}/../SCA-INF/classes"/>

      Delete
  156. Hi Edwin,

    I am new to SOA 11g and i am trying to deploy a composite along with the test suites to SOA Server from JDEV. The deployment says its complete with no errors. But on the EM console under UnitTest Tab for the Composite i do not find my test cases.

    ReplyDelete
    Replies
    1. Hi,

      Can you check your project ( also in the generated sar/jar ) it should contain a folder testsuites with some test suite folders and these should contains some xml's

      Thanks

      Delete
  157. Hi Edwin,

    We have SCA and OSB components (SOA 11g), and we are generating error mails from OSB/SCA in failure scenarios. For this, we configure error codes in OSB proxy service and in fault policy of SCA composite. We have to upload these error codes in a database table, along with an email id to generate the error mail for the corresponding error code.

    Now we have a requirement to directly upload these error codes in the database during the deployment of the OSB/SCA using ant script. At present we are using ant scripts (ant osb and ant sca) to deploy the projects. Would really be helpful if you can help us in uploading the error codes also during the osb/sca ant deployment.

    Though of something like, create an osb (for role based authentication which takes the error code and email id in input) and it proxies a sca composite, which in turn updates the details in database using db adapter. This proxy service needs to be invoked from the existing ant script during the deployment of the new obs/sca projects containing the error code/email id.

    Regards,
    Arnab

    ReplyDelete
    Replies
    1. Hi,

      Can't you use a DVM , this can be deployed with a composite and can be edited in the soa composer.

      Or create an pre-deployment extra task in ANT which retrieves the error codes, generates a SQL script and start sqlplus which does a merge on the right database.

      http://incanto.sourceforge.net/usage-sqlplus.html

      Thanks

      Delete
    2. Hi Edwin,

      Thank you so much for your reply.

      What I have done is, using the below property in ant script itself, I am updating the database using insert query in a block. And the record exists, then it call an update query. Ignore the space between the tag below:

      < sql driver="${sql.driver}" url="${sql.url}" userid="${sql.user}" password="${sql.pass}">
      insert into ${sql.table} values (${id},'${name}');
      < /sql>

      We are reading the sql parameters from a build.properties file and the query parameters from a deployment.properties kept inside the osb/sca project and referencing these property files from the build.xml file.

      Do let me know your thoughts on this implementation. If you want I can mail you the files also.

      Regards,
      Arnab

      Delete
  158. Hi Edwin

    we have a shared environment where Applicaton teams share their jar files along with configplans
    will it be possible to tweak this script , so that we can deploy already buid jar files along with corresponding config plan.

    ReplyDelete
    Replies
    1. Hi

      With ANT everything is possible , there are no limitations

      Thanks

      Delete
  159. hello Edwin,

    I have follow your instruction, but I face the problem with MDS.
    how to obtain the value of MDS config? I could not find apps folder and the name of application in ...../jdeveloper/integration/seed.
    mds.repository=C:/oracle/MiddlewareJdev11gR1PS3/jdeveloper/integration/seed/apps/
    mds.applications=Woningnet-Test

    best regards,
    sophea

    ReplyDelete
    Replies
    1. Hi,

      you have your own MDS apps folder in svn or create this under integration/seed/apps

      To compile this in BPEL you probably have a 2nd apps entry in the adf-config.xml
      like this https://github.com/biemond/soa_tools/blob/master/maven_soa_suite_ps5/source2/.adf/META-INF/adf-config.xml

      thanks

      Delete
  160. Dear Edwin,

    Do we have to deploy MDS first before we can deploy SOA composite application with ant script?

    best regards,
    sophea

    ReplyDelete
    Replies
    1. Hi,

      Indeed always else you will get composites errors when they have a reference to MDS

      Delete
  161. Dear Edwin,

    I have already completed to deploy business process using ant script. Can you please suggest me what would be my next work?

    Best Regards,
    Md. Siddiqur Rahman

    ReplyDelete
    Replies
    1. Hi,

      Maybe you can try to do some CI , with building in Hudson, testing with JUnit, archiving in Nexus and make a separate hudson deployment process which can deploy to different environments.

      for this it is maybe easier to switch to maven

      thanks

      Delete
  162. Hi Edwin

    First of all thanks for very informative blog.

    we have a soa cluster with two managed servers (soa_server1 & soa_server2)
    I want to access wsdl with common url. We have a os level load balancer is it possible to have it as a url which can refer to both the managed server 1&2 and work based upon which ever managed server is running ?

    ReplyDelete
    Replies
    1. Hi,

      you can add your load balancer address to the soa server ( somewhere in the EM common soa properties )

      Thanks

      Delete
  163. Hi Edwin,

    Thanks for the blog.
    Is there a way to deploy a composite as different version from what it was build? For eg. I build a composite as 1.0 but while deploying can I deploy it as 2.0? I checked the ant-sca-deploy. But it does not accept revision as input. Any pointers?

    Thanks.

    ReplyDelete