OSB Deployment scripts

UPDATE: For deployment scripts …. see my new post https://nitinaggarwal.wordpress.com/2014/04/04/osb-deployment-scripts-11-1-1-7-using-configtool/


There are several OSB posts regarding the OSB Deployment Scripts available on the internet.

For Oracle Service Bus 10.3 & 11g you can use the ANT / WLST deployment scripts provided by Oracle.

I went through the post by Edwin


This is the most straight forward to use and works without making much changes.

It is all self explanatory and you can read the post + the read me file for the details

Very important! Do this on a copy of your workspace or use subversion because maybe you need to delete the .metadata folder for a successful export. ( you will loose all your workspace settings )


Step by step instructions

Ant OSB deployment scripts for OSB PS5 patch set 5

deploy 1 or more OSB project from a OEPE workspace to a jar with the exportFromWorkspace ant target
deploy an OSB to an OSB server with the importToOSB ant target
export a project from an OSB server with a deployment plan with the exportToOSB ant target

A weblogic middleware home
matching OEPE
matching OSB install

How to run

change osb.bat or osb.sh depending on whether you are running on windows or shell with you own settings.

set FMW_HOME=C:\Oracle\OSB11116
set ANT_HOME=%FMW_HOME%\modules\org.apache.ant_1.7.1
set PATH=%ANT_HOME%\bin;%PATH%
set JAVA_HOME=%FMW_HOME%\jdk160_29
export FMW_HOME=/opt/oracle/wls/wls11g
export ANT_HOME=/opt/apache/apache-ant-1.8.4
export PATH=$ANT_HOME/bin:$PATH
export JAVA_HOME=/usr/java/jdk1.7.0_07

change the build.properties file with your setting and what you want to deploy

I made the following changes to make it work for My Project

wls.username      = weblogic
wls.password      = welcome1
wls.server        = t3://localhost:7001
# properties for workspace export
#config.project="OSB Configuration"
# export properties
# specify a project or use None
#export.project    = None
#export.customFile = None
export.project    = GenericProxyService
export.jar        = ${basedir}/export/NYS_GP.jar
export.customFile =  ${basedir}/plans/GP_CustomisationFile.xml
# import properties
# specify a project or use None
#import.project    = None
#import.jar        = ${basedir}/export/NYS_ALL.jar
#import.customFile = None
import.project    = None
import.jar        = ${basedir}/export/NYS_ALL.jar
import.customFile = ${basedir}/plans/GP_CustomisationFile.xml

run osb.bat or osb.sh  to set the environment

Then chose which target you need to run out of the following.
ant -f build.xml exportFromWorkspace
ant -f build.xml importToOSB
ant -f build.xml exportToOSB


One comment

  1. Hi Nitin,
    this is not a comment, I wanted to ask you one thing on where I trying to import jar to osb..
    I set all build files and updated according to my requirement. But i m getting error like …. compatabilityMServer is disabled via Jmex bean. So seems i suspect the sbconsole needs to have create or edit mode to deploy or to do any activity right. Hence unable import to osb. Kindly advice if I m missing anywhere here. Thanks a lot for ur great support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s