Monday, April 14, 2014

Backing up the MDS Repository Artifacts - Oracle SOA Suite 11g

Backing up the MDS Repository Artifacts - Oracle SOA Suite

In Oracle SOA Suite 11g and Oracle SOA Suite 12c , all the common artifacts , the deployed composites and the common configurations are stored in the MDS database schema. Sometimes there is a possibility of MDS schema getting corrupted (the best example is the composites getting corrupted frequently)those scenario we will not be able to bring up the soa-infra and also we may loose all the deployments.

Backing up the MDS artifacts is the the solution for these kind of issues.

In this post i will be explaining some of the different options to back up the MDS artifacts.

The best approach is do a full back up of MDS repository schema using database backup utilities(dbexp).The backup can be restored if there is any issue with the MDS schema.

EM console - MDS configuration Page :

Right click on soa-infra and click on Administration and MDS Configuration.
Click Export on MDS Configuration page.


This will export the MDS artifacts to local machine as zip file.




Wednesday, April 9, 2014

BINDING.JCA-11822 JPublisher error occurred in JDeveloper

BINDING.JCA-11822 JPublisher error occurred in JDeveloper

Sometimes you may receive the following exception in DBAdapter wizard while regenerating the adapter configuration for the option "Call a Stored Procedure or Function through JDeveloper in Oracle SOA Suite 11g".

BINDING.JCA-11822
JPublisher error occurred.
An error occurred while running JPublisher.
An error occurred when JPublisher was invoked: ERROR: missing method.
Analyze the error and correct if possible. Contact oracle support if error is not fixable.

at oracle.tip.adapter.db.sp.xsd.oracle.JPublisher.findWrapperProcedureName(JPublisher.java:222)
at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.ProcedureObject.setWrapperInfo(ProcedureObject.java:256)
at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.oracle.DBAdapterStoredProcPage.loadProcedureBrowseDialog(DBAdapterStoredProcPage.java:213)
at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.AbstractStoredProcPage.browseProcButton_actionPerformed(AbstractStoredProcPage.java:369)
at oracle.tip.tools.ide.adapters.designtime.adapter.db.sp.AbstractStoredProcPage$1.actionPerformed(AbstractStoredProcPage.java:197)


The exception will be thrown while browsing the procedure in the wizard and the procedure has one of the following RECORD, TABLE, or BOOLEAN as input/output type.



Tuesday, April 8, 2014

Dynamic where condition in DB Adapter - Query By Example

Dynamic where condition in DB Adapter - Query By Example

Sometime we may have the scenario to query the data in a table with dynamic where condition through DB Adapter in Oracle SOA Suite 11g.
The Query by Example option in the DB Adapter provides the option to construct the where condition dynamically based on the input data provided.Query-by-example uses the AND operator to tie the input attributes together to form the where condition.



For example when we are defining the Query By Example option for the Employee table the adapter will consider the Employee object as input and returns the Employee Object list.



Saturday, April 5, 2014

Oracle Cloud Adapter for Salesforce.com - Oracle SOA Suite

Oracle Cloud Adapter for Salesforce.com - Oracle SOA Suite

Oracle introduces the Cloud Adapter for Salesforce.com as the extension of Oracle SOA Suite and this is certified only with the version 11.1.1.7.0.This will help the customers to integrate with the the Salesforce.com cloud easily.

When integrating the Salesforce.com via web service integration the main concerns are the Security management and the Session management.The web service integration requires more manual configurations, we have to connect to the Enterprise login with the authentication details to get the token values then using the token we have to do a API call to perform the operations in Salesforce.Oracle Cloud Adapter for Salesforce.com provides Intelligent Session management and security management and also provides a GUI to perform all the configurations.





Thursday, April 3, 2014

Getting the Messaging Bridge Runtime Details through Java - Weblogic

Getting the Messaging Bridge Runtime Details through Java - Weblogic

The below java jmx code will help us to get the run time details of the messaging bridge in weblogic server.

import java.util.Hashtable;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;

public class GetMessageBridgeStatus {
    private static MBeanServerConnection connection;
    private static JMXConnector connector;
    public static void  getMessageBridgeStatus() {
        try
        {
                getRuntimeMBeanServerConnection();
                String son = "com.bea:ServerRuntime=AdminServer,Name=Bridge-0,Location=AdminServer,Type=MessagingBridgeRuntime";
                ObjectName service = new ObjectName(son);
                String status = connection.getAttribute(service,"State").toString();
                System.out.println("Status: "+status);
         
                String description = connection.getAttribute(service,"Description").toString();
                System.out.println("Descrption: "+description);
       
        }catch(Exception e) {
           e.printStackTrace();
        }
         
    }
    public static void getRuntimeMBeanServerConnection()  throws Exception{
          String jndiroot = "/jndi/";
          String mserver = "weblogic.management.mbeanservers.domainruntime";
          JMXServiceURL serviceURL = new JMXServiceURL("t3", "localhost", 8000,jndiroot + mserver);
          Hashtable h = new Hashtable();
          h.put(Context.SECURITY_PRINCIPAL, "weblogic");
          h.put(Context.SECURITY_CREDENTIALS, "welcome1");
          h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
          connector = JMXConnectorFactory.connect(serviceURL, h);
          connection = connector.getMBeanServerConnection();
    }
 
    public static void main(String[] args) {
        getMessageBridgeStatus();
    }
 
}


Include the wlfullclient.jar file in the class path(Refer the following post https://www.albinsblog.com/2012/07/creating-wlfullclientjar-weblogic.html to generate the wlfullclient.jar )


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.