Tuesday, July 16, 2013

WSO2 Storage Server (WSO2 SS) 1.0.3 Released!

WSO2 Storage Server (WSO2 SS) team is pleased to announce the release of its version 1.0.3.

WSO2 SS conveniently delivers multi-tenant structured and unstructured data storage provisioning capabilities to development projects. Development teams can rapidly provision and access secure and scalable relational, NoSQL Columnar, and Hadoop Distributed File System (HDFS) repositories using a consistent management process. The WSO2 Storage Server management console allows teams to create databases, add users, and provision access based on the web application’s database policies. It is distributed under the Apache Software License v2.0

WSO2 SS is developed on top of the revolutionary WSO2 Carbon platform (Middleware a' la carte), an OSGi based framework that provides seamless modularity to your SOA via componentization. This release also contains many new features and a range of optional components (add-ons) that can be installed to customize the behavior of the SS. Further, any existing features of the SS which are not required to your environment can be easily removed using the underlying provisioning framework of Carbon. In brief, WSO2 SS can be fully customized and tailored to meet your exact Storage and SOA needs.

You can download this distribution from here and give it a try.

How to Run

  1. Extract the downloaded zip
  2. Go to the bin directory in the extracted folder
  3. Run the wso2server.sh or wso2server.bat as appropriate
  4. Point your browser to the URL https://localhost:9443/carbon
  5. Use "admin", "admin" as the username and password to login as an admin
  6. If you need to start the OSGi console with the server use the property -DosgiConsole when starting the server. The INSTALL.txt file found on the installation directory will give you a comprehensive set of options and properties that can be passed into the startup script

Feature Catalog of WSO2 Storage Server 1.0.3

  • Relational Storage Service.
  • Multi-tenant Column Store Service based on Apache Cassandra.
  • Cassandra Explorer.
  • Cassandra Cluster monitor.
  • Multi-tenant Hadoop Distribution File System Service.
  • Hadoop CLI.

Bug Fixes

All bug fixes done within the course of this particular release can be found in the following location:


All feature enhancements done within the course of this particular release can be found in the following location:

Known Issues

All outstanding issues reported upon WSO2 Storage Server 1.0.3 can be found in the following location:

How You Can Contribute

Mailing Lists

Join our mailing list and correspond with the developers directly.

Reporting Issues

We encourage you to report issues, documentation faults and feature requests regarding WSO2 SS through the public Storage Server JIRA. You can use the Carbon JIRA to report any issues related to the Carbon base framework or associated Carbon components.


 Discussion Forums

Alternatively, questions could be raised in stackoverflow.com.



We are committed to ensuring that your enterprise middleware deployment is completely supported from evaluation to production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.
For more details and to take advantage of this unique opportunity please visit http://wso2.com/support.
For more information about WSO2 SS please see http://wso2.com/products/storage-server.

-- WSO2 Storage Server Team --

Thursday, July 5, 2012

Solved - Weird exceptions while starting Intellij IDEA

Intellij IDEA has been my favourite IDE for nearly the past 4 years. The amazing set of user-friendly options and functionalities offered to the developers by the IDE have clearly gotten me attracted towards it.

However, recently when I tried to boot up my IDEA instance it started throwing a flurry of exceptions at the my command line console out of the blue. Although the server was started, most of the options such as attaching dependencies to my projects, etc were not functioning properly. The following log depicts part of the error logged at the server startup.

Though I tried re-installing the distribution and various other options I couldn't really get it to work. Finally, I backed up the "config" and "system" directories that contain your IDEA configuration settings and data cache residing in "~/.IntelliJIdea90/" directory and deleted them from the file system. Then restarted the IDEA instance and that seemed to have fixed all the aforementioned issues!

Note : This may result in you losing all the metadata stored in the data cache resides in the "~/.IntelliJIdea90/system" folder and your configuration settings stored in the "~/.IntelliJIdea90/config" directory. You also will have to re-install your license if you're using enterprise edition of Intellij IDEA.

Thursday, May 3, 2012

Query UDTs(User Defined Types) with WSO2 Data Service Server

In this brief tutorial I ll be guiding you through the process of developing a simple dataservice which is capable of retrieving an Oracle UDT (User Defined Type) from a database using WSO2 Data Services Server.

First, login to your preferred Oracle database via your favourite SQL client tool or the sqlplus command line utility and run the following script. This will create necessary UDT structures, a table to store the UDT type as well as some sample data which will later be queried via dataservice.

CREATE OR REPLACE TYPE address_t AS OBJECT(num NUMBER, street VARCHAR2(100), city VARCHAR2(100), STATE VARCHAR2(100), country VARCHAR2(100));
CREATE TABLE customer_tbl (customer_id NUMBER, customer_name VARCHAR2(100), customer_address ADDRESS_T);
INSERT INTO customer_tbl
        address_t(25, 'flower road', 'Brooklyn', 'Western London', 'United Kingdom'));

INSERT INTO customer_tbl
        address_t(25, 'flower road', 'El Camino Real', 'Palo Alto', 'California'));

CREATE OR REPLACE PROCEDURE getCustomer(cust OUT customer_t) IS BEGIN cust := customer_t(1, 'prabath'); END;

Next, download the latest version of WSO2 Data Service Pack from here and extract it to a proper location in your file system. Let's call it DSS_HOME. Then copy the Oracle JDBC jar downloaded from here to DSS_HOME/repository/components/lib directory.

Now we're done with preparing the surroundings for creating the dataservice.

Let's now start the WSO2 Data Service Server and start building up the dataservice. (You can find more detailed information about developing a simple dataservice from here.). Depicted below is a sample dataservice descriptor file (.dbs) that carries a dataservice queries for retrieving and inserting UDT values in customer_address column of the customer_tbl table.

<?xml version="1.0" encoding="UTF-8"?>
<data name="UDTSample">
   <config id="default">
      <property name="org.wso2.ws.dataservice.driver">oracle.jdbc.driver.OracleDriver</property>
      <property name="org.wso2.ws.dataservice.protocol">jdbc:oracle:thin:@localhost:1521:XE</property>
      <property name="org.wso2.ws.dataservice.user">djpro</property>
      <property name="org.wso2.ws.dataservice.password">admin</property>
   <query id="q1" useConfig="default">
      <sql>SELECT customer_id, customer_name, customer_address FROM customer_tbl</sql>
      <result element="Entries" rowName="Entry">
         <element name="ID" column="customer_id" xsdType="xs:integer" />
         <element name="Name" column="customer_name" xsdType="xs:string" />
         <element name="Number" column="customer_address[0]" xsdType="xs:integer" />
         <element name="Street" column="customer_address[1]" xsdType="xs:string" />
         <element name="City" column="customer_address[2]" xsdType="xs:string" />
         <element name="State" column="customer_address[3]" xsdType="xs:string" />
         <element name="Country" column="customer_address[4]" xsdType="xs:string" />
   <query id="q2" useConfig="default">
      <sql>INSERT INTO customer_tbl VALUES(?,?,address_t(?,?,?,?,?))</sql>
      <param name="ID" sqlType="INTEGER" />
      <param name="Name" sqlType="STRING" />
      <param name="Number" sqlType="INTEGER" />
      <param name="Street" sqlType="STRING" />
      <param name="City" sqlType="STRING" />
      <param name="State" sqlType="STRING" structType="null" />
      <param name="Country" sqlType="STRING" />
   <query id="q3" useConfig="default">
      <sql>call getCustomer(?)</sql>
      <result element="customers" rowName="customer">
         <element name="id" column="cust[0]" xsdType="xs:integer" />
         <element name="name" column="cust[1]" xsdType="xs:string" />
      <param name="cust" sqlType="STRUCT" type="OUT" structType="CUSTOMER_T" />
   <operation name="op1">
      <call-query href="q1" />
   <operation name="op2">
      <call-query href="q2">
         <with-param name="ID" query-param="ID" />
         <with-param name="Name" query-param="Name" />
         <with-param name="Number" query-param="Number" />
         <with-param name="Street" query-param="Street" />
         <with-param name="City" query-param="City" />
         <with-param name="State" query-param="State" />
         <with-param name="Country" query-param="Country" />
   <operation name="op3">
      <call-query href="q3" />
If you carefully look at the input mappings defined for the dataservice query "q1", the UDT attributes that are being retrieved are specified in the format of "database_column_name[UDT_attribute_index]"

Once you deploy the "UDTSample" dataservice in the WSO2 Data Services Server it will be displayed under the service list. 

You can then click on the Tryit client functionality using which you will be able to test the data service operations that manipulate the aforementioned UDT structures. 

I trust this simple tutorial helps you understand the basics of manipulating UDTs with WSO2 Data Services Server. Further, I'm hoping to come up with more complex samples explaining scenarios such as how to retrieve UDTs as OUT parameters of stored procedures, how to query SQL Arrays via stored procedures/ordinary SQL queries/Ref cursors, etc soon.

Retrieve the classes implementing a particular interface programmatically in Java

I recently had a requirement to retrieve all the classes that implement a particular service interface programmatically in Java. While searching for some way to get my requirement fulfilled I came across the class ServceLoader exposed by java.util.* package as a part of Java 1.6 APIs. 

Shown below is a sample scenario where you can use the aforementioned class effectively to retrieve the service providers (typically implementer classes of an interface or an abstract class) list that implement a particular service (typically a well known interface or abstract classs).

Assume I want to register the set of implementer classes of the java.sql.Driver interface that exists in my current thread's classloader explicitely. You can accomplish that task in the following manner.

If a particular service provider implements a service interface then the jar containing those implementer classes carries the provider-configuration file in the resource directory similar to the following format.

Eg: META-INF/services/java.sql.Driver
ClassLoader callerCL = Thread.currentThread().getContextClassLoader();
ServiceLoader<Driver> servLoader = ServiceLoader.load(java.sql.Driver.class, callerCL);
for (Driver driver : servLoader) {
   String driverName = driver.getClass().getName();
   try {
   } catch (ClassNotFoundException e) {
       log.error("Unable to registery driver class '" + driverName + "'", e);

Tuesday, October 11, 2011

Install Windows with a bootable live USB drive configured in Linux.

Once I came across this requirement where I had to install Windows in one of my computers without having to use any CD/DVD.(since my DVD drive was stolen by one of my colleagues. :P). So the idea was to create a bootable live USB drive to get my task done. Oh Crap!! I was using Ubuntu in my other computer so I had to find a way to configure my thumb drive to be able to use it in the installation process. That's where Unetbootin (an awesome piece of software by which we could easily configure a USB drive as a live bootable device) came for the rescue. 

This blog post intends to walk you through the process of installing UNetbootin, configuring your USB drive using Unetbootin and finally using it to install Windows in your machine.

Ubuntu 10.04 Lucid Linux
Unetbootin 408-1

Note: Please note that the version of the Unetbootin mentioned above is not the latest one. But I prefer you use this particular version as I was confronted with a couple of issues with the latest version (Unetbootin-linux-555) such as my USB drive was not listed under the mounted USB drive list, etc.

Let's get Unetbootin running first..

There are obviously two methods that you could use to get Unetbootin running on Ubuntu. 
1. Use the executable downloaded from their official site.
2. Use apt-get to install it and select "Applications > System Tools > Unetbootin"

Let's first have a look at how you could install it with the most simplest method (involving lesser number of steps ;)), which is the first one out of the aforementioned options.

Use the executable.
Step 1: 
Download the executable from here.

Step 2: 
If the executable does not possess the necessary permissions to be executed, modify the permissions of it by running "$chmod 755 unetbootin-xxx". ("xxx" refers to the version)

Step 3: 
Then run the executable which will pop up its UI.

Install with apt-get and select the relevant item from the main menu.
Step 1: 
Go to then terminal and execute the following batch of commands which will install Unetbootin at the completion of its successful execution.

sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin

Step 2: 
Then go to "Applications > System Tools" and select Unetbootin from the menu.

With that you're now basically done with installing Unetbootin in your machine.

Next, configure the USB drive as a live bootable device to install Windows with an ISO image of WindowsXP...

As depicted in the above image,

Step 1: 
Select "Disk image" option which can be located at the latter half of the UI and select the path to your ISO image.

Step 2: 
Then tick the "Select All Devices" option to list out all the available devices that are already mounted.

Step 3: 
Next, select the "Type" of the drive as "USB" and further select the mount point of your USB drive from the drop down box named "Drive".

Step 4: 
Finally, click on the "OK" button which will take you to the completion of the process.

Hurray!!! We're done with configuring the the USB. 

Finally, install Windows with the USB drive configured in the previous step...

Step 1: 
Plug in your USB drive to the machine that you need to install Windows into. 

Step 2: 
Make sure the boot order is properly configured for the machine to get boot up using the USB device.

Step 3: 
Follow the usual process of installing Windows.

Step 4: 
Ding dong! Now it's time to play with Windows.. ;)

Friday, September 23, 2011

Export registry contents of one carbon node to another using WSO2 Greg check-in client


WSO2 governance registry can be introduced as a product which provides you with a rich set of functionalities to accomplish your registry and repository related needs. Including WSO2 Greg, each and every carbon based product uses the registry kernel which offers basic registry and repository functionalities to store data and configurations associated with each product. For example, it's being often used to store various resource entities such as carbon datasource configurations, WSDLs, Schemas, endpoints, etc under various environments such as standalone environments, clustered environments etc in numerous  occasions.

Delving further into the functionality of the registry kernel, its storage space can be divided into three main partitions namely,
1. Local registry
2. Configuration registry
3. Governance registry

Out of those three aforementioned types of partitions, local registry is often used to store configurations and data that are local to a particular instance of a carbon product. Also this particular registry space is not shared among any other nodes by its nature. In contrast, the configuration registry can be used to share configurations common to multiple nodes of the same product. For example, if you consider a cluster of WSO2 Data Service Server nodes storing dbs files or any other configuration data in their configuration registry space, those data can be shared across all the nodes in the WSO2 Data Service Server cluster. Unlike both local registry and configuration registry, the governance registry can be used to store configurations and data that need to be shared across many nodes of different carbon products.

Back to the topic..

Having had a brief, yet comprehensive overview about the registry kernal, let's get ourselves back to the main subject of this blog post which is exporting registry contents of one carbon node to another using the check-in client introduced by WSO2 Governance Registry.

As explained earlier, you may come across this requirement of migrating or exporting data and configurations stored in the registry of one carbon product to another. One way of achieving this would be to get a database dump and restore it in the carbon node that exists in the other end of the migration process which is a pretty much tedious task. To address this problem, WSO2 Governance Registry introduces this mechanism called registry check-in client which provides you with means to get a registry dump and restore it in another  carbon node easily. Although this mechanism is only shipped with WSO2 Governance Registry by default, it's quite possible to adopt it into other carbon products as well. The rest of the content of this blog post would bring you the steps that are necessary in making use of the registry check-in client in other carbon products (For example, WSO2 Data Services Server).

Step 1:
Download WSO2 Governance Registry distribution and locate the checkin-client.sh in its GREG_HOME/bin directory.

Step 2:
Change the working directory to DSS_HOME/bin and place the checkin-client.sh there.

Step 3:
Execute "ant" command inside DSS_HOME/bin directory which would create the DSS_HOME/repository/lib directory (if it does not already exist) and copy some required dependency jars to that particular directory.

Step 4:
Change the working directory to GREG_HOME/repository/lib and locate checkin-client-x.x.x.jar (x.x.x represents the version of the product being used)

Step 5:
Change the working directory back to DSS_HOME/repository/lib and place checkin-client-x.x.x.jar there.

Step 6:
Restart WSO2 Data Service Server instance.

Step 7:
Change the working directory to DSS_HOME/bin in the command line and run the checkout command "checkin-client.sh co https://hostname:9443/registry/ -u admin -p admin -f registry_checkout". This will create a registry dump file of the root collection, called "registry_checkout" inside DSS_HOME/bin directory. (Modify the paths and the hostname to match your environment)

Step 8:
To check in the data to a different DSS node (or any other carbon node), execute the following command. "./checkin-client.sh ci https://hostname:9443/registry/ -u admin -p admin -f $DSS_HOME/bin/registry_checkout". (Modify the paths and hostname to match your environment)

Further information on various ways of obtaining a registry dump of a particular collection can be located at [1].


Thursday, September 1, 2011

How secure your data in the cloud?

It's been not so long since the concept of cloud computing started emerging. But the huge hype it has generated within such a short period of time suggests the amount of interest people have already gotten at it. And yes, it has to be of such strength to make such a solid impression on world-wide technical experts, that quickly. The business advantages may have been the reason for most organizations to adapt the cloud or it could be the huge hype which forced them towards the adaption. However, it's not quite clear how many of them have really thought about the pros and cons of it and made the best suited solutions for their organizations. This article is intended to provide an insight into some of the risks that are associated with the cloud which may be hidden yet important to be mindful of, within the scope of data.

First and the foremost, have you or your business organization ever thought about how secure your data to be stored in some storage space offered to you by your cloud service provider and located at some unseen data center? In other words, your cloud service provider may have its data distributed in several data centers established in various parts of the world. To which content do they provide a guarantee on the security of your data (maybe sensitive or maybe not) stored in such geographically parted locations? If you've ever thought about the data security, these questions would have naturally come up to your mind. To  address this concern, some cloud service providers are now in the process of offering encrypted data storage mechanisms restricting the room for any security vulnerabilities. But that too has got some bad implications like performance bottlenecks, etc which would reduce the performance and other measurements of the data manipulative processes associated with the business.

Another important concern would be, the various laws, rules and regulations and acts that are imposed upon data by different countries. For example, if your cloud service provider is based on some European country and if you, as the service consumer, are located at some Asian country, the variations of such laws imposed on data may restrict you from manipulating your own data freely according to your real requirements. Though this risk is not clearly visible, it can be of such high impact on the legality of your business.

For highly data intensive businesses, the high availability of data plays a vital role. Thus, for such businesses that have gotten themselves into the cloud must have a strong guarantee from the service provider that the high availability is constantly ensured. The recent power outages took place in Amazon, one of the popular service providers in the cloud space, is one of the best examples to show how risky it could be, if it's not handled properly. Most of the time this type of service interruptions due to Power outages, natural disasters, etc take place unexpectedly. Yet it is a must that the cloud service provider has the ability to mitigate such risks and provide the service consumers with an uninterrupted service. On the other hand, there should be a guarantee on the time that the service provider would  take in order to restore the system back to normal conditions. Not only that, in case of a natural disaster, the cloud service provider should have the ability to recover your data from any data loss that could possibly occur.

These would be somewhat obvious questions if you are really mindful about the data security. Yet, it is always important that all individuals and organizations who are into cloud, take them into account if they're to select the best suited cloud service provider for their business in terms of data.

Nowadays, most of the people who are dealing with sensitive data manipulative activities and concerned about data security, thus, prefer the concept of private cloud ahead of the services offered by the public cloud in which they can have the total control over each and every aspect of the data manipulations that are involved in their business activities. The good news is that, WSO2 offers its private cloud solutions (apart from its public cloud solutions) to help such people get going with their business who are doubtful about the data security, which enables the users to obtain the complete control over their data manipulative needs. Further, WSO2's private cloud offerings too expose you to its complete product stack as-Services including Data-as-a-Service, ESB-as-a-Service, etc. Visit wso2.org or wso2.com for more details, tutorials and articles which would provide you with a comprehensive understanding about WSO2's cloud offerings and how you can adapt them into your businesses.