Friday, August 10, 2012

Oracle Service Registry Part 1 – Installing 11.1.1.6.0 version in Standalone mode

Oracle Service Registry Part 1 – Installing 11.1.1.6.0 version in Standalone mode:

Oracle Service Registry (OSR) is a fully V3-compliant implementation of UDDI (Universal Description, Discovery and Integration), and one of the key components of Oracle SOA Suite 11g.

It allows us to publish and discover services and service providers, and manage metadata about services (security, transport, or quality service) using taxonomies. Therefore, it plays an important role when trying to improve visibility and promote service reuse. It is also important in the scope of SOA governance.
A service registry is very important for various reasons. It provides a central place where all service definitions are stored.

A service registry also provides a central place where developers can search for existing services
This improves service reuse, which is one of the most important aspects of SOA.
The Oracle Service Registry 11g can be installed on the following modes.

Standalone Registry:

Installs a standalone registry allowing the creation of a new registry database. The installed registry will be usable without other registry installations unlike Discovery, Publication or Intermediate options.

Discovery Registry:

Installs a discovery registry. The discovery registry contains approved data that have been posted from the publication registry. The discovery registry is under full control of approvers.

Publication registry:

Installs a publication registry. The publication registry is used for testing and verification of data. Important! To install the publication server you must have an installed discovery server because the discovery registry certificate is needed.

Intermediate Registry:

Installs this instance as an intermediate registry, which acts as both a Publication Registry and a Discovery Registry. That is, it is deployed in-between other Registries to support a multi-step approval process. Note that the final Discovery Registry must be installed prior to installing the Intermediate registry, since the Discovery Registry's certificate is needed to complete installation process.

Create the database Schema – OSR:

The database schema will hold all the Service Registry metadata’s
Execute the below sql to create the OSR schema.

CREATE TABLESPACE OSR_TABLESPACE LOGGING
 DATAFILE 'OSR.DBF' SIZE 50M REUSE AUTOEXTEND
 ON NEXT 10M MAXSIZE UNLIMITED
 DEFAULT STORAGE (
  INITIAL 5M
  NEXT 5M
  MINEXTENTS 1
  MAXEXTENTS UNLIMITED
  PCTINCREASE 50);

CREATE USER OSR
 PROFILE DEFAULT
 IDENTIFIED BY blogenv
 DEFAULT TABLESPACE OSR_TABLESPACE
 TEMPORARY TABLESPACE TEMP
 ACCOUNT UNLOCK;

GRANT CONNECT TO OSR;
GRANT RESOURCE TO OSR;
GRANT UNLIMITED TABLESPACE TO OSR;
GRANT CREATE ANY SYNONYM TO OSR;
GRANT DROP ANY SYNONYM TO OSR;
  • Download Oracle Weblogic Server 11g and OSR 11.1.1.6.0
  • Install Oracle Weblogic Server.
  • Double click on OSR111160_generic_.jar to install the OSR.
  • Select the Installation type as Standalone Registry

Thursday, August 9, 2012

EM console hangs After Entering Username and Password (javax.el.ELException: java.lang.IllegalArgumentException: Illegal id) – Oracle SOA Suit 11g

EM console hangs After Entering Username and Password (javax.el.ELException: java.lang.IllegalArgumentException: Illegal id) – Oracle SOA Suit 11g

In Oracle SOA Suite 11.1.1.5.0 in Solaris server, while accessing Enterprise Manager Control the screen just hangs after entering username and password.

The following exception is thrown in the admin server log.

07-Aug-2012 19:37:52 o'clock GMT> <Error> <HTTP> <BEA-101017> <[ServletContext@1860343256[app:em module:/em path:/em spec-version:2.5]] Root cause of ServletException.
javax.faces.FacesException: javax.el.ELException: java.lang.IllegalArgumentException: Illegal id:
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:261)
at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:513)
at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:782)
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
Truncated. see log file for complete stacktrace
Caused By: javax.el.ELException: java.lang.IllegalArgumentException: Illegal id:
at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: Illegal id:
at org.apache.myfaces.trinidad.component.UIXComponentBase._throwBadId(UIXComponentBase.java:1564)
at org.apache.myfaces.trinidad.component.UIXComponentBase._validateId(UIXComponentBase.java:1540)
at org.apache.myfaces.trinidad.component.UIXComponentBase.setId(UIXComponentBase.java:384)
at oracle.sysman.core.view.menu.MenuComponentsUtil.populateRichMenu(MenuComponentsUtil.java:247)
at oracle.sysman.core.view.menu.MenuComponentsUtil.populateRichMenu(MenuComponentsUtil.java:127)
Truncated. see log file for complete stacktrace

The cause of this exception is the Environment variables are not set properly.

Solution:

We have followed the following steps to resolve the issue (the steps are specified in the metalink note 1399244.1).

Following Environment variables should be set for Solaris in the .profile file:
  • Set ORACLE_COMMON_HOME   ORACLE_COMMON_HOME=$MWHOME/oracle_common;export ORACLE_COMMON_HOME
  • Set LD_LIBRARY_PATH to
           $ORACLE_HOME/lib32
  • Set LD_LIBRARY_PATH_64 to
          $ORACLE_HOME/lib
  • Ensure that PATH has reference to
         $ORACLE_COMMON_HOME/common/bin
        $ORACLE_COMMON_HOME/bin
  • set CLASSPATH to include this:
            $ORACLE_HOME/lib:$MW_HOME/jdk1.6.0_24/lib
  • Restart the services and access Enterprise Manager.

Thursday, August 2, 2012

Correlating the request/response messages in MQ Series Adapter – Oracle SOA Suite

Correlating the request/response messages in MQ Series Adapter – Oracle SOA Suite:

Mapping a response to a request in a request-reply interaction requires correlation.The MQ adapter provide the inbuilt options to correlate the request and response messages, there is no need of implementing the custom correlation to correlate the request and response messages.

Each MQSeries request message contains a message ID and a correlation ID. When an application receives a request message from Oracle BPEL PM, it checks for the correlation schema defined for the response message. Based on the correlation schema, the application generates the message ID and correlation ID of the response message. Based on the Message ID/Correlation ID the request/response messages will be correlated in the MQAdapter.

The below are the two patterns to correlate the request/response messages in MQ adapter.
  • Get Message from MQ and Send Reply
  • Send Message to MQ and Get Reply

Get Message from MQ and Send Reply:

MQ adapter gets a message from the inbound Queue and send a reply message to the outbound bound queue Synchronously/Asynchronously.
  • Create a composite with synchronous/asynchronous BPEL process.
  • Delete the default service created and add the MQ Adapter service


Monday, July 30, 2012

JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER'

JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER'

I had some issue with the Oracle SOA Suite domain so that tried to delete and re-create the the domain with different name by using the same schema repository.

The domain creation was successful but when starting the server i was receiving the following error.

javax.transaction.SystemException: weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'BLOG_DOMAIN//AdminServer' expected
'blog_domain1//AdminServer'*** ONLY the original domain and server that creates an LLR table may access it ***
        at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLoggingResourceTransactions(ServerTransactionManagerImpl.java:752)
        at weblogic.jdbc.common.internal.RmiDataSource.recoverLoggingResourceTransactions(RmiDataSource.java:302)
        at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:148)
        at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
        at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:359)
        Truncated. see log file for complete stacktrace


The issue is with the table WL_LLR_ADMINSERVER pointing to the old domain/server details.

Steps to resolve the issue

Update the table with the correct domain and the server details.

update SOA_SOAINFRA.WL_LLR_ADMINSERVER set RECORDSTR = 'BASE_DOMAIN//AdminServer' where  XIDSTR  = 'JDBC LLR BASE_DOMAIN1//Server';

Friday, July 27, 2012

Passing parameter to XSLT in Oracle SOA Suite 11g


Passing parameter to XSLT in Oracle SOA Suite 11g

Not like Oracle SOA Suite 10g, in Oracle SOA Suite 11g the parameters can be directly added into the Transform activity from GUI.
The parameters can be of any schema element type; the XML Schema Simple types are not accepted.

Create a schema definition that will have the parameter definition e.g.
Here, I have defined the schema to pass the parameters startIndex and endIndex to the XSLT.

<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://schemas.oracle.com/parameters"
            targetNamespace="http://schemas.oracle.com/parameters"
            elementFormDefault="qualified">
 <xsd:element name="parameters">
    <xsd:complexType>
      <xsd:sequence>      
              <xsd:element name="startIndex" type="xsd:string"/>
              <xsd:element name="endIndex" type="xsd:string"/>
            </xsd:sequence>     
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

Create the variable (e.g. parameters) of required element type defined in the schema, in my case the element name is parameters.


Open the Transform activity and select the Input/output variables. Add the parameters variable in the source section, the first variable that is added becomes the source for the transformation activity. These additional variables become as parameters to the transform file.