Wednesday, December 7, 2011

Encrypted Data Transfer between Oracle Database Server and Oracle Client

This post  describes one of the most important feature of Oracle Database , i.e. how to configure oracle Database and Oracle Client to communicate in an encrypted manner.


 

Wednesday, August 3, 2011

Install Webpass on Machine where Oracle Http Server(OHS) is installed

Oracle Fusion Middleware : Oracle Access manager is IDM component .


To install the Oracle Access manager WebPass, Oracle Http Server should be present.

Then we followed the below steps :

./Oracle_Access_Manager10_1_4_3_0_linux_OHS11g_WebPass -gui



Install Oracle Access Manager 10.1.4.3.0

Oracle Access Manager (10.1.4.3.0) is a used to Implement SSO ( Single Sign On ) for Enterprise Applications. Oracle Access Manager 10.1.4.3.0 is part of the Fusion Middleware 11g .

For Installing Oracle Access Manager we need to fulfill the below pre-requisites:

  1. Install the Weblogic Server. (We are using WLS 10.3.2.0)

  2. Install the Database. (Please see the certification Matrix for the compatible database versions.)


We are using Oracle Database version 11.2.0.1.

  1. Create the Metadata Repository and necessary Schemas in the database required for the Oracle Identity Management components using RCU.


As we have used Oracle Weblogic 10.3.2.0, so we used RCU 111120 to create the necessary schemas into the database.

  1. Now Install the Oracle Identity Management 11g

Sunday, July 31, 2011

Install Oracle Database 11.2.0.1 on Linux

I had to Install Oracle Identity Manager for SSO which needs Oracle Database for MetaData Repository Storage.

I followed the Below steps to Install the Database.

Version used: Oracle 11.2.0.1

OS Used : Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)

Created one OS user : oracle .

Created two OS group : dba, oinstall.

Added the OS user : Oracle to Group dba and oinstall.

How to change default JAVA of linux to lastet version

How to change default JAVA of linux to lastet version:
----------------------------------------------------------------

First check all the executables as mentioned below:

cd /usr/bin
ls -l |grep ja

lrwxrwxrwx 1 root root           25 Jul 31 11:33 jar -> /usr/java/default/bin/jar
lrwxrwxrwx 1 root root           34 Jul 31 12:00 java -> /usr/java/java-1.4/jre/bin/java
lrwxrwxrwx 1 root root           27 Jul 31 11:33 javac -> /usr/java/default/bin/javac
lrwxrwxrwx 1 root root           29 Jul 31 11:33 javadoc -> /usr/java/default/bin/javadoc
lrwxrwxrwx 1 root root           28 Jul 31 11:33 javaws -> /usr/java/default/bin/javaws
lrwxrwxrwx 1 root root           30 Jul 31 11:33 jcontrol -> /usr/java/default/bin/jcontrol

So here you can see all the java components are pointing to /usr/java/default but the "java" component is pointing to java-1.4 :

ls -l /usr/java/default
/usr/java/default ->  /usr/java/jdk1.6.0_26

So, all the components are pointing to the latest version of JDK installed except : java

So when I check : which java
/usr/bin/java
java -version
java 1.4

So , I have to change the "java" executable to point to the latest version that is java-1.6_26 which is installed at location: /usr/java/jdk1.6.0_26

mv /usr/bin/java /usr/bin/java1.4
ln -s /usr/java/jdk1.6.0_26/jre/bin/java /usr/bin/java

Now check :
cd /usr/bin
ls -l |grep ja
lrwxrwxrwx 1 root root           25 Jul 31 11:33 jar -> /usr/java/default/bin/jar
lrwxrwxrwx 1 root root           34 Jul 31 12:00 java -> /usr/java/jdk1.6.0_26/jre/bin/java
lrwxrwxrwx 1 root root           22 Jun 20 15:39 java1.4 -> /usr/java/java-1.4/jre/bin/java
lrwxrwxrwx 1 root root           27 Jul 31 11:33 javac -> /usr/java/default/bin/javac
lrwxrwxrwx 1 root root           29 Jul 31 11:33 javadoc -> /usr/java/default/bin/javadoc
lrwxrwxrwx 1 root root           28 Jul 31 11:33 javaws -> /usr/java/default/bin/javaws
lrwxrwxrwx 1 root root           30 Jul 31 11:33 jcontrol -> /usr/java/default/bin/jcontrol

Thursday, July 7, 2011

Error related to OPSS security failing while starting weblogic servers

I was installing the Weblogic Server ( 10.3.2.0) with SOA Suite 11.1.1.2.0 on a AIX machine (6.1 TL6) .

After installation when I created the domain with default configuration and tried starting the Admin Server I started receiving the following error:

-------------------------------------------------------

weblogic@ABC[/user_projects/domains/base_domain/bin]# ./startWebLogic.sh
*****************************************************
** Setting up SOA specific environment...
*****************************************************
LIBPATH=/oracle/app/Middleware1032/patch_wls1032/profiles/default/native:/oracle/app/Middleware1032/wlserver_10.3/server/native/aix/ppc64:/oracle/app/Middleware1032/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin
.
EXTRA_JAVA_PROPERTIES= -da:org.apache.xmlbeans... -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Djava.endorsed.dirs=/bam/modules/org.apache.xalan_2.7.1 -da:org.apache.xmlbeans... -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Djava.endorsed.dirs=/oracle/app/Middleware1032/Oracle_SOA1/bam/modules/org.apache.xalan_2.7.1
.
LD_LIBRARY_PATH=:/oracle/app/Middleware1032/Oracle_SOA1/soa/thirdparty/edifecs/XEngine/bin
.
USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
.
*****************************************************
** End SOA specific environment setup
*****************************************************
.
.
JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
.
WLS Start Mode=Production
.
CLASSPATH=/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/user-patch.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/soa-startup.jar::/oracle/app/Middleware1032/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java6_64/lib/tools.jar:/oracle/app/Middleware1032/utils/config/10.3/config-launch.jar:/oracle/app/Middleware1032/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/app/Middleware1032/wlserver_10.3/server/lib/weblogic.jar:/oracle/app/Middleware1032/modules/features/weblogic.server.modules_10.3.2.0.jar:/oracle/app/Middleware1032/wlserver_10.3/server/lib/webservices.jar:/oracle/app/Middleware1032/modules/org.apache.ant_1.7.0/lib/ant-all.jar:/oracle/app/Middleware1032/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/oracle.soa.common.adapters_11.1.1/oracle.soa.common.adapters.jar:/oracle/app/Middleware1032/oracle_common/soa/modules/commons-cli-1.1.jar:/oracle/app/Middleware1032/oracle_common/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/oracle/app/Middleware1032/oracle_common/modules/oracle.xdk_11.1.0/xsu12.jar:/oracle/app/Middleware1032/modules/features/weblogic.server.modules.xquery_10.3.1.0.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/db2jcc4.jar:/oracle/app/Middleware1032/user_projects/domains/base_domain/config/soa-infra:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/fabric-url-handler_11.1.1.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/quartz-all-1.6.5.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/oracle.soa.fabric_11.1.1/oracle.soa.fabric.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/oracle.soa.adapter_11.1.1/oracle.soa.adapter.jar:/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/oracle.soa.b2b_11.1.1/oracle.soa.b2b.jar:/oracle/app/Middleware1032/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar::/oracle/app/Middleware1032/Oracle_SOA1/soa/modules/soa-ibm-addon.jar:/oracle/app/Middleware1032/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/oracle/app/Middleware1032/wlserver_10.3/server/lib/xqrl.jar
.
PATH=/oracle/app/Middleware1032/wlserver_10.3/server/bin:/oracle/app/Middleware1032/modules/org.apache.ant_1.7.0/bin:/usr/java6_64/jre/bin:/usr/java6_64/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/weblogic/bin:/usr/bin/X11:/sbin:.:/usr/java6_64/bin:/usr/java6_64/jre/bin:/usr/bin/X11/vncserver:.
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
***************************************************
starting weblogic with Java version:
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9fp1-20110208_03(SR9 FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20110203_74623 (JIT enabled, AOT enabled)
J9VM - 20110203_074623
JIT - r9_20101028_17488ifx3
GC - 20101027_AA)
JCL - 20110203_01
Starting WLS with line:
/usr/java6_64/bin/java -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=/oracle/app/Middleware1032/wlserver_10.3/server/lib/weblogic.policy -da -Dplatform.home=/oracle/app/Middleware1032/wlserver_10.3 -Dwls.home=/oracle/app/Middleware1032/wlserver_10.3/server -Dweblogic.home=/oracle/app/Middleware1032/wlserver_10.3/server -Ddomain.home=/oracle/app/Middleware1032/user_projects/domains/base_domain -Dcommon.components.home=/oracle/app/Middleware1032/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=/oracle/app/Middleware1032/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.domain.config.dir=/oracle/app/Middleware1032/user_projects/domains/base_domain/config/fmwconfig -Doracle.server.config.dir=/oracle/app/Middleware1032/user_projects/domains/base_domain/config/fmwconfig/servers/AdminServer -Doracle.security.jps.config=/oracle/app/Middleware1032/user_projects/domains/base_domain/config/fmwconfig/jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=/oracle/app/Middleware1032/user_projects/domains/base_domain/config/fmwconfig/carml -Digf.arisidstack.home=/oracle/app/Middleware1032/user_projects/domains/base_domain/config/fmwconfig/arisidprovider -Dweblogic.alternateTypesDirectory=/modules/oracle.ossoiap_11.1.1,/modules/oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -da:org.apache.xmlbeans... -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Djava.endorsed.dirs=/bam/modules/org.apache.xalan_2.7.1 -da:org.apache.xmlbeans... -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Djava.endorsed.dirs=/oracle/app/Middleware1032/Oracle_SOA1/bam/modules/org.apache.xalan_2.7.1 -Dsoa.archives.dir=/oracle/app/Middleware1032/Oracle_SOA1/soa -Dsoa.oracle.home=/oracle/app/Middleware1032/Oracle_SOA1 -Dsoa.instance.home=/oracle/app/Middleware1032/user_projects/domains/base_domain -Dtangosol.coherence.clusteraddress=227.7.7.8 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dcom.sun.management.jmxremote -Djava.protocol.handler.pkgs=oracle.mds.net.protocol|oracle.fabric.common.classloaderurl.handler|oracle.fabric.common.uddiurl.handler|oracle.bpm.io.fs.protocol -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=/oracle/app/Middleware1032/wlserver_10.3/server/lib/DemoTrust.jks -Dem.oracle.home=/oracle/app/Middleware1032/oracle_common -Djava.awt.headless=true -Dums.oracle.home=/oracle/app/Middleware1032/Oracle_SOA1 -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/oracle/app/Middleware1032/patch_wls1032/profiles/default/sysext_manifest_classpath weblogic.Server
Jul 2, 2011 4:12:28 PM AST Info WebLogicServer BEA-000377 Starting WebLogic Server with IBM J9 VM Version 2.4 from IBM Corporation
Jul 2, 2011 4:12:29 PM AST Info Management BEA-141107 Version: WebLogic Server 10.3.2.0 Tue Oct 20 12:16:15 PDT 2009 1267925
Jul 2, 2011 4:12:31 PM AST Info Security BEA-090065 Getting boot identity from user.
Enter username to boot WebLogic server:XXXXXXXX
Enter password to boot WebLogic server:XXXXXXXX
Jul 2, 2011 4:12:41 PM AST Notice WebLogicServer BEA-000365 Server state changed to STARTING
Jul 2, 2011 4:12:41 PM AST Info WorkManager BEA-002900 Initializing self-tuning thread pool
Jul 2, 2011 4:12:41 PM AST Notice Log Management BEA-170019 The server log file /oracle/app/Middleware1032/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.
Jul 2, 2011 4:12:43 PM AST Error Security BEA-090892 The dynamic loading of the OPSS java security policy provider class oracle.security.jps.internal.policystore.JavaPolicyProvider failed due to problem inside OPSS java security policy provider. Exception was thrown when loading or setting the JPSS policy provider. Enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
Jul 2, 2011 4:12:43 PM AST Critical WebLogicServer BEA-000386 Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The dynamic loading of the OPSS java security policy provider class oracle.security.jps.internal.policystore.JavaPolicyProvider failed due to problem inside OPSS java security policy provider. Exception was thrown when loading or setting the JPSS policy provider. Enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
weblogic.security.SecurityInitializationException: The dynamic loading of the OPSS java security policy provider class oracle.security.jps.internal.policystore.JavaPolicyProvider failed due to problem inside OPSS java security policy provider. Exception was thrown when loading or setting the JPSS policy provider. Enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1394)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1018)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:875)
at weblogic.security.SecurityService.start(SecurityService.java:141)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
Truncated. see log file for complete stacktrace

Caused By: java.lang.NullPointerException
at org.apache.harmony.security.Util.equalsIgnoreCase(Util.java:46)
at org.apache.harmony.security.fortress.PolicyUtils.getPolicyURLs(PolicyUtils.java:429)
at org.apache.harmony.security.fortress.DefaultPolicy$1.run(DefaultPolicy.java:324)
at org.apache.harmony.security.fortress.DefaultPolicy$1.run(DefaultPolicy.java:317)
at java.security.AccessController.doPrivileged(AccessController.java:202)
Truncated. see log file for complete stacktrace

Jul 2, 2011 4:12:43 PM AST Notice WebLogicServer BEA-000365 Server state changed to FAILED
Jul 2, 2011 4:12:43 PM AST Error WebLogicServer BEA-000383 A critical service failed. The server will shut itself down
Jul 2, 2011 4:12:43 PM AST Notice WebLogicServer BEA-000365 Server state changed to FORCE_SHUTTING_DOWN


----------------------------------------------------------------------------------------------------

Debug Steps:
1: Use the -Djava.security.debug=jpspolicy flag in the weblogic server start-up script as a JAVA_OPTION and try restarting the Server.
2: Found the same error with lots of debug message.
3: Tried creating the Domain with basic Weblogic Server domain only ( without SOA Domain) and then tried starting the Weblogic Admin Server .
4: This time the weblogic Admin Server Started successfully.
5: Checked the permissions for the /tmp directory and changed the permissions to 777 .
6: I tried connecting to the Weblogic Admin Server( from Basic Domain) using WLST connect() command and it throws the below error:

WLST detected that the RuntimeMBeanServer is not enabled. This might happen if the RuntimeMBeanServer is disabled via the JMXMBean.
Please ensure that this MBeanServer is enabled. Online WLST cannot function without this MBeanServer.

This gave me the idea that there is something wrong with the JAVA I am using with weblogic.

7: So, I removed the JAVA directory ( /usr/java6_64 --- in my case ).
8: Reinstalled the IBM JDK ( As my machine was AIX).
9: Now , I tried starting the Weblogic Admin Server from the SOA Domain and it started successfully.

So, the basic idea is to re-install the JAVA in case you encountered any one the below errors:

<Jul 2, 2011 4:12:43 PM AST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The dynamic loading of the OPSS java security policy provider class oracle.security.jps.internal.policystore.JavaPolicyProvider failed due to problem inside OPSS java security policy provider. Exception was thrown when loading or setting the JPSS policy provider. Enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: null
weblogic.security.SecurityInitializationException: The dynamic loading of the OPSS java security policy provider class oracle.security.jps.internal.policystore.JavaPolicyProvider failed due to

OR

WLST detected that the RuntimeMBeanServer is not enabled. This might happen if the RuntimeMBeanServer is disabled via the JMXMBean.
Please ensure that this MBeanServer is enabled. Online WLST cannot function without this MBeanServer.

Tuesday, November 16, 2010

Steps and Errors encountered in installing SOA SCHEMA

1: Installed the Oracle XE 10g on my local machine.
2: Started the RCU utility.
I received the following error:
RCU:6107 DB Init Param Error

C:Documents and Settingssandsing>sqlplus '/' as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Nov 16 16:17:48 2010

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

Enter password:

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> show parameters processes;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     0
db_writer_processes                  integer     1
gcs_server_processes                 integer     0
job_queue_processes                  integer     4
log_archive_max_processes            integer     2
processes                            integer     600

SQL> ALTER SYSTEM SET PROCESSES=500 SCOPE=SPFILE;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  599785472 bytes
Fixed Size                  1288820 bytes
Variable Size             167773580 bytes
Database Buffers          427819008 bytes
Redo Buffers                2904064 bytes
Database mounted.
Database opened.

-----------------------------------------
Then I received the below error:
RCU-6107:DB Init Param Prerequisite failure for: open_cursors. Current value is 300, it should be greater than or equal to 500.

alter system set open_cursors=500 scope=SPFILE;
Restarted DB.

Then I received the following error:

MSG:The OWA_UTIL (Oracle Web Agent) package in the database is missing or out of date, extra time will be required to install this package. Click Ignore to continue with the installation, or Abort to exit.
Error: The Oracle JVM is not installed in the database. It must be installed before loading the portal schema. Please install it and try again.

then I tried running the following scripts:
SQL>  @?/rdbms/admin/pubutil.sql
SQL> @?/rdbms/admin/privutil.sql

Retarted the DB.

Tried running rcu once again:
Still facing the same issue.
SQL> select COMP_NAME, VERSION, STATUS FROM dba_registry;
--------------------------------------------------------------------------------
COMP_NAME                                 VERSION                        STATUS
--------------                            ----------------             -----------
Oracle Database Catalog Views            10.2.0.1.0                     VALID

Oracle Database Packages and Types        10.2.0.1.0                     VALID

Oracle Text                                10.2.0.1.0                     VALID

COMP_NAME                                 VERSION                        STATUS
-------------------                        -----------                     -----------
Oracle XML Database                        10.2.0.1.0                     VALID

SQL> SELECT count(*) FROM dba_objects  WHERE object_type LIKE '%JAVA%';

COUNT(*)
----------
0

This shows that the JAVA VM is not installed for the database.

SQL> SHOW PARAMETER PFILE;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      D:WLSORACLEXEAPPORACLEPRODUCT10.2.0SERVERDBSSPFILEXE.ORA

SQL> SHOW PARAMETER SHARED_POOL_SIZE
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 0

Since, ORALCE XE does not supports the JVM, I have decided to not install the Portal Schema and then the RCU utiltiy executed successfuly and I was able to create the nesessary schema for all other SOA components except PORTAL.