Installing Oracle SOA Suite 12c


 

Hi All,

As you all know that the Oracle 12c is out now… this is the first Major release where oracle has now combined the Oracle Service Bus with the SOA Suite Install… and its apparently only a 30 min single installation…

So firstly download the soa suite  from http://download.oracle.com/otn/nt/middleware/12c/121300/fmw_12.1.3.0.0_soaqs_Disk1_1of1.zip

 

This contains

SOA Suite 12.1.3 Size: 2.97 GB, Check Sum: 1579850769

Note: The generic SOA Suite Quick Start Installer for developers is used on all platforms. It allows you to quickly install a development or evaluation environment on a single host computer. It includes Oracle BPEL Process ManagerOracle Human WorkflowOracle Business Rules, Oracle Mediator, Oracle Service BusTechnology Adapters Oracle Enterprise Scheduler, SOA Spring Component, Enterprise Manager Fusion Middleware Control, Oracle JDeveloper with SOA IDE extensions and an integrated WebLogic Server and Java DB.

 

You can see the official quick start guide at http://docs.oracle.com/middleware/1213/core/SOAQS/integrated.htm#BEIJCGGE

 

Few things to note are

It needs JDK 1.7 so I downloaded (64 Bit) that from http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-windows-i586.exe

Next Set your JAVA_HOME

 

SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_60

 

For Linux

 

JAVA_HOME=$HOME/top_level_folder_jdkversion
export JAVA_HOME

 

Now we are all set to go….Open Command Prompt.

 

 IMPORTANT: It needs you to run that in admin mode.

 

Search for cmd.exe in the Start menu. Right-click the cmd.exe and select Run as Administrator.

 

In the command prompt, use the Java executable from the JDK on your system. Your command may look like this:

 

%JAVA_HOME%\bin\java -jar fmw_12.1.3.0.0_soa_quickstart.jar I did this and got the error in the screenshot… soa8
Note by default windows installs to Program files location which has a space so I had to use “” with “JAVA_HOME” and then it fired just fine. C:\Nitin\SOA\SOA12c>”%JAVA_HOME%”\bin\java -jar fmw_12.1.3.0.0_soa_quickstart.jar

 

soa7

soa6

soa5

soa4

soa3

That’s it now it’s time to sit back and relax….

soa2

soa1

soa11

Once you hit finish it launches Jdeveloper for the first time… Prompts to select the role I chose the studio role and allowed to import preferences from my previous installs which is optional.

soa10

soa9


ALL DONE…. Happy Developing….

 

Please leave your feedback in comments.

OSB Deployment scripts 11.1.1.7 using configtool


These instructions are only valid for OSB Release 11.1.1.7 onwards.

 

How to export desired projects using the configjar utility

 

The configjar tool is located in the OSB installation directory under

C:\oracle\Middleware11117\Oracle_OSB1\tools\configjar

[Check the path relative to your install]

Run the setenv.cmd

And execute the

C:\oracle\Middleware11117\Oracle_OSB1\tools\configjar\configjar.bat -settingsfile C:\OSB_Deployment\OSBPS6_MavenConfigTool\nysolutions_export_projects.xml

 

Where the nysolutions_export_projects.xml file contains the names of the projects and the configuration files and the desired output filename.

 

 

 

The nysolutions_export_projects.xml I used for this post was

 

 

 

    <source>
        <project dir="C:\Users\nitina\osbworkspace\Contracts"/>
        <project dir="C:\Users\nitina\osbworkspace\NYSService1"/>
        <project dir="C:\Users\nitina\osbworkspace\NYSService2"/>
        <project dir="C:\Users\nitina\osbworkspace\NYSService3"/>
        <system  dir="C:\Users\nitina\osbworkspace\nys-conf"/>
    </source>
    <configjar jar="C:\OSB_Deployment\OSBPS6_MavenConfigTool\export\NYSsbconfig.jar">
         <projectLevel includeSystem="true"/>
    </configjar>
    
</configjarSettings>

 

 

 

 

Complete list of options and commands are available in oracle documentation at http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/app_export.htm#BABDJJIA

 

Export Settings File Schema Definition

Below is the schema definition for the export settings XML file. Some of the text below has been wrapped for readability.

<?xml version="1.0"?>
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:tns="http://www.bea.com/alsb/tools/configjar/config">
<xs:element name="configjarSettings" type="tns:configjarSettings"/>
<xs:complexType name="configjarSettings">
   <xs:sequence>
      <xs:element name="source" type="tns:source" />
      <xs:element name="configjar" type="tns:configjar" maxOccurs="unbounded"/>
   </xs:sequence>
</xs:complexType>
<xs:complexType name="source">
   <xs:sequence>
      <xs:choice minOccurs="1" maxOccurs="unbounded">
         <xs:element name="project">
            <xs:complexType>
               <xs:attribute name="dir" type="xs:string" use="required"/>
            </xs:complexType>
         </xs:element>
         <xs:element name="system">
            <xs:complexType>
               <xs:attribute name="dir" type="xs:string" use="required"/>
            </xs:complexType>
         </xs:element>
      </xs:choice>
      <xs:element name="extensionMapping" minOccurs="0">
         <xs:complexType>
            <xs:sequence>
               <xs:element name="mapping" minOccurs="0" maxOccurs="unbounded">
                  <xs:complexType>
                    <xs:attribute name="type" type="xs:string" use="required"/>
                  <xs:attribute name="extensions" type="xs:string"
                                use="required"/>
                  </xs:complexType>
               </xs:element>
            </xs:sequence>
         </xs:complexType>
      </xs:element>
     <xs:element name="fileset" type="tns:contentSet" minOccurs="0"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="configjar">
  <xs:sequence>
      <xs:choice minOccurs="1" maxOccurs="1">
         <xs:element name="projectLevel" type="tns:projectLevel"/>
         <xs:element name="resourceLevel" type="tns:resourceLevel"/>
      </xs:choice>
  </xs:sequence>
  <xs:attribute name="jar" type="xs:string" use="required"/>
  <xs:attribute name="overwrite" type="xs:boolean" use="optional"
 default="true"/>
</xs:complexType>
<xs:complexType name="projectLevel">
   <xs:sequence>
      <xs:element name="project" type="xs:string" minOccurs="0"
                  maxOccurs="unbounded"/>
   </xs:sequence>
   <xs:attribute name="includeSystem" type="xs:boolean" use="optional"
               default="false"/>
</xs:complexType>
<xs:complexType name="resourceLevel">
   <xs:sequence>
      <xs:element name="resources" type="tns:contentSet" minOccurs="0"/>
   </xs:sequence>
   <xs:attribute name="includeDependencies" type="xs:boolean" use="optional"
                 default="true"/>
</xs:complexType>
<xs:complexType name="contentSet">
   <xs:sequence>
      <xs:element name="include" type="tns:contentSetPattern" minOccurs="0"
                  maxOccurs="unbounded"/>
      <xs:element name="exclude" type="tns:contentSetPattern" minOccurs="0"
                  maxOccurs="unbounded"/>
   </xs:sequence>
</xs:complexType>
<xs:complexType name="contentSetPattern">
  <xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:schema>

 

 

Sample configSettings.xml generated using eclipse

 

<?xml version="1.0" encoding="UTF-8"?>
  <tns:source>
    <tns:project dir=""/>
    <tns:extensionMapping>
      <tns:mapping extensions="" type=""/>
    </tns:extensionMapping>
    <tns:fileset>
      <tns:include name=""/>
      <tns:exclude name=""/>
    </tns:fileset>
  </tns:source>
  <tns:configjar jar="" overwrite="true">
    <tns:projectLevel includeSystem="false">
      <tns:project>tns:project</tns:project>
    </tns:projectLevel>
  </tns:configjar>
</tns:configjarSettings>

 

 

Step 2

 

Create a ALSBCustomizationFile.xml which contains all the config settings.

 

Step 3

 

Run the deployment scripts to deploy the NYSsbconfig.jar file generated above…

Update the wlst with environment specific values deployToServer.py

java weblogic.WLST deployToServer.py

 

Where the deployToServer.py file is

from java.util import HashMap
from java.util import HashSet
from java.util import ArrayList
from java.io import FileInputStream
from com.bea.wli.sb.util import Refs
from com.bea.wli.config.customization import Customization
from com.bea.wli.sb.management.importexport import ALSBImportOperation
import sys
#=======================================================================================
# Entry function to deploy project configuration and resources
#        into a ALSB domain
#=======================================================================================
def importToALSBDomain():
    try:
        SessionMBean = None
        print 'Attempting to import :', importJar, "on ALSB Admin Server listening on :", adminUrl
        theBytes = readBinaryFile(importJar)
        print 'Read file', importJar
        sessionName = createSessionName()
        print 'Created session', sessionName
        SessionMBean = getSessionManagementMBean(sessionName)
        print 'SessionMBean started session'
        ALSBConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
        print "ALSBConfiguration MBean found", ALSBConfigurationMBean
        ALSBConfigurationMBean.uploadJarFile(theBytes)
        print 'Jar Uploaded'
        if project == "None":
            print 'No project specified, additive deployment performed'
            alsbJarInfo = ALSBConfigurationMBean.getImportJarInfo()
            alsbImportPlan = alsbJarInfo.getDefaultImportPlan()
            alsbImportPlan.setPassphrase(passphrase)
            alsbImportPlan.setPreserveExistingEnvValues(true)
            importResult = ALSBConfigurationMBean.importUploaded(alsbImportPlan)
            SessionMBean.activateSession(sessionName, "Complete import without customization using wlst")
        else:
            print 'ALSB project', project, 'will get overlaid'
            alsbJarInfo = ALSBConfigurationMBean.getImportJarInfo()
            alsbImportPlan = alsbJarInfo.getDefaultImportPlan()
            alsbImportPlan.setPassphrase(passphrase)
            operationMap=HashMap()
            operationMap = alsbImportPlan.getOperations()
            print
            print 'Default importPlan'
            printOpMap(operationMap)
            set = operationMap.entrySet()
            alsbImportPlan.setPreserveExistingEnvValues(true)
            #boolean
            abort = false
            #list of created ref
            createdRef = ArrayList()
            for entry in set:
                ref = entry.getKey()
                op = entry.getValue()
                #set different logic based on the resource type
                type = ref.getTypeId
                if type == Refs.SERVICE_ACCOUNT_TYPE or type == Refs.SERVICE_PROVIDER_TYPE:
                    if op.getOperation() == ALSBImportOperation.Operation.Create:
                        print 'Unable to import a service account or a service provider on a target system', ref
                        abort = true
#                elif op.getOperation() == ALSBImportOperation.Operation.Create:
                else:
                    #keep the list of created resources
                    print 'ref: ',ref
                    createdRef.add(ref)
            if abort == true :
                print 'This jar must be imported manually to resolve the service account and service provider dependencies'
                SessionMBean.discardSession(sessionName)
                raise
            print
            print 'Modified importPlan'
            printOpMap(operationMap)
            importResult = ALSBConfigurationMBean.importUploaded(alsbImportPlan)
            printDiagMap(importResult.getImportDiagnostics())
            if importResult.getFailed().isEmpty() == false:
                print 'One or more resources could not be imported properly'
                raise
            #customize if a customization file is specified
            #affects only the created resources
            if customFile != "None" :
                print 'Loading customization File', customFile
                print 'Customization applied to the created resources only', createdRef
                iStream = FileInputStream(customFile)
                customizationList = Customization.fromXML(iStream)
                filteredCustomizationList = ArrayList()
                setRef = HashSet(createdRef)
                # apply a filter to all the customizations to narrow the target to the created resources
                for customization in customizationList:
                    print customization
                    newcustomization = customization.clone(setRef)
                    filteredCustomizationList.add(newcustomization)
                ALSBConfigurationMBean.customize(filteredCustomizationList)
            SessionMBean.activateSession(sessionName, "Complete import with customization using wlst")
        print "Deployment of : " + importJar + " successful"
    except:
        print "Unexpected error:", sys.exc_info()[0]
        if SessionMBean != None:
            SessionMBean.discardSession(sessionName)
        raise
#=======================================================================================
# Utility function to print the list of operations
#=======================================================================================
def printOpMap(map):
    set = map.entrySet()
    for entry in set:
        op = entry.getValue()
        print op.getOperation(),
        ref = entry.getKey()
        print ref
    print
#=======================================================================================
# Utility function to print the diagnostics
#=======================================================================================
def printDiagMap(map):
    set = map.entrySet()
    for entry in set:
        diag = entry.getValue().toString()
        print diag
    print
#=======================================================================================
# Utility function to read a binary file
#=======================================================================================
def readBinaryFile(fileName):
    file = open(fileName, 'rb')
    bytes = file.read()
    return bytes
#=======================================================================================
# Utility function to create an arbitrary session name
#=======================================================================================
def createSessionName():
    sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
    return sessionName
#=======================================================================================
# Utility function to load a session MBeans
#=======================================================================================
def getSessionManagementMBean(sessionName):
    SessionMBean = findService("SessionManagement", "com.bea.wli.sb.management.configuration.SessionManagementMBean")
    SessionMBean.createSession(sessionName)
    return SessionMBean
# IMPORT script init
try:
    # import the service bus configuration
    adminUser    = "weblogic"
    adminPassword= "weblogic1"
    adminUrl     = "t3://soabpm-vm:7001"
    importJar    = "export/NYSsbconfig.jar"
    customFile   = "ALSBCustomizationFile.xml"
    passphrase   = "osb"
    project      = "NYSService1"
    connect(adminUser,adminPassword,adminUrl)
    domainRuntime()
    importToALSBDomain()
except:
    print "Unexpected error: ", sys.exc_info()[0]
    dumpStack()
    raise

 

That’s it all done…you can then check on the sbconsole that the changes have all been deployed.

Oracle Service Bus   View Configuration Changes