Wednesday, February 18, 2015

The Admin console is not up/accessible – Oracle SOA Suite

The Admin console is not up/accessible –  Oracle SOA Suite

We were facing a strange issue in our Oracle SOA Suite production server in Solaris, we could not able to access the admin console even though the server is started properly and there is no error in the log file.

We were able to telnet the admin server listen address from Admin server node but not able to do it from other nodes.

The root cause of the issue is with Gateway server, the admin server listen address is not listed on the Gateway - the gateway server is not online (the servers listen address is configured in Gateway).

After Solaris admin team made the Gateway server online, we were able to see the admin server listen address listed on the gateway.

After restarting the admin server we were able to access the console page.

The following command can be used for checking the Gateway server status

 netstat –r  


Tuesday, December 30, 2014

Building a executable JAR file with external libraries through JDeveloper

Building a executable JAR file with external libraries through JDeveloper

This post explain the different approaches to build the executable JAR file with external libraries through JDeveloper.

Referring the external libraries from JAR:

Right Click project and select properties
Click on Deployment and create new JAR deployment profile.
Select "Include Manifest File" option.
Select the main class.



Create a manifest file(any location) and add the required jar files to the Class-Path header

Class-Path.mf

Class-Path: json.jar log4j.jar

 End the Class-Path.mf file by a carriage return.


Add the Class-Path.mf file to Additional Manifest Files to Merge into Manifest.mf




Saturday, December 13, 2014

java.net.ConnectException,Bootstrap to server failed while deploying the compoite - Orace SOA Suite

 java.net.ConnectException,Bootstrap to server failed while deploying the compoite - Orace SOA Suite

Sometimes we may receive the following exception while deploying the composite to Oracle SOA Suite server using even though the sever is running fine and reachable.

oracle.rc.asadapter.connection.ConnectionException
at oracle.rc.asadapter.weblogic.connection.spi.Weblogic10JndiProvider.getPresentation(Weblogic10JndiProvider.java:86)

Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://127.0.0.1:8000: Bootstrap to localhost/127.0.0.1:8000 failed. It is likely that the remote side declared peer gone on this JVM]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)

Caused by: java.net.ConnectException: t3://127.0.0.1:8000: Bootstrap to localhost/127.0.0.1:8000 failed. It is likely that the remote side declared peer gone on this JVM

Caused by: java.rmi.ConnectException: Bootstrap to localhost/127.0.0.1:8000 failed. It is likely that the remote side declared peer gone on this JVM
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:334)


This issue can be resolved by configuring valid machine IP or complete name of the machines, including the domain extension as listen address in weblogic server.



Monday, September 22, 2014

XML-22036: (Error) Cannot convert result tree fragment to NodeSet - Oracle SOA Suite 11g

XML-22036: (Error) Cannot convert result tree fragment to NodeSet - Oracle SOA Suite 11g

We are getting the below exception in runtime while passing the parameter and accessing the same from XSLT in Oracle SOA Suite.




The following exception occurred while attempting to execute operation copy at line 139
-<exception class="com.collaxa.cube.xml.xpath.XPathException">
-<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
<h3>This page contains the following errors:</h3>
<div style="font-family:monospace;font-size:12px">
error on line 7 at column 1: Extra content at the end of the document
</div>
<h3>Below is a rendering of the page up to the first error.</h3>
</parsererror>
XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('xsl/DistinctPayload.xsl', $inputVariableLocal.payload, 'FlowSubscriberVar2', $FlowSubscriberVar2).
The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/PPDSOM_EventManager_rev1.0/xsl/DistinctPayload.xsl<Line 8, Column 82>: XML-22036: (Error) Cannot convert result tree fragment to NodeSet..
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
-<stack>
<f>com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate#262</f>
<f>com.collaxa.cube.engine.ext.bpel.common.BPELWMPHelper.evalFromValue#339</f>
<f>com.collaxa.cube.engine.ext.bpel.v1.wmp.BPEL1AssignWMP.__executeStatements#137</f>
<f>com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform#158</f>
<f>com.collaxa.cube.engine.CubeEngine.performActivity#2543</f>
<f>com.collaxa.cube.engine.CubeEngine._handleWorkItem#1165</f>
<f>com.collaxa.cube.engine.CubeEngine.handleWorkItem#1071</f>
<f>com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal#73</f>
<f>com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage#220</f>
<f>com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory#328</f>
<f>com.collaxa.cube.engine.CubeEngine.endRequest#4430</f>
<f>com.collaxa.cube.engine.CubeEngine.endRequest#4361</f>
<f>com.collaxa.cube.engine.CubeEngine._createAndInvoke#698</f>
<f>com.collaxa.cube.engine.CubeEngine.createAndInvoke#555</f>
<f>com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke#673</f>
<f>com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke#293</f>
<f>...</f>
</stack>
</exception>



Wednesday, September 17, 2014

SCAC-50012 - Oracle SOA Suite 11g

SCAC-50012 - Oracle SOA Suite 11g

This error will occur most of time compiling the Oracle BPEL component in Oracle SOA Suite with java embedded activity, If there is any issue with the java code this exception will be thrown.

We were facing the SCAC-50012 exception with the following code.

String orderID  =  ((oracle.xml.parser.v2.XMLElement) getVariableData("inputVariable","payload",'/client:process/client:input')).getFirstChild().getNodeValue();
String Title=("OrderID: " +orderID);                                        
setCompositeInstanceTitle(Title);

The actual  issue with the XPATH expression specified within the single quote(copy paste issue), the compilation became successful after converting the single quotes to double quotes.

String orderID  =  ((oracle.xml.parser.v2.XMLElement) getVariableData("inputVariable","payload","/client:process/client:input")).getFirstChild().getNodeValue();
String Title=("OrderID: " +orderID);                                        
setCompositeInstanceTitle(Title);


Monday, September 1, 2014

Dynamic Endpoint Implementation through DB Table –Oracle SOA Suite

Dynamic Endpoint Implementation through DB Table –Oracle SOA Suite

The below document explain the approach to store change the endpoints of the service dynamically in Oracle SOA Suite.



Download Load_Balancer_Probe_SOA-INFRA.pdf


Friday, July 25, 2014

Handling Parallel events through OnEvent event handlers – Oracle SOA Suite

Handling Parallel events through OnEvent event handlers – Oracle SOA Suite

This post will explain, how to handle Parallel events through OnEvent event handlers in Oracle SOA Suite 11g



Download Handling_Parallel_events_ OnEvent_event_handlers_V1.pdf


Wednesday, June 25, 2014

javax.management.MBeanException: The configuration file, deployed-composites.xml, does not contain the composite-revision element

javax.management.MBeanException: The configuration file, deployed-composites.xml, does not contain the composite-revision element

We were receiving the following exception while deploying the composite to the SOA server in Solaris.

The exception was thrown while activating the component.

compositeMgrTask:
     [java] Connecting to: service:jmx:t3://localhost:8004/jndi/weblogic.management.mbeanservers.runtime
     [java] connection initiated
     [java] javax.management.MBeanException: The configuration file, deployed-composites.xml, does not contain the CRMASYNC/zz!5.3.19 composite-revision element.
     [java]     at oracle.as.jmx.framework.standardmbeans.spi.OracleStandardEmitterMBean.doInvoke(OracleStandardEmitterMBean.java:986)

The actual exception is the component was not deployed successfully due to some exception and it is trying to activate the same .

The exception while deploying the component is

[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=/shared/11g/soa_deploy/code/config/scripts/../../LoadBalancerProbe/zz/deploy/sca_zz_rev5.3.19.jar
[deployComposite] Adding sar file -/shared/11g/soa_deploy/code/config/scripts/../../LoadBalancerProbe/zz/deploy/sca_zz_rev5.3.19.jar
[deployComposite] INFO: Creating HTTP connection to host:localhost, port:8004
[deployComposite] INFO: Received HTTP response from the server, response code=500
[deployComposite] ---->response code=500, error:There was an error deploying/undeploying composite on SOA1: Error in reading data from deployer client.: /var/tmp/sar_base_dir_07be0448-8481-4ade-a2e9-253e5a8ba33c/sca_zz_rev5.3.19.jar (No such file or directory).

Based on the error, the deployer could not able to retrieve the jar file from the tmp location.
After analysis, the /var/tmp space is full and the script could not able to write the jar file.
We can use df -kh command to find the space utilization


How to Fix

To resolve the issue login as root user and clear the /var/tmp folder.


Saturday, June 7, 2014

Load Balancing Rules for Oracle SOA Suite Infrastructure

Load Balancing Rules for Oracle SOA Suite Infrastructure

This blog explain the details about the load balancer rule setup for Oracle SOA Suite infrastructure.



Download Load_Balancing_Rules_For_SOA.pdf


Sunday, June 1, 2014

Approach to Resolve the Load balancer routing the Oracle SOA Suite Request to Unavailable SOA-INFRA

Approach to Resolve the Load balancer routing the Oracle SOA Suite Request to Unavailable SOA-INFRA 

The below document explain the approach to resolve the Load balancer routing the Oracle SOA Suite request to unavailable SOA-INFRA.



Download Load_Balancer_Probe_SOA-INFRA.pdf


Friday, May 30, 2014

Oracle BPEL Vs. Oracle BPM

Oracle BPEL Vs. Oracle BPM

For the recent project i was comparing the Oracle BPEL and Oracle BPM and thought of sharing the same.
This document is based on my understanding and views not of oracle views.




Download Oracle_BPEL_Vs._Oracle_BPM.pdf


Friday, May 23, 2014

Component Metrics are Unavailable for the SOA Composite in EM console - Oracle SOA Suite 11g

Component Metrics are Unavailable for the SOA Composite in EM console - Oracle SOA Suite 11g

I was facing a strange issue with Oracle SOA Suite EM console. Whenever opening the SOA Composite the component metrics are not getting displayed and it is shown as Unavailable.


The issue is only happening in Development environment but it is working fine in all the other environments.
I could not able to find any exception related to this issue in any of the log files.

Unfortunately the Component metrics are getting displayed after refreshing the SOA Composite(from right corner of EM page as shown in the above diagram) from EM console




Deployment plan file to replace the Binding Adapter Properties/Attributes – Oracle SOA Suite

Deployment plan file to replace the Binding Adapter Properties/Attributes – Oracle SOA Suite

The deployment plan file will help us to dynamically replace the Oracle SOA Suite Composite properties.

This post explain the steps to replace the Properties/Attributes of the Direct Binding Adapter in Composite.xml. The same steps can be used to replace the Properties/Attributes of all the Binding Adapters.

Generate the Plan file:

The plan file can be generated through JDeveloper or through ANT script.

Generating Plan file through JDeveloper:

Right Click on Composite.xml and click on generate config Plan.


Change the generated plan file contents accordingly to replace the properties and attributes of the composites. 

Add the required attributes to the corresponding Binding and change the values accordingly(by default the attributes will not be added to the corresponding binding in the plan file) and also change the value of required properties accordingly.



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.



Wednesday, May 21, 2014

Re-Deploying the DBAdapter application - Oracle SOA Suite

Re-Deploying the DBAdapter application - Oracle SOA Suite

Accidentally we have deleted the DBAdapter application from the weblogic server console in Oracle SOA Suite and all the database connection factories created was failing.

This post will explain how to Re-Deploy the Resource Adapter - DBAdapter application and recover the connection factories.

The same steps can be followed to recover any Resource Adapter applications

Steps to redeploy Resource Adapter

  • Login to weblogic console
  • Go to deployments
  • Click on Install 
  • Select $Oracle_HOME/soa/connectors as the path and select Dbadapter.rar
reinstall_resource_adapter

  • Click on Next
  • Click on Next and select the target server
reinstall_resource_adapter
          


Sunday, May 4, 2014

SOA-INFRA Application is in unknown Type - Oracle SOA Suite 11g

SOA-INFRA Application is in unknown Type - Oracle SOA Suite 11g:

I was facing a strange issue,the Type of the soa-infra application was unknown but the state and the health of the application is looking fine(Active and OK) in admin console.
Because of this the SOA node is not displayed in the em console.




Tried restarting the server without any luck and also updated(redeployed) the soa-infra application but still the type of the application is unknown.

I could not able to find any exception related to this issue in the log files and also there is no issue related to the database schema's.

Steps to resolve the issue

Delete the soa-infra application from the admin console deployments.
Install the soa-infra application(soa-infra-wls.ear) from the location SOA_HOME\soa\applications as Enterprise Application.


Friday, May 2, 2014

Unable to post the message to MQ through MQ adapter - Oracle SOA Suite

Unable to post the message to MQ through MQ adapter - Oracle SOA Suite

Sometimes we will be getting the below exception while posting the message to MQ  through MQ adapter in Oracle SOA Suite.

"Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'Enqueue' failed due to: A webSphere MQ Error occurrred[while putting the message]. A webSphere MQ Error occurrred[while putting the message]. A webSphere MQ Error occurrred while putting the message in Queue: "EAI_ORD_RPLY_Q ". Please make sure that the Queue is Put enabled, not full, message do not exceeds maximum message length and QueueManger is up and running. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution."


Mainly this exception can occur if there is any issue with the MQ Adapter configuration or issue with the MQ server components.

The following steps can be followed to identify the issue.

MQ Adapter perspective:

Verify the MQSeriesAdapter health and state is fine


Verify the connection factory used in the Adapter is configured in weblogic server



Tuesday, April 29, 2014

Unable to get schema information for source - JDeveloper

Unable to get schema information for source - JDeveloper

I was getting the error "Unable to get schema information for source" while generating the XSL mapper file in the BPEL Transform activity through JDeveloper. The same error was coming while editing the existing mapper file in a transform activity with the same source variable.


But the component is getting deployed successfully and also the flows are working fine without any issue.

After the analysis i found that there is two schema's imported with the same name space into the wsdl and one of the them is used to create the message type for the source variable in the transformation.


Approaches to fix the issue

  •  Make sure the schema's are imported with different name space or create a consolidated schema and import the same 
  • Include the schema's that has the same names instead of importing them into the wsdl.



Monday, April 21, 2014

Oracle SOA Suite – Getting the payload from the Composite instance - Part2

Oracle SOA Suite  – Getting the payload from the Composite instance - Part2

n the previous post Oracle SOA Suite– Getting the payload from the Composite instance - Part1 - Through Java API i explained how to get the Oracle SOA Suite composite instance payload through JAVA API. In the previous approach we are getting the full audit trail of the instance and the required input payloads are retrieved using DOM parser and XPath expressions.For the larger payloads this approach fails to retrieve the payload.

In this post i am explaining the approach to get the Binary payload data from the database by executing the SQL statement and parsing the same to string message.

In Oracle SOA 11g the input payload related to the composite instances(input  to the composite and all the input payload send to the references) are stored in INSTANCE_PAYLOAD(the actual XML payload is kept in XML_DOCUMENT table) table.

By querying the INSTANCE_PAYLOAD, XML_DOCUMENT and COMPOSITE_INSTANCE we can retrieve the binary input payload for a particular composite instance.After receiving the XML payload as binary we can use the java code to transform the same to string format.

import java.io.StringWriter;
import java.sql.*;
import java.util.Hashtable;
import javax.naming.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import oracle.xml.binxml.*;
import oracle.xml.parser.v2.*;
import oracle.xml.scalable.InfosetReader;

public class GetPayload {
    public static Connection getConnection() throws Exception {
        Context ctx = null;
        Hashtable ht = new Hashtable();
        ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
        ht.put(Context.PROVIDER_URL, "t3://localhost:8000");
        ctx = new InitialContext(ht);
        javax.sql.DataSource ds =(javax.sql.DataSource)ctx.lookup("jdbc/SOADataSource");
        return ds.getConnection();
    }

    public static String getPayload() {
        Statement stmt = null;
        Connection connection = null;
        ResultSet rs = null;
        String query =
            "select xmldoc.document DOC " + "from xml_document xmldoc,instance_payload inspay,composite_instance cmpins " +
            "where xmldoc.document_id = inspay.payload_key " +
            "and inspay.instance_id = cmpins.id " +
            "and inspay.instance_type='composite' " +
            "and xmldoc.DOCUMENT_TYPE = 2 " +
            "and inspay.instance_id = 7648669";      
   
        String payload = "";
        XMLDocument doc = null;
        try {
            connection = getConnection();
            stmt = connection.createStatement();
            rs = stmt.executeQuery(query);
            XMLDOMImplementation xmldomimpl = new XMLDOMImplementation();
            while (rs.next()) {                    
                BinXMLProcessor xmlprocessor =BinXMLProcessorFactory.createProcessor();
                BinXMLStream xmlstream =xmlprocessor.createBinXMLStream(rs.getBlob("DOC"));
                BinXMLDecoder xmldecoder = xmlstream.getDecoder();
                InfosetReader xmlreader = xmldecoder.getReader();
                doc = (XMLDocument)xmldomimpl.createDocument(xmlreader);
                TransformerFactory tf = TransformerFactory.newInstance();
                Transformer transformer;
                transformer = tf.newTransformer();
                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,"yes");
                StringWriter writer = new StringWriter();
                transformer.transform(new DOMSource(doc),new StreamResult(writer));
                payload =writer.getBuffer().toString().replaceAll("<", "&lt;").replaceAll(">","&gt;");      
           }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (rs != null)
                    rs.close();
                if (stmt != null)
                    stmt.close();
                if (connection != null)
                    connection.close();
            } catch (Exception e) {

            }
        }
        return payload;

    }
}

The same query will not work in Oracle SOA Suite 12c to retrieve the payload as some of the tables are decommissioned in Oracle SOA Suite 12c e.g. INSTANCE_PAYLOAD and COMPOSITE_INSTANCE

If the process is asynchronous then the input payload is stored into the XML_DOCUMENT, the below query can be used to retrieve the BLOB data from XML_DOCUMENT table(modify the query in java code to parse the BLOB data)

SELECT XMLDOC.DOCUMENT DOC FROM XML_DOCUMENT XMLDOC , DLV_MESSAGE DLV,DOCUMENT_DLV_MSG_REF DLVREF WHERE DLVREF.MESSAGE_GUID=DLV.MESSAGE_GUID AND MLDOC.DOCUMENT_ID=DLVREF.DOCUMENT_ID AND DLV.CIKEY=10048;

If the payload size of the synchronous process is more than the threshold the input payload is stored in AUDIT_DETAILS table as BLOB data, the following query can be used to retrieve the blob data

SELECT BIN FROM AUDIT_DETAILS WHERE CIKEY=10102

Refer the following post with more details on retrieving the data from AUDIT_DETAILS -https://www.albinsblog.com/2014/04/getting-xml-form-auditdetails-table.html

Use the xmlparserv2.jar file from the following location $MIDDLE_HOME/oracle_common/modules/oracle.xdk_11.1.0(the xmlparserv2.jar downloaded from Google may not have some of the class files included)


Enable the ClusterConstraints in weblogic server - Oracle SOA Suite 11g

Enable the ClusterConstraints in weblogic server - Oracle SOA Suite 11g :

It is possible to change WebLogic Server’s default deployment behavior for clusters by setting the ClusterConstraintsEnabled option when starting the WebLogic Server domain. The ClusterConstraintsEnabled option enforces strict deployment for all servers configured in a cluster. A deployment to a cluster succeeds only if all members of the cluster are reachable and all can deploy the specified files.

This post will explain the different approaches to change Cluster Constraint.

Through EM console:

Login to EM console 
Right click on soa-infra-->Admiistration-->System MBean browser
Enter com.bea:Name=SOACoreDomain,Type=Domain in the MBean browser filter and click ok


Change the ClusterConstraintEnabled attribute accordingly and click on Apply button