Sunday, May 5, 2013

Elected as Apache Axis2 Committer and PMC

It has been a long time, when i started to contribute to Apache Axis2 . As my first contribution to Apache Axis2, I have implemented Axis2 JDK 5 Enum support,. Here is my blog post which explain how to consume that feature. From that onwards I continued my contribution for Apache Axis2 as not only in the Axis2 core , I also contributed to Apache Sandesha2 which is an Axis2 module that provides reliable messaging capability.

I did my GSOC 2012 with Apache Axis2 in improving the JSON support of Apahce Axis2. As an outcome of this my mentor Amila Suriaarachchi  and myself could able to introduce a new approach to convert native a JSON message to XML bidirectional transformation mechanism without any data loss, and it supports namespace too.

Considering the contribution i have done so far in both coding and user mailing list, I have been elected to be an Apache Axis2 Committer and PMC. This is a great achievement for me and I am very much happy about it.


Wednesday, March 20, 2013

Fix machine hostname return null as it value

If your getting null value as your host name, check that both /etc/hosts and /etc/hostname files has the same name to the host, If not put the same name to both file as hostname, Here[1] you can find how to do that.

How to change machine name in Ubuntu 12.04 LTS

Go to the terminal
Type "sudo su" , because you need log into root mode to modify following files.
Now type "gedit /etc/hostname"
Replace new name with old name
Save and close the file

Now type "gedit /etc/hosts"
Replace your new name with old name
    eg : 127.0.1.1 <old name>    -->   127.0.1.1 <new name>
Save and close the file

Now you need to restart the machine, type "reboot" in terminal to restart via terminal.
Now you have successfully changed machine name. 

Monday, February 18, 2013

Install jar to local repo which are not available in maven repository

If you find a jar which is not in any maven repository. But you need it to build you maven project you can first install that jar to you local repo using mvn install:install-file .

e.g: java-gmail-imap.1.4.4-gm-ext-0.6.jar is not in any maven repository therefore i need to install it on my local repository, run following command in terminal

mvn install:install-file -Dfile=/path/to/java-gmail-imap.1.4.4-gm-ext-0.6.jar -DgroupId=com.google.code -DartifactId=java-gmail-imap -Dversion=1.4.4-gm-ext-0.6 -Dpackaging=jar

you will see

[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ org.example --- [INFO] Installing /path/to/java-gmail-imap-1.4.4-gm-ext-0.5.jar to /home/user/.m2/repository/com/google/code/java-gmail-imap/1.4.4-gm-ext-0.6/java-gmail-imap-1.4.4-gm-ext-0.6.jar [INFO] Installing /tmp/mvninstall4760815746928565678.pom to /home/user/.m2/repository/com/google/code/java-gmail-imap/1.4.4-gm-ext-0.6/java-gmail-imap-1.4.4-gm-ext-0.6.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------

Now my java-gmail-imap.1.4.4-gm-ext-0.6.jar is in my local repo, and will add this as a dependency to my project

<dependency>
<groupId>com.google.code</groupId> <artifactId>java-gmail-imap</artifactId> <version>1.4.4-gm-ext-0.6</version>
</dependency>


that's all now you can build your project :)


Friday, September 28, 2012

Maven doesn't run all tests but print build success message and quit

When i am writing an end-to-end test to Apache Axis2 JSON support(End-to-end means it up a Axis2 server and deploy a service which is created on a fly, on it and test with that service and stop Axis2 server end of tests). Here i faced a problem that when i run the test using maven(mvn test) it runs isolation test(test particular functions of a class) upto my end-to-end test. it print build success message in terminal console and quit.

OOPs what happened to other isolation tests :( . then i debug the code and see are there any test failure in my end-to-end test but, believe me end-to-end test pass all tests and successfully execute @After method which is tearDown() method too. After that it return build success message and quit. How i can find a error when it says build success :) . Finally i found the solution for that. solution is add <forkMode>pertest</forkMode> to the suirefire maven test plugin. Then every things ok , it runs all test including above end-to-end.

Saturday, August 25, 2012

How to send http post request using apache commons httpclient




Install Netbeans 7.2 in Ubuntu 11.10

When I try to install Netbeans IDE by downloading netbeas*.sh file from the Netbeans website and run it in terminal, it say installation is not completed please find the log file and try again. I tried with serveral netbeans.sh files , even several versions but result is the same. After that i tried by giving path to javahome using "sh netbeans*.sh  --javahome /path/to/JDK/home ". But still i get the same error message.

Somehow I could able to solve this issue using pack which provided by Oracle. In that pack they have bundle JDK and Netbeans 7.2 together. You can find it in JDK 7u6 with Netbeas 7.2 post published by Oracle. You need to do is accept the license agreement and download it. Then you can run it using sh command as usual.

Thanks,
Shameera.

Sample Text

Website counter

Categories