Showing posts with label SOA Suite. Show all posts
Showing posts with label SOA Suite. Show all posts

Tuesday, October 5, 2010

Oracle RCU 11.1.1.3.3 on Oracle XE Universal

OK, this post is going to be quick.

I am setting up my other notebook to run Oracle SOA Suite and start by installing a copy of Oracle XE Universal. All went well, I need a small footprint database on this old notebook.

To use OracleXE as the DB for SOA Suite, I only need to modify the following parameters.

alter system set open_cursors=500 scope=spfile;
alter system set processes=500 scope=spfile;

(also depends on with component you want to install, can be less)


I then downloaded Oracle RCU 11.1.1.3.3 (ofm_rcu_win32_11.1.1.3.3_disk1_1of1.zip) from Oracle and tried to install it with all options selected. To my dismay, I kept bumping into the problem saying JVM is not installed.

2010-10-05 21:34:56.846 ERROR rcu: oracle.sysman.assistants.rcu.backend.task.ActualTask::run: RCU Operation Failed
oracle.sysman.assistants.common.task.TaskExecutionException: RCU-6083:Failed - Check prerequisites requirement for selected component:OIM
Please refer to RCU log at Z:\Oracle\ofm_rcu_win32_11.1.1.3.3_disk1_1of1\rcuHome\rcu\log\logdir.2010-10-05_19-24\rcu.log for details.
Error: JVM is not installed on the Database.

Google is your friend, isn't that right? So I found the following thread on the Oracle forum.

http://forums.oracle.com/forums/thread.jspa?threadID=1130282

No solution as yet. Some people went back to RCU version 11.1.1.3.0 and installed successfully. I search further and found that OracleXE does not come with the DBMS_JAVA package, which only available in Oracle SE and EE. In theory, one can install DBMS_JAVA package into XE, but that is illegal. So I ended up unselect the offending components, and everything went well, with a few warnings. Here is the list of components that are unlikely to install successfully into OracleXE if you are going with RCU 11.1.1.3.3:

1) Identity Management
2) Portal and BI

When installing other components, I have also encountered problems with Enterprise Scheduler Service and the following errors are recorded in the oraess.log. I have ignored all these warnings and will fix them when it comes to surface.

Executing SQL statement: begin
  execute immediate 'grant select on dba_subscr_registrations to DEV_ORAESS';
exception
  when others then
    if sqlcode = -942 then
      null;
      raise;
    end if;
end;
JDBC SQLException - ErrorCode: 942SQLState:42000 Message: ORA-00942: table or view does not exist
ORA-06512: at line 7

JDBC SQLException handled by error handler

The reason is because OracleXE does not come with the table DBA_SUBSCR_REGISTRATIONS.

Information about this table is here.

http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28320/statviews_5028.htm

Other than that, all was good. I can use OracleXE Universal database for RCU 11.1.1.3.3 with a few exceptions.

Cheers,

Monday, July 5, 2010

Get rid of the annoying userid and password prompt of the Managed Server start script in SOA Suite 11.1.1.3

The default location of boot.properties in SOA Suite has been changed since 11.1.1.2. The following instructions apply to SOA Suite 11.1.1.3.


To get rid of the username/password prompt during Managed Server startup, place the boot.properties file into the 'security' directory of your managed server. For example, if you managed server name is soa_server1 and your SOA domain is my_soa_domain, then the directory you will place your boot.properties file will be


$MW_HOME/user_projects/domains/my_soa_domain/servers/soa_server1/security


If the 'security' sub-folder does not exist, create it.


The typical content of the boot.properties file will be

username=weblogic
password=welcome123

If you have used different username and password during domain creation, you can specify them here.


Note that upon successful managed server startup, the content of the boot.properties file where you have your username and password in plain text will be encrypted and will look like this

#Mon Jul 05 11:05:31 EST 2010
password={AES}2KPlIqIyN/3Wz8VPawxF+rPyYTBkZ36+mRzgop1VkGU\=
username={AES}QQcQN7tKF7CLFZftjPOq9okkXKSRIfX/BbJVckEv6Xk\=

If you prefer to specify your own location of boot.properties, or even to use a different file name, you can specify them using the JAVA_OPTIONS parameter in the managed server startup script. Open the startManagedServer.sh script located in your $MW_HOME/user_projects/domains/my_soa_domain/bin and add the following lines (preserve the existing JAVA_OPTIONS if there is any).


How-To
- locate the 'export JAVA_OPTIONS' string
- add the following line before the the 'export JAVA_OPTIONS' line
JAVA_OPTIONS="-Dweblogic.system.BootIdentityFile=[your preferred location]/[your preferred properties filename]" ${JAVA_OPTIONS}"
- save the file and exit

Now start the manage server, you will see in the terminal the following java options

/home/kj/Oracle/Middleware/jdk160_18/bin/java -client -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=soa_server1 -Djava.security.policy=/home/kj/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.system.BootIdentityFile=/home/kj/Oracle/Middleware/user_projects/domains/soapg_domain/soa_server1_boot.properties -Dweblogic.security.SSL.trustedCAKeyStore=/home/kj/Oracle/Middleware/wlserver_10.3/server/lib/cacerts -Xverify:none -da
...
...
...

The following information on the startup console indicates that the original properties file has been encrypted and stored in the same location as the original plain-text soa_server1_boot.properties.
Storing boot identity in the file: /home/kj/Oracle/Middleware/user_projects/domains/soapg_domain/soa_server1_boot.properties
Open the file soa_server1_boot.properties and you shall see the encypted contents and voila, no more username/password nags on Managed Server startup.

password={AES}2KPlIqIyN/3Wz8VPawxF+rPyYTBkZ36+mRzgop1VkGU\=
username={AES}QQcQN7tKF7CLFZftjPOq9okkXKSRIfX/BbJVckEv6Xk\=

Happy playing.

Cheers.

Wednesday, June 16, 2010

Using Oracle Repository Creation Utility (RCU) to create Metadata Repository


The previous installation of Oracle Database 11g R2 on Ubuntu 10.04 (Lucid) was successful. This article shows you how to use oracle RCU (repository creation utility) to create metadata repository on this database instance.

Step 1 - Get the Sun JDK (if you haven't done so)
Full instructions are available here http://www.ubuntugeek.com/how-install-sun-java-runtime-environment-jre-in-ubuntu-10-04-lucid-lynx.html. Note: If you don't wish to install a jdk right now, it is alright. You can still use the jdk that comes with rcu package. It is located under the jdk folder of rcuHome.

To install sun-jdk, do the following.


kj@oradb-lucid:~$ sudo add-apt-repository 'deb http://archive.canonical.com/ lucid partner'
kj@oradb-lucid:~$ sudo apt-get update
kj@oradb-lucid:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts


after the installation, voila...

kj@oradb-lucid:~$ java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)


Step 2 - Get the RCU package from Oracle download site.
Get the package from here.

Unzip the archive to a temp folder in your $HOME. On my machine, it is /home/kj/temp.

Step 3 - Ensure environment variables are properly set
On my machine, they are


ORACLE_SID=orcl
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/local/bin:/usr/bin:/bin


If your default shell is bash, you can add these entries into your .bashrc file located under your $HOME directory.

I have these in mine for both oracle and myself.

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=$ORACLE_HOME/bin:$PATH


Step 4 - Start your oracle instance (if it hasn't been started)
Login as oracle user

kj@oradb-lucid:~$ su - oracle
Password:
oracle@oradb-lucid:~$


* Check the env variables. You should have all the required vars, else, ensure your have performed step 3.

Start sqlplus

oracle@oradb-lucid:~$ sqlplus / 'as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 15 15:29:38 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.


Startup the database, it will mount and open if successful.

SQL> startup
ORACLE instance started.

Total System Global Area  431038464 bytes
Fixed Size            1337016 bytes
Variable Size          281020744 bytes
Database Buffers      142606336 bytes
Redo Buffers            6074368 bytes
Database mounted.
Database opened.


Quit the sqlplus

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Step 5 - start the listener using lsnrctl command

oracle@oradb-lucid:~$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-JUN-2010 15:35:12

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-JUN-2010 15:35:14
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully


Note that the listener isn't listening to any service immediately after startup. Give your oracle instance sometime to register itself with the listener. Type lsnrctl status again to find out.

oracle@oradb-lucid:~$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-JUN-2010 15:37:20

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                15-JUN-2010 15:35:14
Uptime                    0 days 0 hr. 2 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oradb-lucid/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully


Step 6 - Ensure the system parameters values of the oracle instance meet the requirements.

The typical oracle 11g r2 installation should meet most of the requirements. RCU specifically requires processess to be 300 or more for WEBCENTER component. Other than this one, everything else works for me.

To alter the system parameter, connect to sqlplus as sysdba.

oracle@oradb-lucid:~$ sqlplus / as sysdba
Issue the following sql statement


SQL> ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
restart the db

SQL> shutdown immediate

SQL> startup


Step 5 - Run the rcu
Go to the folder where you have untar'ed. My was $HOME/temp/. Change directory to the bin folder. The installation script is located in $HOME/temp/rcu/bin. You can run the installation script as yourself instead of as oracle because by default oracle won't have sufficient privilege on your $HOME folder.

kj@oradb-lucid:~$ ./rcu 


Follow the instruction, enter the values as depicted in the screenshots of rcu here. You shouldn't face any problem during the installation as you have adjusted your DB system parameters.

The next step is to setup Oracle Weblogic Server that serves as the container for all Oracle SOA Suite components.

Good luck.