Sunday, July 5, 2015

BEA-382510:javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.

BEA-382510:javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.

We were getting the below exception(BEA-382510) intermittently in OSB assign activity in run time.

OSB Assign action failed updating variable "var1": javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.


This is the known issue in SOA Suite 11.1.1.5.0 version and fixed from 11.1.1.6.0.

The issue got fixed in 11.1.1.5.0 version after installing the patch 10086559.



Tuesday, June 30, 2015

How to enable Debugging for OSB modules

How to enable Debugging for Oracle Service Bus(OSB) modules

Make sure server log is set to debug (Weblogic console -> Environment-->Servers -><<OSB Server>>--> Logging -> Advanced)

Stop the servers .
Open file <DOMAIN_HOME>/alsbdebug.xml
Set the value to true for the required modules.


Open file <DOMAIN_HOME>/configfwkdebug.xml
Set the value to true for the required modules.


Restart the server
Server log will have the details.


Sunday, March 22, 2015

Invocation of https/SSL service is not working from OSB

Invocation of https/SSL service is not working from OSB

We were trying to install the wildcard certificate to enable the communication from OSB to end system, but the following exception was displayed in the log file and also the communication to the end system is failing even though the certificate installation was successful;

<Jan 23, 2015 10:45:05 PM PST> <Notice> <Security> <localhost> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <bac54c313ca42523:46f5522b:14b61066510:-7ffd-000000000008b798> <1423456801909> <BEA-090898> <Ignoring the trusted CA certificate "CN=*.sample.com,O=Sample,L=Sample,ST=Sample,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
After analysis, we found that JSSE flag should be enabled along with Custom Host Name Verification (weblogic.security.utils.SSLWLSWildcardHostnameVerifier) to support wildcard certificate.

ssl_config

 After enabling the JSSE flag, none of the https communication from OSB is working but https communication from BPEL is working fine even with the wildcard certificate(BPEL and OSB is running in the same server).

The following exception is thrown while invoking the https service from OSB.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>
BEA-380000: General runtime error: java.lang.NullPointerException
</faultstring>
<detail>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>
General runtime error: java.lang.NullPointerException
</con:reason>
<con:location>
<con:node>RouteToSFDC_SearchService_BS</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

This is the internal OSB server issue; the cause of the issue is that the AsyncResponseHandler does not properly register JSSEFilter for JSSE SSL.
The Weblogic patch 11866509 based on the Weblogic server version (this issues is identified in Weblogic server version 10.3.4 and 10.3.5) should be installed to resolve the issue.


Monday, February 2, 2015

Console Exception:Error opening /com/bea/alsb/console/oam/module/Module.jpf - Oracle OSB

Console Exception:Error opening /com/bea/alsb/console/oam/module/Module.jpf - Oracle OSB

We were getting the exception "Error opening /com/bea/alsb/console/oam/module/Module.jpf. An unexpected error occurred" while opening OSB console.


The following exception was displayed in the AdminServer error log.

<02-Feb-2015 09:53:42 o'clock GMT> <Error> <netuix> <BEA-423137> <There was an error loading the requested URI /com/bea/alsb/console/oam/module/Module.jpf.>
<02-Feb-2015 09:53:42 o'clock GMT> <Error> <netuix> <BEA-423223> <There was an error while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control :: null ::.
com.bea.netuix.nf.UIControlException: com.bea.portlet.adapter.scopedcontent.ActionLookupFailedException: javax.servlet.ServletException: com.bea.alsb.console.common.base.SBConsoleAccessException: The current login role is not authorized to use the console action: "/sbSubModules"
        at com.bea.netuix.servlets.controls.content.PageFlowContent.checkPreRenderExceptions(PageFlowContent.java:130)
        at com.bea.netuix.servlets.controls.content.NetuiContent.beginRender(NetuiContent.java:343)
        at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
        at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
        at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
        Truncated. see log file for complete stacktrace

<02-Feb-2015 09:55:56 o'clock GMT> <Error> <ALSB Console> <BEA-494002> <Internal error occured in OSBConsole : The current login role is not authorized to use the console action: "/ViewChangeCenter"
com.bea.alsb.console.common.base.SBConsoleAccessException: The current login role is not authorized to use the console action: "/ViewChangeCenter"
        at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.processActionPerform(SBConsoleRequestProcessor.java:88)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
        at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
        at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.process(SBConsoleRequestProcessor.java:191)
        Truncated. see log file for complete stacktrace

The OSB console page was opening properly and stopped working suddenly.

The root cause of the problem is corruption of the embedded LDAP user store.

Steps to resolve the issue:

Stop all servers in the domain and backup the <<SERVER_HOME>>/data/ldap for all the servers including managed server.

Copy the ldap folder from the previous server backup or other working environment from same location to all the servers.

Restart the servers.


Thursday, September 25, 2014

Not able to create the session in OSB console - Could not create directory /osb/config/sessions/weblogic

Not able to create the session in OSB console - Could not create directory <DOMAIN_HOME>/osb/config/sessions/weblogic

Sometimes we may receive the error "could not create directory <DOMAIN_HOME>/osb/config/sessions/weblogic" in the OSB console while trying to create the session.



There will be a multiple reason for this issue, in our case the root cause of the exception is the space is full for the mount  point


How to Fix

To resolve the issue add extra space to the mount point or clear some of the unwanted files and make the required space.


Thursday, July 24, 2014

Cipher not initialized exception while invoking the Salesforce service through OSB

Cipher not initialized exception while invoking the Salesforce service through OSB

We are getting the "Cipher not initialized" exception wile invoking the Salesforce services through OSB.


We are able to invoke the login.salesforce.com URL successfully and able to receive the session id, also this exception was thrown only for a particular sandbox but the all other sandbox invocation is successful.

The "Cipher not initialized" exception will be thrown when there is no common Ciphers available between the client and server while negotiating the SSL communication.

We have raised a case with Salesforce regarding this and receive the response as "We recently upgraded our Cipher suites for SSL. To resolve the issue upgrade latest version of Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files- 6 for JDK1.6 on middleware."

After upgrading the Unlimited Strength Jurisdiction Policy Files in all the servers nodes we are able to invoke the service successfully.

Steps to resolve the issue

  • Download the Unlimited Strength Jurisdiction Policy Files from http://www.oracle.com/technetwork/java/javase/downloads/index.html(Under Additional Resources" section), for java 1.6 use http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
  • Unzip the downloaded zip 
  • Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security in all the OSB nodes.
  • Restarts the servers.
Now you will be able to invoke the service successfully.


Thursday, May 22, 2014

The selected WSDL contain a direct binding but seems to be of the wrong type - Oracle SOA Suite

The selected WSDL contain a direct binding but seems to be of the wrong type - Oracle SOA Suite

You will be receiving the message "The selected WSDL contain a direct binding but seems to be of the wrong type. Looking for Oracle Service Bus type.Please check your WSDL selection" while trying to create the direct binding to invoke the OSB service.


This message says the OSB proxy service is not configured with SB transport.
Configure the OSB Proxy service with the SB transport to invoke the same from SOA composite through Direct Binding.

When looking up the OSB service from JDeveloper SOA Resource Browser, the Proxy will be shown as direct for SB transport services.



Friday, May 2, 2014

Transforming the REST XML message to SOAP message - OSB

Transforming the REST XML message to SOAP message - OSB

This post will explain how to Transform the REST XML message to SOAP message in OSB

While receiving the response from REST interface  with the content type as application\xml, the input XML will be plain without the target namespace specified.
But if you are invoking the BPEL with this message the BPEL cant perform any xpath operations on this message without target namespace.The target namespace should be added to the message.

The XSLT can be used to add the name space to the XML message but before performing this operation the SOAP envelope of the body variable should be removed
After removing the namespace the XML should be assigned to the body variable to send to target system.

Follow the below steps to achieve the same:

Remove SOAP Envelope:

The below XSLT will help as to remove the namespace from the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resource
Assign the output to a temp variable - var1.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()" />
        </xsl:copy>
      </xsl:template>

      <xsl:template match="soapenv:*">
        <xsl:apply-templates select="@* | node()" />
  </xsl:template>
</xsl:stylesheet>




Transforming the SOAP message to REST XML message- OSB

Transforming the SOAP message to REST XML message- OSB

While invoking the REST interface from OSB with the content type defined as application\xml, the target system will expect the simple XML message without the target namespace specified.

The XSLT can be used to remove the name space from SOAP message but before performing this operation the SOAP envelope of the body variable should be removed
After removing the namespace the XML should be assigned to the body variable to send to target system.

Follow the below steps to achieve the same:

Remove SOAP Envelope:

The below XSLT will help as to remove the namespace from the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resource
Assign the output to a temp variable - var1.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()" />
        </xsl:copy>
      </xsl:template>

      <xsl:template match="soapenv:*">
        <xsl:apply-templates select="@* | node()" />
  </xsl:template>
</xsl:stylesheet>

Removing Namespace:

The below XSLT will help as to add the target namespace to the XML.

Create a XSLT resource from SB console.
Add a Assign activity with the XSLT resouce  to remove the namespace from the variable var1
Assign the ouput to a temp variable - var2

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="*">
        <xsl:element name="{local-name()}">
            <xsl:apply-templates select="@* | node()" />
        </xsl:element>
    </xsl:template>
    <xsl:template match="@*">
        <xsl:attribute name="{local-name()}">
            <xsl:value-of select="." />
        </xsl:attribute>
    </xsl:template>
    <xsl:template match="text() | comment() | processing-instruction()">
        <xsl:copy />
    </xsl:template>
</xsl:stylesheet>

Assign the content of var2 to body:

Add replace activity to replace the node contents of body with var2




Sunday, April 27, 2014

Purging the Oracle Service Bus(OSB) Alerts

Purging the Oracle Service Bus(OSB) Alerts

The History of  Alerts in OSB can be purged through OSB console.

Make sure you are purging the alerts regularly otherwise you may face some of the  the issues like
  • The server will take more time to start
  • The alert dashboard will become very slow.
Login to sbconsole and click on Operations-->Monitoring-->Dashboard
Click on Extended Alert History


Click on "Purge SLA Alerts History"




Saturday, April 26, 2014

Purging Application Not Available - Oracle OSB

Purging Application Not Available - Oracle OSB

While we are trying to purge the reports from OSB sbconsole we may get the following message in the console.

"Purging Application Not Available.Message Reporting Purger is not deployed, or it is not active"





The issue is due to the the application "Message Reporting Purger" might not be deployed or not in active state.

Verify the application is active from the admin console. If the application is not deployed then deploy the application 
from the following location oracle/product/soa/11g/fmw/Oracle_OSB/lib/common/msgpurger. ear with the application name 
"Message Reporting Purger"





Configuring Proxy Sever for Oracle Service Bus(OSB)

Configuring Proxy Sever for Oracle Service Bus(OSB)

Sometimes we may required to use the Proxy server in OSB for outbound communication.

The Proxy Server can be configured to the Business Service as below.

Configure the Proxy Server:

The first step is we have to configure the Proxy server in the OSB global resources.

Login to OSB an click on System Administration and Proxy Servers in the Global resources section.
Click on Add button

Enter the Proxy server details and click on Add button in the Host-Port Parameters section.
If the the authentication is required then provide the username/password.
Save the configurations.


Thursday, April 3, 2014

Re-Targeting the singleton Applications to a single OSB node through WLST script

Re-Targeting the singleton Applications to a single OSB node through WLST script

While setting up a OSB cluster environment some of the singleton applications should be targeted to a single node in the cluster.Also we have to make sure these applications are targeted to the active OSB node in the cluster.

The below WLST script will help us to re-target the singleton applications to a single active OSB node.

ReTargetSingletontoActiveNode.py

adminURL='t3://localhost:8080
adminUserName='weblogic'
adminPassword=welcome1
connect(adminUserName, adminPassword, adminURL)

runtime()
edit()
startEdit()

print "Targeting Intiated..."

cd('/AppDeployments/ALSB Domain Singleton Marker Application')
set('Targets',jarray.array([], ObjectName))
set('Targets',jarray.array([ObjectName('com.bea:Name=OSB2,Type=Server')], ObjectName))
print "Targeted the Domain Singleton Marker Application to OSB2..."

cd('/AppDeployments/ALSB Cluster Singleton Marker Application')
set('Targets',jarray.array([], ObjectName))
set('Targets',jarray.array([ObjectName('com.bea:Name=OSB2,Type=Server')], ObjectName))
print "Targeted the Cluster Singleton Marker Application to OSB2..."

cd('/AppDeployments/Message Reporting Purger')
set('Targets',jarray.array([], ObjectName))
set('Targets',jarray.array([ObjectName('com.bea:Name=OSB2,Type=Server')], ObjectName))
print "Targeted the Message Reporting Purger to OSB2..."

activate()
exit()


Unable to obtain metrics data from the server - Oracle OSB Non Clustered Environment

Unable to obtain metrics data from the server - Oracle OSB Non Clustered Environment

In Oracle OSB Monitoring Dashboard page we were receiving the warning message "Unable to obtain metrics data from the server" and not able to see any of the collected metrics.


This is a single node non clustered Dev setup, the OSB is running part of the AdminServer.
After analysis the issue is with the configuration of the singleton applications - ALSB Cluster Singleton Marker Application and ALSB Domain Singleton Marker Application.

Unfortunately the ALSB Domain Singleton Marker Application got undeployed and ALSB Cluster Singleton Marker Application was deployed as library instead of Enterprise Application.



Tuesday, January 14, 2014

Polling the Message from WebSphere MQ using MQ Transport in OSB

Polling the Message from WebSphere MQ using MQ Transport in OSB

OSB MQ transport help us to post/receive message from the WebSphere MQ. The MQ transport can be configured to poll the queue for the new messages.


This blog explains how to configure the OSB Proxy Service to poll the Queue for new messages.

Steps to configure the OSB Proxy Service to poll the Queue for new messages

Create a OSB Project and Create a Resource of  type MQ Connection.


Provide the MQ Connection details like host name,port number,Queue Manager Name, Channel Name and also provide Connection Pool Size, Connection Timeout and Connection Max Wait. Provide the Static Service Account if User Name/Password is required to connect to MQ and leave the Connection type as default value(tcp mode). Save the connection details.





Friday, January 10, 2014

Initiating an OSB Service with Email

Initiating an OSB Service with Email

Email transport will help us to send/receive emails in OSB. Some cases we may required to initiate the external service based on the email in the user inbox.


The Proxy service polls the Mail Inbox for the new messages and invokes the Business service whenever there is a new message in the Inbox.The polling interval can be specified in the Proxy Service configuration.Here i will explain about invoking the service with the XML message received from the email body.

Invoking the service with the XML message received from the email body

Create a XSD message structure that will be used by Proxy Service to receive the message

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/JEJBSample/EmployeeDetailService/EmployeeDetailService"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="EmployeeRequest">
<complexType>
<sequence>
<element name="empNo" type="string"/>
</sequence>
</complexType>
</element>
</schema>

Create a OSB project and create a Business service that needs to be invoked based on the Email content - Here i am invoking a sample BPEL service with the same XSD structure as input.

Create a Service Account with Static username/password of email user.




Tuesday, January 7, 2014

Exposing a OSB Proxy Service as EJB through JEJB transport

Exposing a OSB Proxy Service as EJB through JEJB transport

The JEJB transport lets you pass Plain Old Java Objects (POJOs) through Oracle Service Bus.To a J2EE client, a JEJB proxy service looks like a stateless session bean. A JEJB proxy service, on receiving the method arguments, passes their XML representation in the pipeline $body variable. POJO arguments are represented as the XML fragment. This XML fragment contains the location of the actual POJO stored in the object repository within the pipeline.

For deployment, Oracle Service Bus automatically packages JEJB proxy services as enterprise archives (EARs) and deploys to weblogic server(OSB Server).


JEJB transport uses the Java Interface to expose as EJB.

Here i will explain exposing the proxy service as EJB and invoking the same through java client by passing/receiving  the java objects and invoking the business service by passing/receiving the XML(Java utility methods will be used to convert Java to XML and XML to Java).The BPEL service invoked will receive the empno and and return back the employee details.

Steps to expose the proxy service as EJB

Create a Java interface that will receive/return the Employee object .

package jejbsample;
public interface EmployeeDetails {
 
    Employee getEmployeeDetails(Employee emp);
}

package jejbsample;
import java.io.Serializable;
public class Employee implements Serializable{
    private String empName;
    private String empNo;
    private String empDept;
    private String empLoc;  
    
    public Employee() {
        super();
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }
    public String getEmpName() {
        return empName;
    }
    public void setEmpNo(String empNo) {
        this.empNo = empNo;
    }
    public String getEmpNo() {
        return empNo;
    }
    public void setEmpDept(String empDept) {
        this.empDept = empDept;
    }
    public String getEmpDept() {
        return empDept;
    }
    public void setEmpLoc(String empLoc) {
        this.empLoc = empLoc;
    }
    public String getEmpLoc() {
        return empLoc;
    }
}

Create a Utility class that will convert the Java to XML and XML to Java.

package javaxmlconverter;
import java.io.InputStream;
import javax.xml.parsers.*;
import jejbsample.Employee;
import org.apache.xmlbeans.*;
import org.w3c.dom.*;

public class JavaXMLConverter {
    public JavaXMLConverter() {
        super();
    }
    public static String getEmpRequestXML(Employee emp) {       
        return emp.getEmpNo();
    }
    public static Employee getEmpResponseJava(XmlObject xml) throws Exception{
            Employee emp = new Employee();        
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            InputStream inputStream = xml.newInputStream();
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.parse(inputStream);           
            String empName=null ;
            String empNo=null;
            String empDept=null;
            String empLoc=null;            
            
            NodeList nList = doc.getElementsByTagName("EmployeeResponse");
            for (int temp = 0; temp < nList.getLength(); temp++) {
                Node nNode = nList.item(temp);
                if (nNode.getNodeType() == Node.ELEMENT_NODE) {
                    Element eElement = (Element)nNode;
                     empName =eElement.getElementsByTagName("empName").item(0).getTextContent();
                     empNo =eElement.getElementsByTagName("empNo").item(0).getTextContent();
                     empDept =eElement.getElementsByTagName("empDept").item(0).getTextContent();
                     empLoc =eElement.getElementsByTagName("empLoc").item(0).getTextContent();
                   
                }
            }
        emp.setEmpDept(empDept);
        emp.setEmpName(empName);
        emp.setEmpLoc(empLoc);
        emp.setEmpNo(empNo);
        
        return emp;
        }
    }



Tuesday, December 10, 2013

Modifying the Request Headers of a OSB Business Service

Modifying the Request Headers of a OSB Business Service

Sometimes we may required to change the request header values eg. Content-Type and Accept etc for OSB Business Service request dynamically, this post will explain the steps to modify the header values for a Business Service request.

Steps to modify the header values for a Business Service request

Login to sbconsole,Create the session and open the message flow of Proxy Service.


Edit the Route to Business Service and Click on add Request Action



Thursday, December 5, 2013

Dynamic endpoint configuration for OSB Business services

Dynamic endpoint configuration for OSB Business services

Sometimes we may required to change the OSB Business service endpoint dynamically.

Steps to change the Business Service endpoints dynamically

The following are the steps to change the Business Service endpoints dynamically.

Login to sbconsole and create the session.

Open the Proxy Service Message Flow.


Click on the RouteTo_BusinessService and click on Edit Route





Tuesday, November 26, 2013

Creating JCA Adapters with Abstract WSDL - Oracle OSB

Creating JCA Adapters with Abstract WSDL - Oracle OSB

Oracle OSB provides the option to create JCA adapters to connect to different resources through Proxy Services and Business Services.

The JCA adapter needs to be created through JDevelper, JDeveloper creats a Abstract WSDL and a JCA adapter file.


When creating Busines Service through eclipse, eclipse provides the option to generating the service by right clicking the JCA file.

But through OSB console, we will not be able to generate the Business Service with the Abstract WSDL(WSDL Web Service)  because it will not have any binding or service defined.

If we are adding the binding/service to the abstract wsdl and creating the Business servive the following exception will be thrown