SLES shell script to check required os packages according to documentation before starting oracle forms & reports installation

Hi!

If you try to install oracle forms & reports 11.1.2.2 on SLES 11.3 than despite all installer checks are passed maybe you get a message like:

Error in invoking target ‘install’ of makefile ‘<FR_HOME>/sqlplus/lib/ins_sqlplus.mk’.

The reuirement check of the installer shows only missing openmotif classes which are not really required on SLES (see Doc ID 1567715.1), but no problems with a compiler or something similar.


Checking for binutils-2.19-11.28; found binutils-2.23.1-0.23.15-x86_64. Passed
Checking for gcc-4.3-62.198; found gcc-4.3-62.200.2-x86_64. Passed
Checking for gcc-c++-4.3-62.198; found gcc-c++-4.3-62.200.2-x86_64. Passed
Checking for glibc-2.9-13.2; found glibc-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-32bit-2.9-13.2; found glibc-32bit-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-devel-2.9; found glibc-devel-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-devel-32bit-2.9-13.2; found glibc-devel-32bit-2.11.3-17.87.3-x86_64. Passed
Checking for libaio-0.3.104-140.22; found libaio-0.3.109-0.1.46-x86_64. Passed
Checking for libaio-devel-0.3.104-140.22; found libaio-devel-0.3.109-0.1.46-x86_64. Passed
Checking for libgcc43-4.3.3_20081022; found libgcc43-4.6.9-0.13.22-x86_64. Passed
Checking for libstdc++43-4.3.3_20081022-11.18; found libstdc++43-4.6.9-0.13.22-x86_64. Passed
Checking for libstdc++43-devel-4.3.3_20081022-11.18; found libstdc++43-devel-4.3.4_20091019-0.37.30-x86_64. Passed
Checking for make-3.81; found make-3.81-128.20-x86_64. Passed
Checking for sysstat-8.1.5-7.8; found sysstat-8.1.5-7.47.1-x86_64. Passed
Checking for openmotif22-2.2.3; Not found. Failed <<<<
Checking for openmotif-2.2.3; found openmotif-2.3.1-3.15.1-x86_64. Passed
Check complete. The overall result of this check is: Failed <<<<

The problem here is, that sometime not all checks for os packages are really implemented in the installer. I have a SR to open a bug for this.

In the meantime I have implemented a bash shell script to check against the required os packages in the documentation. For my problem these are listed here. You can simple copy the required packages at the top of the script in the array sections.

The magic contains some bash substring modifications an using the version compare option of zipper.

#!/bin/bash 

array=( 
binutils-2.19-11.28 
gcc-4.3-62.198 
gcc-c++-4.3-62.198 
gcc-32bit-4.3 
glibc-2.9-13.2 
glibc-32bit-2.9-13.2 
glibc-devel-2.9 
glibc-devel-32bit-2.9-13.2 
ksh-93t
libaio-0.3.104-140.22 
libaio-devel-0.3.104-140.22 
libaio-32bit-0.3.104 
libaio-devel-32bit-0.3.104 
libgcc43-4.3.3_20081022 
libstdc++43-4.3.3_20081022-11.18 
libstdc++43-devel-4.3.3_20081022-11.18 
libstdc++33-3.3.3 
libstdc++33-32bit-3.3.3 
libstdc++43-32bit-4.3.3_20081022 
libstdc++43-devel-32bit-4.3.3_20081022 
libstdc++-devel-4.3 
make-3.81 
openmotif-2.3.1-3.13 
openmotif-devel-32bit-2.3.1-3.13 
openmotif22-libs-32bit-2.2.4-138.17 
openmotif-libs-2.3.1-3.13 
openmotif-devel-2.3.1-3.13 
openmotif-libs-32bit-2.3.1-3.13 
openmotif21-libs-32bit-2.1.30MLI4-143.2 
openmotif22-libs-2.2.4-138.17 
sysstat-8.1.5-7.8
) 

len=${#array[*]} 
i=0 
line='-------------------------------------------------------------------' 
while [[ $i -lt $len ]]; do 

  package_name_temp_1="${array[$i]%%.*}" 
  required_package_name="${package_name_temp_1%-*}"
  required_package_version="${array[$i]/$required_package_name-/}" 
  
  installed_package_version="`rpm -q ${required_package_name} --queryformat %{version}-%{release}`"
  RETCODE=$?
  if [ $RETCODE -eq 0 ]; then
    compare="`zypper --terse versioncmp ${required_package_version} ${installed_package_version}`"
    if [ $compare -eq 1 ]; then
      result1=fail;
      echo [$result1] $required_package_name Reqired : $required_package_version Installed: $installed_package_version
    else
      result1=pass;
      echo [$result1] $required_package_name Reqired : $required_package_version Installed: $installed_package_version
    fi 
  else
    echo [fail] $installed_package_version
  fi
  
  let i++; 
done

If you run this script you can see the failing packages on your platform:


[pass] binutils Reqired : 2.19-11.28 Installed: 2.23.1-0.23.15
[pass] gcc Reqired : 4.3-62.198 Installed: 4.3-62.200.2
[pass] gcc-c++ Reqired : 4.3-62.198 Installed: 4.3-62.200.2
[fail] package gcc-32bit is not installed
[pass] glibc Reqired : 2.9-13.2 Installed: 2.11.3-17.84.1
[pass] glibc-32bit Reqired : 2.9-13.2 Installed: 2.11.3-17.84.1
[pass] glibc-devel Reqired : 2.9 Installed: 2.11.3-17.84.1
[pass] glibc-devel-32bit Reqired : 2.9-13.2 Installed: 2.11.3-17.87.3
[pass] ksh Reqired : 93t Installed: 93u-0.26.1
[pass] libaio Reqired : 0.3.104-140.22 Installed: 0.3.109-0.1.46
[pass] libaio-devel Reqired : 0.3.104-140.22 Installed: 0.3.109-0.1.46
[pass] libaio-32bit Reqired : 0.3.104 Installed: 0.3.109-0.1.46
[fail] package libaio-devel-32bit is not installed
[pass] libgcc43 Reqired : 4.3.3_20081022 Installed: 4.6.9-0.13.22
[pass] libstdc++43 Reqired : 4.3.3_20081022-11.18 Installed: 4.6.9-0.13.22
[pass] libstdc++43-devel Reqired : 4.3.3_20081022-11.18 Installed: 4.3.4_20091019-0.37.30
[pass] libstdc++33 Reqired : 3.3.3 Installed: 3.3.3-11.9
[pass] libstdc++33-32bit Reqired : 3.3.3 Installed: 3.3.3-11.9
[pass] libstdc++43-32bit Reqired : 4.3.3_20081022 Installed: 4.6.9-0.13.22
[fail] package libstdc++43-devel-32bit is not installed
[pass] libstdc++-devel Reqired : 4.3 Installed: 4.3-62.200.2
[pass] make Reqired : 3.81 Installed: 3.81-128.20
[pass] openmotif Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[fail] package openmotif-devel-32bit is not installed
[fail] package openmotif22-libs-32bit is not installed
[pass] openmotif-libs Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[pass] openmotif-devel Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[fail] package openmotif-libs-32bit is not installed
[fail] package openmotif21-libs-32bit is not installed
[pass] openmotif22-libs Reqired : 2.2.4-138.17 Installed: 2.2.4-193.1
[pass] sysstat Reqired : 8.1.5-7.8 Installed: 8.1.5-7.47.1

The route cause for the error message in the installer are line 4 and 13, where 32bit Compiler are required for making sql plus despite this forms and reports installation is 64bit version.

Maybe you can use this script with little modification in other environments.

That’s it.

, , , , ,

Leave a comment

“Bob the Builder: Build/Deploy of #ADF enterprise applications” – I’m a speaker at #DOAG2015:

csm_2015-Konferenz-Ausstellung-Logo_02_373181671d

Today my presentation is confirmed:  “Bob the Builder: Build/Deploy of ADF enterprise applications”.

I will speak over our experiences with following

  • build tools
  • deployment tools
  • architecture
  • versioning & branching
  • continuous integration
  • hot deployment in development
  • compile & runtime dependencies

If you speak german and you are interested in some of this, you should come and attend DOAG 2015.

, , , , , , , , , ,

Leave a comment

Fix completion insight in JDeveloper 12.1.3: show return type again

Hi!

If you work with JDeveloper 12.1.3 you may missing the return type of methods in completion insight.

For an example you hit CTRL-SPACE after following code

completion_insigt_return_type_wrong

you see that at the start and at the end of the popup the available method names and parameter. If you have worked before with older versions of JDeveloper, you know that there is shown the return type of the method at the end. What a loose of productivity!

You run into Bug 19353293 : CODE INSIGHT : RETURN TYPE NOT SHOWN.

But no problem, there exist patch 19353293: CODE INSIGHT : RETURN TYPE NOT SHOWN, which solves the problem for you:

completion_insigt_return_type_correct

Remember to install the patches for all of your developers!

Remember too, if you want to install more than one patch, there can be conflicts. Please test carefully, if all of your problems are solved for all patches after adding one more patch. Maybe you have to create a merge request in Oracle My Support.

That’s it!

, , , , ,

3 Comments

Slides for my german presentation #DOAG2014 “The Dirty Dozen – ADF Migration to 12c in the IKB” available

I have presented last week on DOAG 2014 in Nuremberg. For all non DOAG members – you can find the german presentation on slideshare too.

doag2014

Leave a comment

ADF Archtitecture Practice – JDeveloper Silent Install of Extensions

This article describes how to standardize your JDeveloper Installation as requested in Planning & Getting Started – Team, Skills and Development Environments. It is part of the ADF Architecture Practice lessons and describes the installation with examples for windows.


Version 12.1.x

There is a tool ojwebupdate to handle this. It is fully supported but it’s not documented at the moment, documentation is planned for 12.1.4. But you can get a lot of info, if you call:

ojwebupdate /?

The easiest thing is to download your reqired extension from the update centers. The update centers can be updated too, so the best thing is to call “Check for updates” in a manual installation and then look in your JDveloper system directory for a file updatecenters.xml.

Eg. if you want to install the extension “JUnit Integration” for version 12.1.3 in Windows 7 you have to go to the url, which is listed under “Official Oracle Extensions and Updates” by default in file

C:\Users\[Your User]\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\o.ide\updatecenters.xml

At the moment this is http://www.oracle.com/webfolder/technetwork/jdeveloper/downloads/1213center.xml. Open this link, follow the link to “JUnit Integration” and download the required version. The right version can be determined by checking the requirement against your JDeveloper version or other extensions, you can find this information in the Help – About dialog. Or easier – you look at version, which version the manual installation would be installed and download this.

Then you can call installation with following batch file:

set oracle_home=C:\Oracle\JDev121300
%oracle_home%\jdeveloper\jdev\bin\ojwebupdate -zips=[Path]\junit.zip

Extensions can be depending on another extension, you see this in the requirements section of theurl or when you try to install a single extension in a fresh manual installation. In this case you have to install the extensions in the right order.


 

Version 11.1.1.x
The downloading of the file is similar to above, for version 11.1.1.7 you should download “JUnit Integration” extension at the moment from http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/131167.xml.

You can simply unzip the extensions into your installation. The target depends from the extension itself. Therefore open the zip file and look into the META-INF\bundle.xml file. If there is a tag , then this is the target. If this tag does not exist, the default target is %oracle_home%\jdeveloper\jdev\extensions.

The following batch will install “JUnit Integration” and “JUnit Integration for JDBC” extensions in the right order (as the second requires the first) in JDeveloper 11.1.1.7.:

set oracle_home=C:\Oracle\JDev111170
unzip -o -q junit_bundle -d %oracle_home%\jdeveloper
unzip -o -q junit-j2ee_bundle.zip -d %oracle_home%\jdeveloper\jdev\extensions
rem housekeeping
rmdir /S /Q %oracle_home%\jdeveloper\META-INF
rmdir /S /Q %oracle_home%\jdeveloper\jdev\extensions\META-INF

That’s it!

, , , , , ,

Leave a comment

See you at #DOAG2014 “The Dirty Dozen – ADF Migration to 12c in the IKB” room Kopenhagen on 11/19/2014 at 10:00 am

doag2014

The presentation is ready, time for travelling now.

I will speak over our experiences with following

  • provide user software
  • install servers
  • iterative test migrations
  • migration plannig
  • real migration
  • and the problems and pitfall’s we find on our way

If you speak german and you are interested in some of this, you should come and attend!

Leave a comment

ADF Archtitecture Practice – JDeveloper Silent Patch

This article describes how to standardize your JDeveloper Patching as requested in Planning & Getting Started – Team, Skills and Development Environments. It is part of the ADF Architecture Practice lessons and describes the patching with examples for windows.


Version 12.1.x

In this version  the Oracle OPatch is delivered with the silent installation of JDeveloper.

All what you need is the patch file for your platform (e.g. p19591087_121300_Generic.zip for JDEVADF SECURITY PATCH UPDATE 12.1.3.0.0 CPUOCT2014). Unzip this patch file.

Then you call batch file similar to:

set oracle_home=C:\Oracle\JDev121300
pushd [path]\19591087
%oracle_home%\OPatch\opatch apply -silent

Revert the patch is similar, the response should look like

set oracle_home=C:\Oracle\JDev121300
pushd [path]\19591087
%oracle_home%\OPatch\opatch rollback -id 19591087 -silent

In Line 3 you have to enter the patch number, which has to be reverted after -id.


Version 11.1.1.x
In some of this versions Oracle OPatch is not delivered with the silent installation of JDeveloper. Please check if %oracle_home%\oracle_common\OPatch does exist. If not – you can download the latest version of OPatch here. Please select your Platform and Release 11.1.0.0.0  as this correspond to your JDeveloper version. Unzip the downloaded file.

In some versions (at least till 11.1.1.1.5) you need for the first patch a default product.xml file in the right place, as this cannot be created silently. Change the highlighted lines according to your environment:

<?xml version="1.0" encoding="WINDOWS-1252"?>
<product>
	<name value="SA_JDEV"/>
	<version value="11.1.1.5.0"/>
</product>

For older versions of opatch maybe you have to add a response file for opatch, which you can create as described here.

Then you need the patch file for your platform (e.g. p19591065_111170_Generic.zip for JDEVADF SECURITY PATCH UPDATE 11.1.1.7.0 CPUOCT2014). Unzip this patch file.

Then you call batch file similar to:

set oracle_home=C:\Oracle\JDev111170
set java_home=%oracle_home%\jdk160_24
rem opatch_home=[your unzipped OPatch home]
set opatch_home=%oracle_home%\oracle_common\OPatch
rem workaround for BUG 9613778: OPATCH-STAND-ALONE: ERROR "OUI-67124:INVENTORY CHECK FAILED" ON GERMAN WINDOWS
rem set _JAVA_OPTIONS="-Duser.language=en"
rem workaround for silent creation of product.xml till at least version 11.1.1.5
rem if not exist %oracle_home%\product.xml copy product.xml %oracle_home%\product.xml /V /Y
rem if not exist %mw_home%\jdeveloper\product.xml copy product.xml %mw_home%\jdeveloper\product.xml /V /Y
pushd [path]\19591087
rem use switch -ocmrf, if you have an older opatch version, which  requires a response file 
rem use switch -jdk, if you have the downloaded opatch version
rem cmd /c %opatch_home%\opatch apply -silent -ocmrf ocm.rsp -jdk %oracle_home%\jdk160_24
%opatch_home%\opatch apply -silent
rem Workaround for BUB 9613778: OPATCH-STAND-ALONE: ERROR "OUI-67124:INVENTORY CHECK FAILED" ON GERMAN WINDOWS
rem set _JAVA_OPTIONS=
Reverting patches is similar to 12.1.x.
set oracle_home=C:\Oracle\JDev111170
set java_home=%oracle_home%\jdk160_24
rem opatch_home=[your unzipped OPatch home]
set opatch_home=%oracle_home%\oracle_common\OPatch
pushd [path]\19591087
rem use switch -ocmrf, if you have an older opatch version, which  requires a response file 
rem use switch -jdk, if you have the downloaded opatch version
rem cmd /c %opatch_home%\opatch rollback -id 19591087 -silent -ocmrf ocm.rsp -jdk %oracle_home%\jdk160_24
%opatch_home%\opatch rollback -id 19591087 -silent

That's it!

, , , , , ,

1 Comment

ADF Archtitecture Practice – JDeveloper Silent Install

This article describes how to standardize your JDeveloper Installation as requested in Planning & Getting Started – Team, Skills and Development Environments. It is part of the ADF Architecture Practice lessons and describes the installation with examples for windows.


Version 12.1.x

In this version  the Oracle Universal Installer allows the silent installation of JDeveloper. All what you need is the installer file for your platform (e.g. jdev_suite_121300_win64.exe) and a response file. You can create your response file as described in the documentation:

  1. Run your product’s graphical installer or installer, as described in your product installation guide.
  2. For product installation, on the Installation Summary screen, click Save Response File to save your installation parameters to a response file.

The resulting file should be look similar to the following code:

[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#This will be blank when there is nothing to be de-installed in distribution level
SELECTED_DISTRIBUTION=JDeveloper Integrated Server Suite~12.1.3.0.0

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=C:\Oracle\JDev121300\

Then you call a command similar to:

jdev_suite_121300_win64.exe -silent -waitforcompletion -responseFile [complete path]\response.rsp

Deinstallation is similar, the response should look like

[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#This will be blank when there is nothing to be de-installed in distribution level
SELECTED_DISTRIBUTION=JDeveloper Integrated Server Suite~12.1.3.0.0

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=C:\Oracle\JDev121300\

Then you call the deinstallation via following commands:

set oracle_home=C:\Oracle\JDev121300
rem %oracle_home%\oui\bin\deinstall.cmd -noconsole -silent
"%oracle_home%\oui\bin\internal\ilaunch.exe" -noconsole -deinstall -silent ORACLE_HOME="%oracle_home%"

Pay attention that we did not use line 2, as this exits your command shell on windows. But we want to have a return code and maybe doing some post deinstall work (Enhancement Request 19464646 is created). Instead we have looked what command deinstall.cmd generates and put this on line 3.


Version 11.1.1.x
For this version you need the generic installer (eg. jdevstudio11117install.jar) and the 32bit JDK 1.6.0_24 (this is the delivered version for the manual install, 64bit version is not supported but works for most cases but not all). First you have to extract the msi JDK Installer as described here. Then you have to create a file silent.xml which is the equivalent of response.rsp in 12.1.x.

<?xml version="1.0" encoding="UTF-8"?>
<bea-installer>
  <input-fields>
    <data-value name="BEAHOME" value="C:\Oracle\JDev111170" />
    <data-value name="COMPONENT_PATHS" value="JDeveloper and ADF/JDeveloper Studio|JDeveloper and ADF/Application Development Framework Runtime|WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/WebLogic Server Clients|WebLogic Server/WebLogic SCA|WebLogic Server/UDDI and Xquery Support"/>
    <data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="yes"/>
    <data-value name="LOCAL_JVMS" value="C:\Oracle\JDev111170\jdk160_24\"/>
  </input-fields>
</bea-installer>

Then you can call Installation with following batch file:

set mw_home=C:\Oracle\JDev111170
set oracle_home==%mw_home%\oracle_common
set java_home=%mw_home%\jdk160_24
c:\windows\system32\msiexec.exe /i [complete path]\jdk1.6.0_24.msi /quiet ADDLOCAL="ToolsFeature,SourceFeature" INSTALLDIR="%java_home%" REBOOT=Suppress
"%java_home%\bin\java" -jar jdevstudio11117install.jar -mode=silent -log=install.log -silent_xml=silent.xml

You can call the deinstallation with following batch file:

set mw_home=C:\Oracle\JDev111170
set oracle_home==%mw_home%\oracle_common
set java_home=%oracle_home%\jdk160_24
%mw_home%\utils\uninstall\uninstall.exe -mode=silent -log=uninstall.log
c:\windows\system32\msiexec.exe /x [complete path]\jdk1.6.0_24.msi /quiet REBOOT=Suppress

That’s it!

, , , , , ,

Leave a comment

ADF Archtitecture Practice Series

From now on I will create a series of lessons to implement the knowledge of the ADF Architecture Course from Oracle ADF product management. Here you can find the videos and the presentations. This post will be the index of this lessons, so bookmark it for further use!

,

Leave a comment

“The Dirty Dozen – ADF Migration to 12c in the IKB” I’m a speaker at DOAG2014:

doag2014

Today the official program is online for DOAG conference 2014 in Nuremberg. My presentation is confirmed  “The Dirty Dozen – ADF Migration to 12c in the IKB”.

I will speak over our experiences with following

  • provide user software
  • install servers
  • iterative test migrations
  • migration plannig
  • real migration
  • and the problems and pitfall’s we find on our way

If you speak german and you are interested in some of this, you should come and attend my presentation DOAG conference 2014 in room Kopenhagen on 11/18/2014 at 10:00 am.

Leave a comment

Follow

Get every new post delivered to your Inbox.

Join 89 other followers

%d bloggers like this: