Using Result caching in OSB

Result caching is a OSB feature to cache business service response for a given request.

OSB uses Coherence to support caching, if we enable caching g in correct way then it will increases applications performance.

When cache is enabled , if a request comes to the business service then it will first check in the cache and returns the output to the caller otherwise it will call the target service and get the output and and return it to the caller and store it in cache again.

The result caching mechanism that Oracle Service Bus uses is Oracle Coherence (Enterprise Edition), which is included with Oracle WebLogic Server.

Result caching works only with request/response operations.

For setting up the Result caching , open the business service and go to “Message Handling Configuration”

Expand Advanced Settings and in Result Caching select Supported.


Set the Cache Token Expression: fn:data($body/tar:result/custinfo)


This will use the customer info as our unique token for the cache entry. Also, set the Expiration Time for 10 seconds.

Click Last >> and Save to confirm the Business Service modifications. You can activate the change session.

Now click Launch Test Console for CustInfoPS proxy service and let’s test our configurations.

For first time you execute the service, it will take nine seconds to execute and it will populate our cache entry. Click Back in the Test Console and try to execute again; it will show the results immediately, directly from a cache entry in the embedded Oracle Coherence Server running within Oracle Service Bus.


Using the transport headers to read the incoming filename in OSB

I have a scenario where i am reading a file from ftp server in OSB using Ftp protocol and sending it to target system.

As per my requirement , i have to send the file name to target system with the same name that i have received from source system.

For achieving this i have to use file name property.

Open the proxy service and go to route node and in Request actions add actions as “Set Transport Headers”.

In the “Transport Headers” name , select the name as “jca.ftp.FileName” and open the action and set it as “$inbound/ctx:transport/ctx:request/tp:headers/ftp:fileName


How to replace jca adapter properties using configuration plan in SOA Suite

In migration of our projects from one environment to other environment , some times we need to change certain properties according to the new environment like file location, jca end point location etc .

My jca file is looking like below , here i am reading data from one ftp location and want to change this value using config plan.


Now to replace the PhysicalDirectory property inside JCA file , we have go to wsdl and schema of the config plan and replace with new environment values.


java.lang.NoClassDefFoundError in Oracle SOA Suite 12C

Issue –> We will face these kind of errors when we are using custom java class in our SOA process.

Error –>  java.lang.NoClassDefFoundErrorcomcollaxacubeenginefpBPELFaultRecoveryContextImpl

Cause –> If you have not placed the jar files in correct location, you will get this error.

Solution –> You have to place the custom jar files in the below location.


Copy your custom jar file here and Restart your server.

Key mismatch error with sFTP protocol in OSB

Issue –> If you are using sFTP protocol in OSB proxy then you will get these kind of errors.

Error –> 

Error encountered while polling the resource for the service endpoint ProxyService$XXXXXX$Services$XXXXXXXXX: Key Mismatch for host XXXXXX.XXXX.XXXXXX, Key Mismatch for host XXXXXXXX.XXXX.XXXXX,

Cause –> If your target server public key has ssh-rsa and you have used ssh-dss in your known_Hosts file  , you will see this error.

Solution –> For resolving these errors we have to verify the public key which is used in known_hosts file and update it according to the target server’s public key.

How to Set up personal FTP server on windows machine and use it in Oracle SOA Suite FTP Adapter

In this post we will see how to set up your own FTP server and configure it in the FTP adapter in Oracle SOA Suite.

Here I will take you through the steps to setup a folder in windows machine as an FTP repository using FileZilla.

To start working on this POC , first we have to download the FileZilla Server .

Install the filezilla server with default settings and start the FileZilla server.

Once you start the Filezilla server , it will open the home page specify the localhost ip address as the server address and then click on OK. Once done it will open FileZilla server server main screen .

Now go to Users from Edit menu . Click on Add to create a New user.

By default it creates user with no password, but we can enable the password option and enter a password of your choice.


Now we have to specify the shared folders for this user , Go to shared folders and click on ADD in shared folders to specify the folder.


Once after selecting the folder ,provide a alias name to the folder , provide the permissions to the folder and click on OK.


Now you are done with setting up FTP server and user on your local machine , try connecting to the server with FileZilla Client and place some file in to your FTP server directory .


Configuring FTP adapter in SOA Suite

Login to your weblogic console and go to deployments and open FTP adapter .

Navigation## Deployments -> FTP adapter -> Configuration -> Outbound Connection pool


Create a new connection pool to access the newly created FTP server and provide the jndi name and click on Finish.


Open the newly created connection, provide the host (your ftp server ip address), server type as win, user and password.


Now we will create a BPEL process which will use this jndi connection for connecting to FTP server and read the files.

My BPEL process looks like this .


That’s it , deploy the composite to SOA server and test the results.

Fault Notification Alets in SOA Suite 12C

One of the new features of oracle SOA suite 12c is to send the notification rules that will send automatic alerts when anything goes wrong.

The notification alerts scheduled based on the timeframe that we define in the server.

Before defining the notification rules we have to set up the Scheduler service to schedule the notifications.

STEP 1–>

Define Schedule in EM ##

We will create a schedule in ESS App.

Login to Enterprise Manager , go to SOA-Infra and define the schedule.


Click on Create to define a new schedule.


Enter the name , display name ,package, Description, Frequency,Timezone, Start Date and click on OK.


Error Notification Rules ##

Go to SOA-Infra and click on “Error Notification Rules”,


Click on Create to create notification rule.


Enter the Name ,Rule Description and Schedule that we created above.


Condition that the notification rule considers is the amount of time, in hours, to look for errors.

When the criteria in the ‘If’ clause is met, the action can include sending an email, IM, and/or SMS.


Check the box “Send Alerts to Dashboard” and enter the email address and set via as “Email(To)”.


Now, the alert is visible within the dashboard: