Friday Jul 13, 2012

Deploying Fusion Order Demo on

How to Deploy Fusion Order Demo on SOA Suite

We need to build a demo for a customer, why not use Fusion Order Demo (FOD) and modify it to do some extra things.  Great idea, let me install it on one of my Linux servers I said…

Turns out there are a few gotchas, so here is how I installed it on a Linux server with JDeveloper on my Windows desktop.

Task 1: Install Oracle JDeveloper Studio

I already had JDeveloper with SOA extensions installed so this was easy.

Task 2: Install the Fusion Order Demo Application

First thing to do is to obtain the latest version of the demo from OTN, I obtained the R1 PS5 release.

Gotcha #1 – my winzip wouldn’t unzip the file, I had to use 7-Zip.

Task 3: Install Oracle SOA Suite

On the domain modify the setDomainEnv script by adding “” to JAVA_PROPERTIES and restarting the Admin Server.

Also set the JAVA_HOME variable and add Ant to the path.

I created a domain with separate SOA and BAM servers and also set up the Node Manager to make it easier to stop and start components.

Taking a Look at the WebLogic Fusion Order Demo Application

Note that when opening the composite you will get warnings because the components are not yet deployed to MDS.

Deploying Fusion Order Demo

Task 1: Create a Connection to an Oracle WebLogic Server

If some tests complete when you test the connection to the WebLogic domain but other tests fail, for example the JSR-88 tests, then you may need to go into the console and under each servers Configuration->General->Advanced setting, set the “External Listen Address” to be the name that JDeveloper uses to access the managed server.

Task 2: Create a Connection to the Oracle BAM Server

I can’t understand why customers wouldn’t want to use BAM.  Monitor Express makes it a matter of a few clicks to provide real time process status information to the business.

Oh yes!  I remember now, several customers IT staff have told me they don’t want the business seeing this data because they will hassle the IT department if something goes wrong, and BAM lets them see it going wrong in real time…

Task 3: Install the Schema for the Fusion Order Demo Application

When editing the Infrastructure->MasterBuildScript->Resources make sure that you set jdeveloper.home to the jdeveloper directory underneath the directory that you installed JDeveloper into.  I installed JDeveloper Studio into “C:\JDev11gPS5” so my jdeveloper.home is “C:\JDev11gPS5\jdeveloper”.

Gotcha #2 – the ant script throws an error partway through but does not report it at the end, so check carefully for the following error:

oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg=oracle/jdbc/OracleClob

This occurs because the build.xml does not include the ojdbc6dms library which have CLOB support so in JDeveloper add it to the path “oracle.jdbc.path” in Infrastructure->/DatabaseSchema/Resources build.xml file.

<path id="oracle.jdbc.path">
  <fileset dir="${jdeveloper.home}/../wlserver_10.3/server/lib">
    <include name="ojdbc6.jar"/>
  <fileset dir="${jdeveloper.home}/../oracle_common/modules/oracle.jdbc_11.1.1">
    <include name="ojdbc6dms.jar"/>

Rerun the ant script from Infrastructure/Ant with a target of “buildAll” and it should now complete without errors.

Task 4: Set the Configuration Property for the Store Front Module

Nothing to watch out for here.

Task 5: Edit the Database Connection

Nothing to watch out for here.

Task 6: Deploy the Store Front Module

There is an additional step when deploying, you will be asked for an MDS repository to use.  Best to use the MDS-SOA repository and put the content in its own partition.

Gotcha #3 –when prompted select the mds-soa MDS repository and choose the soa.  Note that this is an MDS partition, not a SOA partition.

Note that when you deploy the StoreFrontServiceSDO_Services application it will populate the local WebLogic LDAP with the demo users.  If this step fails it will be because you forgot to set the “” parameter and restart the Admin Server.

Task 7: Deploy the WebLogic Fusion Order Demo Application

Set up the environment for BAM.

When editing the WebLogicFusionOrderDemo->bin->Resources make sure that you set oracle.home to the jdeveloper directory underneath the directory that you installed JDeveloper into.  I installed JDeveloper Studio into “C:\JDev11gPS5” so my oracle.home is “C:\JDev11gPS5\jdeveloper”.

Gotcha #5a – Make sure that you create directories on the server for the FileAdapter to use as a file directory and a separate control directory and make sure you set the corresponding properties in the file:

  • orderbooking.file.adapter.dir
  • orderbooking.file.adapter.control.dir

Gotcha #5b – Also make sure you set the following properties in the file:

  • managed.server.rmi.port
  • soa.db.username
  • soa.db.password
  • soa.db.connectstring

Note that the property must be set to the ORACLE_SOA_HOME (usually Oracle_SOA1 under the MW_HOME) on the server.

Gotcha #6 – I found that unless I went into the console to each servers Configuration->Protocols->IIOP->Advanced setting, and set the “Default IIOP Username” and “Default IIOP Password” to be the weblogic user the deployment failed.

Gotcha #7 – when deploying BAM objects in seedBAMServerObjects activity I got an exception “java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64” which is caused because the BAM installation under JDeveloper does not have all the required libraries.  To fix this copy the commons-codec-1.3.jar file from the server machine ORACLE_SOA_HOME/bam/modules/oracle.bam.third.party_11.1.1 to the JDev machine ORACLE_JDEV_HOME/bam/modules/oracle.bam.third.party_11.1.1.

Gotcha #8 – when deploying BAM objects in seedBAMServerObjects activity I got an error “BAM-02440: ICommand is unable to connect to the Oracle BAM server because user credentials (username/password) have not been specified.”.  The quick way to fix this is to change to the directory where the import script was created on the JDeveloper machine (ORACLE_JDEV_HOME\bam\dataObjects\load) and run the load script after setting the JAVA_HOME

..\..\bin\icommand -CMDFILE ImportFODBamObjects.xml

I am sure if I spent more time in the ant scripts I could have found what was wrong with the script for deploying this.

Running Fusion Order Demo

You are now ready to place an order through the frontend app at http://soahost:soaport/StoreFrontModule/faces/home.jspx.  The BAM dashboard is available for you to monitor the progress of your order and EM is all set to let you monitor the health of the processes.  Enjoy studying a relatively complex example that demonstrates many best practices such as use of MDS.


Musings on Fusion Middleware and SOA Picture of Antony Antony works with customers across the US and Canada in implementing SOA and other Fusion Middleware solutions. Antony is the co-author of the SOA Suite 11g Developers Cookbook, the SOA Suite 11g Developers Guide and the SOA Suite Developers Guide.


« July 2012 »