Monday, August 27, 2012

Publishing the Java webservices to Oracle Service Registry through EM Console in Oracle SOA Suite


Publishing the Java webservices to Oracle Service Registry through EM Console in Oracle SOA Suite

This blog will explain the steps to publish the java webservices to the Oracle Service Registry through EM console  in Oracle SOA Suite.

Steps to publish the Java webservices to OSR through EM console

Before following the below steps follow the Register the Service registry section from the previous blog to register the service registry.
  • Login to EM console and maximize the Application Deployments section.

  • Click on the weservice that needs to be published, select the Application Deployment and click on webservices.


Publishing the SOA composite services to Oracle Service Registry through EM console in Oracle SOA Suite


Publishing the SOA composite services to Oracle Service Registry through EM console in Oracle SOA Suite

The blog will explain the steps to publish the SOA composite services Oracle Service Registry through EM console in Oracle SOA Suite.

Register the Service registry:


Before publishing the SOA services to OSR from em console the service registry should be registered through EM console.

  • Login to EM console
  • Right click on the domain and click on–> webservices ->Registered Services

  • Click on add button


Saturday, August 25, 2012

Problem while accessing the Oracle ADF application - java.lang.NoClassDefFoundError:oracle/jbo/common/SessionContextManagerImpl


Problem while accessing the Oracle ADF application - java.lang.NoClassDefFoundError:oracle/jbo/common/SessionContextManagerImpl

The following exception was thrown while accessing the Oracle ADF application deployed to the server.

java.lang.NoClassDefFoundError: oracle/jbo/common/SessionContextManagerImpl
                at oracle.adf.model.BindingRequestHandler.endRequest(BindingRequestHandler.java:326)
                at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:210)
                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)

The issue is SessionContextManagerImpl class is missing from the classpath.

Steps to resolve the issue: 

  • Right click on the project and click on Project properties.
  •  Select the Libraries and Classpath and click on Add Library


Friday, August 17, 2012

Problem while deploying Oracle ADF application - java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter

Problem while deploying Oracle ADF application - java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter

The following exception was thrown while deploying the Oracle ADF application to the server.

[08:38:30 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'ADF_OSR_ViewController_webapp1.war'
[08:38:30 PM] Caused by: java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter
[08:38:30 PM]   See server logs or server console for more details.
[08:38:30 PM] weblogic.application.ModuleException: Failed to load webapp: 'ADF_OSR_ViewController_webapp1.war'
[08:38:30 PM] ####  Deployment incomplete.  ####
[08:38:30 PM] Remote deployment failed

The issue is the ADFBindingFilter class is missing in the class path.

Steps to resolve the issue:

  • Right click on the project and click on Project properties.
  • Select the Deployment, the deployment profile and click on edit button.


java.lang.RuntimeException: Cannot find FacesContext

java.lang.RuntimeException: Cannot find FacesContext

Some time we may receive the below exception while accessing the JSF pages.

java.lang.RuntimeException: Cannot find FacesContext
 at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:2122)
 at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1933)
 at jsp_servlet.__employeedetails._jsp__tag0(__employeedetails.java:135)
 at jsp_servlet.__employeedetails._jspService(__employeedetails.java:110)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

The issue is due to the faces servelet has not been initialized.

The cause is the URL used to access the page is wrong like
http://10.136.211.120:7001/ADF_OSR-ViewController-context-root/EmployeeDetails.jsp

The URL should be like
http://localhost:7001/ADF_OSR-ViewController-context-root/faces/EmployeeDetails.jsp



Monday, August 13, 2012

Consuming the services from Oracle Service Registry in a Oracle SOA Suite Composite application

Consuming the services from Oracle Service Registry in a Oracle SOA Suite Composite application

  • Create the composite with BPEL process; add the webservice adapter

  • Click on the Find Existing Service icon to look up the service from the registry
  • Select the service from the list and click ok.Select the concrete WSDL/endpoint resolve option based on the requirement and click ok


Publishing the services to Oracle Service registry through JDeveloper

Publishing the services to Oracle Service registry through JDeveloper

The composites services deployed in the Oracle SOA Suit Serves can be published to Oracle Service registry and the same can be consumed by the client application by looking up the services from the Service Registry.

This blog explains the steps to publish the services deployed in the Oracle SOA Suit server to Oracle Service registry.

Create the Business Entity in the Oracle Service registry:

A business entity represents an organization or group of people responsible for a set of services (a service provider).
  • Login to Registry console
  • Select Publish tan and select Business
  • Click on Add Business Button; enter the Business name and the description



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> <[[email protected][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 11g

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

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