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