Friday, September 21, 2012

CodeCache is full. Compiler has been disabled - Oracle SOA Suite 11g

CodeCache is full. Compiler has been disabled - Oracle SOA Suite 11g:

Frequently we used to see the below message in our log file.

Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=

The code cache is a memory area separate from the JVM heap that is used for compilation and storage of native code.This is where the JIT compiled methods are kept.

The JIT compilier will be disabled when the code cache is full. Once the JIT compiler is switched off due to the Code Cache being full, it does not switch back on.

This will affect the performance of the server in high extend.

We can try to increase the default code cache size to resolve this issue.

Steps to increase the code cache size(we have increased to 64m)

  • Login into Admin Server node
  • Open $DOMAIN_HOME/bin/setSOADomainEnv.sh file 
  • Edit the "DEFAULT_MEM_ARGS" to add the following parameters at the end of line before double quotes: -XX:InitialCodeCacheSize=64m -XX:ReservedCodeCacheSize=64m
  • Login into admin console and go to all the servers server start up properties tab and edit the section to add the following parameters at the end of the line  -XX:InitialCodeCacheSize=64m -XX:ReservedCodeCacheSize=64m

  • Restart all servers (Admin and Managed)

Monday, September 17, 2012

Import/Publish the services from Oracle Service Bus to Service Registry

Import/Publish the services from Oracle Service Bus to Service Registry:


The OSB services can be published to OSR; the service consumer can consume the services from the OSR also OSB can import and consume the services from OSR.

This blog provides the step to configure and import/publish the services to OSR.

Configure the OSR:

  • Login to OSB console
  • Select System Administration and click on UDDI Registries and click Add Registry
  •  Enter the Oracle Service Registry details as shown below and click on save


Storing the Cross reference data to a custom table - Oracle SOA Suite

Storing the Cross reference data to a custom table - Oracle SOA Suite:


Cross references enable you to dynamically map values for equivalent entities created in different applications. Cross references are stored in the form of tables.

Oracle SOA Suite 11g provides the new feature to store the cross reference data to a custom table instead of storing to a standard XREF_DATA table, this feature enable as to manage the data properly.

Different tables can be created based on the data like order data can be stored in XREF_ORDER table and account data can be stored in the XREF_ACCOUNT. This will improve the performance of populating and looking up the data whenever the volume of the data is more.
  • Right-click the project and select New.
  • Select SOA Tier from the Categories section, and then select Transformations.
  • Select Cross Reference (XREF) from the Items section.

The screen is different in Oracle SOA Suite 12c to create the custom XREF.

oracle_soa_12c_custom_xref



  • Click OK.
  • In the File Name field, specify the name of the cross reference file.
  • In the End System fields, enter the end system names.


  • Click OK.

Saturday, September 15, 2012

Identifying the weblogic server version installed

How to identify the weblogic server version installed

1. cd %DOMAIN_HOME%/bin
2. Execute setDomainEnv.cmd
3.Execute java weblogic.version -verbose



The weblogic server version is 10.3.5.0

Friday, September 14, 2012

Difference between BPEL 1.1 and BPEL 2.0 – Oracle SOA Suite

Difference between BPEL 1.1 and BPEL 2.0 – Oracle SOA Suite 11g:

Oracle SOA Suite 11g and Oracle SOA Suite 12c provides the option to use both the BPEL 1.1 and BPEL 2.0 versions.
If we are migrating the BPEL process from 10g to 11g version the BPEL 1.1 version will be used in the migrated process but new processes can be developed in BPEL 2.0.


New Activities 2.0

  • <forEach> activity to repeat the set of activities . Replace the FlowN activity in BPEL 1.1 version.
  • <repeatUntil> - Use this activity if the body of an activity must be performed at least once. The XPath expression condition in the repeatUntil activity is evaluated after the body of the activity completes.
  •  <if>-<elseif>-<else> - Replaces the switch activity in BPEL 2.0 - This activity enables you to define conditional behavior for specific activities to decide between two or more branches. Only one activity is selected for execution from a set of branches.
  • Changed <terminate> to <exit>
  • <compensateScope>  - to compensate the specified child scope
  • A <rethrow> activity has been added to fault handlers this activity enables you to rethrow a fault originally captured by the immediately enclosing fault handler.

weblogic.socket.MaxMessageSizeExceededException appearing when Managed Server Attempting To Send larger message to Admin Server.

weblogic.socket.MaxMessageSizeExceededException appearing when Managed Server Attempting To Send larger message to Admin Server.


We used to get the following exception in the weblogic managed servers log file frequently

 ####<Mar 20, 2012 12:22:47 PM EST> <Error> <Socket> <ifappc105p> <AdminServer> <ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'> <> <> <a33374ea6b7bab0f:17f6d3b7:1343f18f4ea:-8000-000000000000008a> <1323912167710> <BEA-000403> <IOException occurred on socket: Socket[addr=ifappc105p-vip1/172.105.200.105,port=8000,localport=55103]
weblogic.socket.MaxMessageSizeExceededException: Incoming message of size: '10000480' bytes exceeds the configured maximum of: '10000000' bytes for protocol: 't3'.
weblogic.socket.MaxMessageSizeExceededException: Incoming message of size: '10000480' bytes exceeds the configured maximum of: '10000000' bytes for protocol: 't3'
at weblogic.socket.BaseAbstractMuxableSocket.incrementBufferOffset(BaseAbstractMuxableSocket.java:174)
at weblogic.rjvm.t3.MuxableSocketT3.incrementBufferOffset(MuxableSocketT3.java:351)


The reason is the weblogic managed server tries to send the message size more than 10 MB and failing with the following exception. It is observed that every single time this message is observed in the logs, it is followed by the respective managed server who is sending that message, losing connectivity with the admin server.

The root cause is the RJVM messages used to get piled up due to default watches trap events that’s comes installed and it used to grow in larger size causing the broken communication between managed servers and AdminServer

The solution to resolve this is to disable the default WLDF configured in the server.

Steps to disable the default WLDF configured in the server

  • Login into admin console with weblogic user.
  • Click Lock & Edit
  • Expand Diagnostics tab 

  • Click on Diagnostic Modules

Friday, September 7, 2012

Java code to retrieve the node data from a XML string received from a web URL

Java code to retrieve the node data from a XML string received from a web URL:

Code:

import java.io.*;
import java.net.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;

public class HttpRequestCode {
    public HttpRequestCode() {
        super();
    }

    public static void getResponse(String city) {

        HttpURLConnection connection = null;
       
        String url="http://feeds.feedburner.com/burrp/"+city+"-events/weekend?format=xml";

        try {
            connection =
                    (HttpURLConnection)new URL(url).openConnection();
            connection.setRequestProperty("content-type",
                                          "text/xml;charset=utf-8");
            connection.setRequestMethod("GET");
            connection.setDoInput(true);
            connection.setDoOutput(true);

            InputStream is = connection.getInputStream();
            BufferedReader rd = new BufferedReader(new InputStreamReader(is));

            String line;
            StringBuffer response = new StringBuffer();
            while ((line = rd.readLine()) != null) {
                response.append(line);
                response.append('\r');
            }
           
            rd.close();
           
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setNamespaceAware(false);
            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
            InputStream is1 = new ByteArrayInputStream(response.toString().getBytes());
            Document doc = docBuilder.parse (is1);
            doc.getDocumentElement ().normalize ();
            NodeList listOfChannels = doc.getElementsByTagName("description");
            String description=listOfChannels.item(1).getFirstChild().getNodeValue();
            System.out.println(description);

        } catch (FileNotFoundException e) {
           
        }
        catch (Exception e) {
            e.printStackTrace();
        } finally {

        }
    }

    public static void main(String[] args) {

        getResponse("Chennai");

    }
}