Friday, May 30, 2014

Installing OER 11g on an existing SOA 11g domain

In this blog post, I will provide detailed step-by-step instructions to install OER 11g (11.1.1.7) on an existing SOA domain.

Pre-Requisites: SOA 11g installed and domain configured. I used 11.1.1.7 version (latest version as on date of writing this post)

You can choose to have a single server install where AdminServer doubles up as SOA server or have 2 managed servers (Admin & SOA) on your domain. You will have to install OER as a separate managed server. I personally couldn't succeed with a OER single server install (Admin + SOA + OER on the same managed server).

Installing OER 11.1.1.7

Step 1: Connect to the database on your server as SYS user and execute the following scripts. This step is an important pre-requisite as it creates the tablespace and schema to store OER asset/artifact metadata

Note: Ensure that the path to DATAFILE parameter exists

Create Tablespaces:

CREATE TABLESPACE OER_DATA
    DATAFILE '/u01/app/oracle/oradata/XE/oer_data.dbf' SIZE 300M
 AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE
    LOGGING
    ONLINE
    SEGMENT SPACE MANAGEMENT AUTO;

CREATE TABLESPACE OER_LOB
    DATAFILE '/u01/app/oracle/oradata/XE/oer_lob.dbf' SIZE 300M
 AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE
    LOGGING
    ONLINE
    SEGMENT SPACE MANAGEMENT AUTO;

CREATE TABLESPACE OER_INDEX
    DATAFILE '/u01/app/oracle/oradata/XE/oer_index.dbf' SIZE 300M
 AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE
    LOGGING
    ONLINE
    SEGMENT SPACE MANAGEMENT AUTO;

Create OER Schema:
  
CREATE USER OER IDENTIFIED BY OER_PWD
DEFAULT TABLESPACE OER_DATA
TEMPORARY TABLESPACE TEMP;

Apply Grants:

GRANT CREATE MATERIALIZED VIEW TO OER;
GRANT CREATE SEQUENCE TO OER;
GRANT CREATE SESSION TO OER;
GRANT CREATE SYNONYM TO OER;
GRANT CREATE TABLE TO OER;
GRANT CREATE TRIGGER TO OER;
GRANT CREATE VIEW TO OER;
GRANT UNLIMITED TABLESPACE TO OER;

Step 2:
Download the appropriate installer for your server. If you are on a 64-bit machine, irrespective of whether it is Windows or Linux, you can choose to download the generic installer.

Unzip the ofm_oer_generic_11.1.1.7.0_disk1_1of1.zip file into a server location

Step 3:
Ensure java is on your environment PATH variable and execute the following command

java -D64 -jar OER111170_generic.jar

Step 4:
In the welcome screen of the OER installer, click Next

Step 5:
Choose your existing FMW home (in this case your home directory where SOA is installed - Since we are installing OER on the same domain as SOA) and click Next

Step 6:
Validate the Oracle Enterprise Repository install location and click Next

Step 7:
Choose WebLogic Server 11 in the "Choose Application Server" dialog and click Next

Step 8:
In the "Initialize Repository Properties" screen, enter the following values and click Next

OER managed server port number: 7101 (default, but you can choose to change it here)
Fully qualified server name: Enter the fully qualified server hostname
Repository application name: oer


Step 9:
In the "Configure Database" screen, choose Yes to configure the database for OER and click Next

Step 10:
Enter the following values in the "Provide Database Tablespace Names" screen

Data tablespace: oer_data
BLOB tablespace: oer_lob
Index tablespace: oer_index

Step 11:
In the "Initialize Repository Database Properties" browse for the ojdbc6.jar driver file - This file can be found at the database installation location: <DB_Home>/jdbc/lib

Provide the DBMS (SID) name, host, port and OER username and password and click Next

Step 12:
You must now see a successful installation message.

Extend SOA Domain to host OER

Step 13:
Go to <Middleware_Home>/wlserver_10.3/common/bin and execute config.sh
./config.sh

Step 14:
In the "Configuration Wizard" home screen, choose the option "Extend an existing WebLogic domain" and click Next


Step 15:
Choose your WebLogic domain where SOA suite is installed

Step 16:
Scroll down the list of products, select Oracle Enterprise Repository - 11.1.1.7.0 from the list and click Next

Step 17:
Leave defaults and click Next in the following screens until you reach the "Select Optional Configuration" page

Step 18:
In the "Select Optional Configuration" screen, select "Managed Servers, Clusters and Machines" option and click Next

Step 19:
Leave defaults in the following screens and in the Configuration Summary page, click on "Extend"

You must see "Domain Extension Applied Successfully" message

Now that your domain has been extended, the domain configuration corrupts a few configuration settings that prevents a successful server startup. Follow the instructions below to get OER started successfully.

Observation 1:

I observed that the UMSJMSSystemResource-jms.xml presents duplicate entries which prevents a successful server startup. To resolve this, go to <Domain_Home>/config/jms folder and check and remove the duplicate entries as highlighted below. [Note: Take a backup of this file]

<queue name="OraSDPM/Queues/OraSDPMEngineCmdQ_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMEngineCmdQ</jndi-name>
  </queue>
  <queue name="OraSDPM/Queues/OraSDPMEngineSndQ1_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMEngineSndQ1</jndi-name>
  </queue>
  <queue name="OraSDPM/Queues/OraSDPMEngineRcvQ1_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMEngineRcvQ1</jndi-name>
  </queue>
  <queue name="OraSDPM/Queues/OraSDPMDriverDefSndQ1_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMDriverDefSndQ1</jndi-name>
  </queue>
  <queue name="OraSDPM/Queues/OraSDPMAppDefRcvQ1_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMAppDefRcvQ1</jndi-name>
  </queue>
  <queue name="OraSDPM/Queues/OraSDPMWSRcvQ1_auto_3">
    <sub-deployment-name>UMSJMSServer505614749</sub-deployment-name>
    <jndi-name>OraSDPM/Queues/OraSDPMWSRcvQ1</jndi-name>
</queue>

Observation 2:

The memory setting of your SOA domain would be affected because the setOERDomainEnv.sh script gets called every time. Sophisticated way of handling this would be at the setSOADomainEnv.sh where you can validate the $SERVER_NAME and configure the USER_MEM_ARGS for each Managed Server appropriately. Else, just increase the USER_MEM_ARGS in the setOERDomainEnv.sh script.

Now, you are all set to start your OER server and start SOA Governance !!

Saturday, March 1, 2014

JDeveloper Deployment to SSL Configured WebLogic (SSL Handshake Failure)

If you have configured SSL keystore on your WebLogic application server, you might face SSL Handshake error while trying to deploy any application from Oracle JDeveloper.

To overcome this issue, download the SSL certificate and import it to your JDeveloper java keystore.

1. Open your browser and establish an SSL connection to your server. For eg., https://hostname:port/console

2. Click on the green padlock sign -> Connection tab and click on Certificate Information

3. In the Certificate dialog, click on "Copy to File.."

4. In the resulting "Certificate Export Wizard", choose Next


5. Leave the default selection (DER encoded binary X.509) and click Next

6. Provide a filename where the certificate file will be exported and saved

Import certificate into the Java keystore: [Ensure that this is the java that JDeveloper points at]

1. Open command prompt, go to <Java_Home>\jre\bin

2. Issue the following command to import the server SSL certificate to java keystore for successful handshake;

keytool -import -v -file C:\Temp\root.cer -keypass password -keystore C:\Java\jdk6u33\jre\lib\security\cacerts -alias mykey

3. When prompted, provide the keystore password [Default password is changeit]

Voila, now you are all set to deploy applications from JDeveloper !!

OSR on OER/SOA/OSB domain - QName violates loader constraints

Recently i had installed OSR on the same domain where my SOA, OSB and OER co-exists. While starting the OSR managed server, I faced the following error;

<Error> <HTTP> <soabpm-vm.site> <osr_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>>
<BEA-101017> <[ServletContext@470316600[app:registry module:registry.war path:/registry spec-version:null]] Root cause of ServletException.
java.lang.LinkageError: Class javax/xml/namespace/QName violates loader constraints
at com.idoox.wsdl.extensions.PopulatedExtensionRegistry.(PopulatedExtensionRegistry.java:84)
at com.idoox.wsdl.factory.WSDLFactoryImpl.newDefinition(WSDLFactoryImpl.java:61)
at com.idoox.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:419)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:309)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:272)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:198)
at com.idoox.wsdl.util.WSDLUtil.readWSDL(WSDLUtil.java:126)

This blog here helped me get rid of the error.

Saturday, February 8, 2014

BPM Workspace/Composer Login Error ORABPEL-10585

If you are facing trouble logging into BPM workspace or composer, this post could help save you some time.

First check if the error message in your SOA managed server diagnostic log after the failed login is the following;

javax.security.auth.login.LoginException: Operation exception.
at oracle.bpm.papi.ora.mgr.OrganizationManager.lookupParticipant(OrganizationManager.java:61)
at oracle.bpm.papi.ora.mgr.OrganizationManager.lookupParticipant(OrganizationManager.java:41)
..........
..........
Caused by: fuego.papi.OperationException: Operation exception.
... 69 more
Caused by: ORABPEL-10585

Service error.
Internal Error; Service error occurs in IdentityService in method lookupUser.
Refer to the log file that is configured for oracle.soa.services.identity for more details on this error and contact Oracle Support Services

If this is not the error in your logs, you may look at the blog post here for other options to see if that helps resolve your problem.

Now, let us look at the fix.

1. Login to the EM (Enterprise Manager) console
2. Expand SOA and Right click on soa-infra
3. Goto Administration -> System MBean Browser
4. Minimize the tree structure (com.bea) to view Application Defined MBeans section
5. Expand oracle.as.soainfra.config -
> Server:SOAServerName -> SoaInfraConfig
6. Select soa-infra
7. Update the property ServerURL with a valid URL [Ensure that the hostname here matches your environment hostname. Tip: It should be same as the front end host]

eg., http://hostname:port
8. Click on Apply


Restart your SOA managed server. You should now be able to successfully login to your BPM Workspace or Composer