If you have struggled getting the demo community users loaded for Oracle SOA Suite and BPM in 12c, you are not alone. Quite a bit has changed with Oracle’s demo community seed application we’ve been using for years.  The purpose of this is to help you get the demo users seeded for your 12.2.1.2 installation.

Other than a few blog posts referenced at the bottom of this blog post (the best was by Peter van Nes1), the changes you need to make to install the demo users in 12.2.1.2 are not documented.  I thought it would be helpful to share the information I learned from the various sources, and consolidate it here for a simple Windows Oracle SOA / BPM installation environment.  This assumes little or no knowledge of Ant.

Download a Fresh Copy of the DemoCommunitySeedApp

1. Download and unzip the workflow-001-DemoCommunitySeedApp.zip application from here: workflow-001-DemoCommunitySeedApp.

2. Unzip the file (it unzips into a ..workflow-001-DemoCommunitySeedApp directory where the ant script and the ear is located).

Edit the build.properties File

3. Open the build.properties file in this directory and edit it to match your environment. I have a simple environment with an Admin server (that uses port 7001) and a SOA managed server (that uses port 7003). For the bea.home setting, it should be the directory that has “wlserver” as one of its subdirectories (to keep things simple, this blog assumes that this directory is “C:OracleOracle_Home”).

 build.properties file edits

Edit the build.xml File

4. Open the build.xml.  At the top there are properties.  Change the “target” property to match the same name as the one in the build.properties file you entered in the last step:

<property name="target" value="soa_server1"/>

5. If the ant script build is run now, it will fail with a “Validation failed for bea.home” error.  In the buld.xml file, find the wls.home property. Change the “wls.home” property directory’s name from “../wlserver_10.3” to “../wlserver” as shown here:

<property name="wls.home" value="${bea.home}/wlserver"/>

6. Change the bea.home property in this file to the same setting it was given in the build.properties file. This is the physical oracle home directory has a “wlserver” subdirectory. In my case this is:

<property name="bea.home" value="C:\Oracle\Oracle_Home"/>

7. In his blog referenced below1, Peter van Nes figured out that because their URIs are no longer accessible in SOA 12c, this text in the file needs to change from:

<or>
<not><http url="${server.url}/integration/services/IdentityService/identity"/></not>
<not><http url="${server.url}/integration/services/IdentityService/configuration"/></not>
</or>

to:

<or>
<not><http url="${server.url}/integration/services/IdentityService/identity?WSDL"/></not>
<not><http url="${server.url}/integration/services/IdentityService/configuration?WSDL"/></not>
</or>

Open a Command Prompt

8. Execute these statements (customized for your environment) from the command prompt:

set MW_HOME=C:OracleOracle_Home
set ANT_HOME=%MW_HOME%oracle_commonmodulesorg.apache.ant_1.9.2
set JAVA_HOME=C:Javajdk1.8.0_101
set PATH=%JAVA_HOME%bin;%ANT_HOME%bin;%PATH%

The “Problem: failed to create task or type if” error

9. If the ant script is run now, this error will occur:

"Problem: failed to create task or type if" Error

This was caused by the build.xml file having <if> statements and the ant-contrib.jar that handles these for ant scripts is not in the classpath. Copy the file from:

C:OracleOracle_Homeoracle_commonessextensibility_scriptsantlib

into this directory:

C:OracleOracle_Homeoracle_commonmodulesnet.sf.antcontrib_1.1.0.0_1-0b3libant-contrib.jar

10. In the build.xml file, add this text below the last property definition in the file (about line 20) so the script will be able use <if> statements:

<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${bea.home}/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar"/>
</classpath>
</taskdef>

Download the 12c Version of the SOATestDemoApp.ear File

11. If you were to run the ant script right now, you would get a null pointer exception. Go to the Oracle support website and search for the document: “2172289.1”. This has a link to download the 12c version of the SOATestDemoApp.ear file. Copy this ear file into the directory where the build.properties is located and rename it to overwrite the existing SOATestDemoAppp-wls.ear file.

Run the Ant Script 

12. From the command prompt, change to the directory to where the build.xml is located. Run the ant script:

      ant seedDemoUsers

13. Verify that the users were loaded correctly into the default WebLogic security realm by logging into the Admin console.  Click Security Realms -> click myrealm.  The users shown below should be listed when the Users and Groups tab is selected.

Users in the Security Realm

 

References:

1. “Fixing the SOA Demo Community Seeding Utility for SOA 12.2.x” by Peter van Nes: http://www.reddipped.com/2016/10/fixing-the-soa-demo-community-seeding-utility-soa-12-2-x/

2. “Demo User Community in BPM 12c Quickstart” by Darwin: http://blog.darwin-it.nl/2014/10/demo-user-community-in-bpm-12c.html

3. “Oracle Fusion Middleware Administrator’s Guide for Oracle SOA Suite and Oracle Business Process Management Suite”: https://docs.oracle.com/cd/E23943_01/admin.1111/e10226/appx_users.htm#SOAAG335