Wednesday 16 December 2015

Remote debugging on SOA 12c.

In SOA Suite 12c it is now possible to do step-by-step debugging of your composites, including introspection of your messages and variables.
This is enabled by default in the DefaultDomain of the SOA QuickStart.
But how to do so with a remote server? It is not enabled by default on seperate servers.

A moment ago I saw this tip on the community forum, which states that you have to enable it by adding the following lines to your setDomainEnv.cmd/sh:
export SOA_DEBUG_FLAG="true"
export SOA_DEBUG_PORT="5004"

You can find out all about it here in the docs.

Thursday 10 December 2015

Silent install SOA/BPM 12c QuickStart

Since september 2014, SOA & BPM Suites are available as 12c Release 1. As you may know, the biggest difference in developer experience is the introduction of the QuickStarts, that installs a JDeveloper including a preconfigured IntegratedWeblogic that has the SOA and BPM components have installed. So there is no direct need for a complete Development Server to run and test your developments. By the way, in a project I do think you'll still need a Development Environment to do the end2end testing of your team's complete solution.

But with SOA & BPM 12c you can't do with the standard JDeveloper 12c Studio.

For the SOA 12.2.1 QuickStart a description of the installation process is described here. For BPM the installation is the same, as well as for the 12.1.3 version of both products.

Important to notice is the need for a recent JDK 8 (currently update 65 or 66). Download and install the 64 bit version for your OS.

Download and unzip the BPM or SOA QuickStart files in a temp folder, like 'c:\temp\soa_bpm_1221'). You should then have two files there:
  • fmw_12.2.1.0.0_bpm_quickstart.jar
  • fmw_12.2.1.0.0_bpm_quickstart2.jar

Then for windows you should open an command window as Administrator. For Linux open a terminal window as the user you want to install the product with.

I won't go through the manual install in detail, but given you're working under Windows (for Linux I assume you'll be able to translate it to shell), set the JAVA_HOME and start the intaller as follows:

c:\Temp\soa_bpm_1221>set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_65

c:\Temp\soa_bpm_1221>echo %JAVA_HOME%
c:\Program Files\Java\jdk1.8.0_65

c:\Temp\soa_bpm_1221>"%JAVA_HOME%\bin\java.exe" -jar fmw_12.2.1.0.0_bpm_quickstart.jar
Launcher log file is C:\Users\MAG\AppData\Local\Temp\OraInstall2015-12-09_09-03-34AM\launcher2015-12-09_09-03-34AM.log.

Running through the wizard, in the 'Installation Summary' screen you'll get the chance to save your choices to a response file:
 
I did my installation in  'C:\oracle\JDeveloper\12210_BPMQS' resulting in the following response file that I named 'bpmqs1221_silentInstall.rsp':
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#
MOS_USERNAME=

#
MOS_PASSWORD=<secure value="">

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#
SOFTWARE_UPDATES_PROXY_SERVER=

#
SOFTWARE_UPDATES_PROXY_PORT=

#
SOFTWARE_UPDATES_PROXY_USER=

#
SOFTWARE_UPDATES_PROXY_PASSWORD=<secure value="">

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=C:\oracle\JDeveloper\12210_BPMQS
Save this as 'bpmqs1221_silentInstall.rsp' (or adapt it if you use either the 12.1.3 version or the SOA QuickStart).
You can change the ORACLE_HOME parameter in this file if you choose to put it elsewhere. I used this because I have all the Oracle software always in a oracle folder, and different JDeveloper installs under JDeveloper. I postfixed the version folder with BPMQS to explicitly state it's a JDeveloper resulting from the QuickStart and not a standard studio install.

To run the silent install you'll issue the following command:
"%JAVA_HOME%\bin\java.exe" -jar fmw_12.2.1.0.0_bpm_quickstart.jar -silent -responseFile %cd%\bpmqs1221_silentInstall.rsp -nowait

I put this in a windows bat file as follows:
@echo off
set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_65
echo JAVA_HOME=%JAVA_HOME%
rem echo "Current dir2:" %~dp0
echo "Silent install BPM QuickStart, using response file:" %cd%\bpmqs1221_silentInstall.rsp
"%JAVA_HOME%\bin\java.exe" -jar fmw_12.2.1.0.0_bpm_quickstart.jar -silent -responseFile %cd%\bpmqs1221_silentInstall.rsp -nowait
BTW: the variable '%cd%' means the current directory. The quickstart installer expects an absolute path to the response file.

UPDATE 26-05-2016:
Some time ago I enhanced this script:
@echo off
@rem set JAVA_HOME="c:\Program Files\Java\jdk1.8.0_65"
set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_65
echo setx -m JAVA_HOME "%JAVA_HOME%"
setx -m JAVA_HOME "%JAVA_HOME%"
echo JAVA_HOME=%JAVA_HOME%
rem Check Java
if exist "%JAVA_HOME%" goto :JAVA_HOME_EXISTS
echo Install %JAVA_HOME% 
jdk-8u65-windows-x64.exe /s INSTALLDIR="%JAVA_HOME%"
:JAVA_HOME_EXISTS
echo %JAVA_HOME% exists
rem check BPM12.2 QS
set FMW_HOME=C:\oracle\JDeveloper\12210_BPMQS
if exist "%FMW_HOME%" goto :BPMQS_HOME_EXISTS
echo Install %FMW_HOME% 
rem echo "Current dir2:" %~dp0
echo "Silent install BPM QuickStart, using response file:" %cd%\bpmqs1221_silentInstall.rsp
"%JAVA_HOME%\bin\java.exe" -jar fmw_12.2.1.0.0_bpm_quickstart.jar -silent -responseFile %cd%\bpmqs1221_silentInstall.rsp -nowait
:BPMQS_HOME_EXISTS
echo %FMW_HOME% exists
if not exist c:\Data mkdir c:\Data
if not exist C:\Data\Jdeveloper\SOA mkdir C:\Data\Jdeveloper\SOA
if not exist C:\Data\Jdeveloper\SOA\SOA mkdir C:\Data\Jdeveloper\SOA\SOA
rem set  JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA as 'C:\Data\Jdeveloper\SOA\SOA'
echo set  JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA as C:\Data\Jdeveloper\SOA\SOA
setx -m JDEV_USER_DIR_SOA C:\Data\Jdeveloper\SOA\SOA
setx -m JDEV_USER_HOME_SOA C:\Data\Jdeveloper\SOA\SOA
echo copy jdev.boot naar "%FMW_HOME%\jdeveloper\jdev\bin"
copy jdev.boot "%FMW_HOME%\jdeveloper\jdev\bin" /Y
echo done
This one checks if Java 8 in the given update (in this example 65) is installed and if not it installs it. So the particular java installer should be in the same folder It does not check if there's another version, by the way.
In the end it creates a seperate folder for the User data for JDeveloper. This includes the DefaultServer (Integrated Weblogic) domain. Normally it goes under the user's local settings.
To use that the scripts copies a adapted jdev.boot file to the JDev home, that tells JDeveloper to use the JDEV_USER_DIR_SOA and JDEV_USER_HOME_SOA environment variables for these settings. The adapted jdev.boot file is as follows:
#--------------------------------------------------------------------------
#
#  Oracle JDeveloper Boot Configuration File
#  Copyright 2000-2012 Oracle Corporation. 
#  All Rights Reserved.
#
#--------------------------------------------------------------------------
include ../../ide/bin/ide.boot

#
# The extension ID of the extension that has the <product-hook>
# with the IDE product's branding information. Users of JDeveloper
# should not change this property.
#
ide.product = oracle.jdeveloper

#
# Fallback list of extension IDs that represent the different
# product editions. Users of JDeveloper should not change this
# property.
#
ide.editions = oracle.studio, oracle.j2ee, oracle.jdeveloper

#
# The image file for the splash screen. This should generally not
# be changed by end users.
#
ide.splash.screen = splash.png

#
# The image file for the initial hidden frame icon. This should generally not
# be changed by end users.
#
hidden.frame.icon=jdev_icon.gif

#
# Copyright start is the first copyright displayed. Users of JDeveloper
# should not change this property.
#
copyright.year.start = 1997

#
# Copyright end is the second copyright displayed. Users of JDeveloper
# should not change this property.
#
copyright.year.end = 2014

#
# The ide.user.dir.var specifies the name of the environment variable
# that points to the root directory for user files.  The system and
# mywork directories will be created there.  If not defined, the IDE
# product will use its base directory as the user directory.
#
#ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR
ide.user.dir.var = JDEV_USER_HOME_SOA,JDEV_USER_DIR_SOA

#
# This will enable a "virtual" file system feature within JDeveloper.
# This can help performance for projects with a lot of files,
# particularly under source control.  For non-Windows platforms however,
# any file changes made outside of JDeveloper, or by deployment for
# example, may not be picked by the "virtual" file system feature.  Do
# not enable this for example, on a Linux OS if you use an external editor.
#
#VFS_ENABLE = true

#
# If set to true, prevent laucher from checking/setting the shell
# integration mechanism. Shell integration on Windows associates 
# files with JDeveloper.
#
# The shell integration feature is enabled by default
#
#no.shell.integration = true

#
# Text buffer deadlock detection setting (OFF by default.)  Uncomment
# out the following option if encountering deadlocks that you suspect
# buffer deadlocks that may be due to locks not being released properly.
#
#buffer.deadlock.detection = true

#
# This option controls the parser delay (i.e., for Java error underlining)
# for "small" Java files (<20k).  The delay is in milliseconds.  Files 
# between the "small" (<20k) and "large" (>100k) range will scale the
# parser delay accordingly between the two delay numbers.
#
# The minimum value of this delay is 100 (ms), the default is 300 (ms).
#
ceditor.java.parse.small = 300

#
# This option controls the parser delay (i.e., for Java error underlining)
# for "large" Java files (>100k).  The delay is in milliseconds.
#
# The minimum value for this delay is 500 (ms), the default is 1500 (ms).
#
ceditor.java.parse.large = 1500

#
# This option is to pass additional vm arguments to the out-of-process
# java compiler used to build the project(s).  The arguments
# are used for both Ojc & Javac.
#
compiler.vmargs = -Xmx512m

#
# Additional (product specific) places to look for extension jars.
#
ide.extension.search.path=jdev/extensions:sqldeveloper/extensions

#
# Additional (product specific) places to look for roles.
#
ide.extension.role.search.path=jdev/roles

#
# Tell code insight to suppress @hidden elements 
#
insight.suppresshidden=true

#
# Disable Feedback Manager. The feedback manager is for internal use
# only.
#
feedbackmanager.disable=false

#
# Prevents the product from showing translations for languages other
# than english (en) and japanese (ja). The IDE core is translated into
# other languages, but other parts of JDeveloper are not. To avoid
# partial translations, we throttle all locales other than en and ja.
#
ide.throttleLocale=true

#
# Specifies the locales that we support translations for when 
# ide.throttleLocale is true. This is a comma separated list of 
# languages. The default value is en,ja.
#
ide.supportedLocales=en,ja

#
# Specifies the maximum number of JAR file handles that will be kept
# open by the IDE class loader.  A lower number keeps JDeveloper from
# opening too many file handles, but can reduce performance.
#
ide.max.jar.handles=500

#
# Specifies the classloading layer as OSGi. In the transition period
# to OSGi this flag can be used to check if JDev is running in OSGi
# mode.
#
oracle.ide.classload.layer=osgi