Home » Uncategorized
Category Archives: Uncategorized
Spring Integration RSS Feed Issue
If you are working with Spring Integration feed example https://github.com/SpringSource/spring-integration-samples/tree/master/basic/feed and get following error message “Could not find fetcher.properties on classpath“. The solution is to create an empty file called fetcher.properties in src/test/resources folder and this will fix the issue.
2012 in review
The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.
Here’s an excerpt:
19,000 people fit into the new Barclays Center to see Jay-Z perform. This blog was viewed about 87,000 times in 2012. If it were a concert at the Barclays Center, it would take about 5 sold-out performances for that many people to see it.
Time To Move On And Start a New Journey
It has been a wonderful and amazing experience to work at Xebia India office. I have learned and matured a lot in last 2.5 years I spent at Xebia. I was referred to Xebia by Rajneesh Namta who has worked with me at GlobalLogic. I have enjoyed working on lot of technologies at Xebia including NoSQL datatores, various PaaS solutions, BigData technologies like Hadoop, and various Spring portfolio projects. This blog is a retrospective of why I joined Xebia, What I did at Xebia and What lies ahead for me.
Why I Joined Xebia?
I had lot of other Job offers at the time when I was planning to leave GlobalLogic. I joined Xebia because of following reasons :
- Anurag Shrivastava : My first interaction with Anurag was during my interview. He took final round in the interview process and I was very impressed by him. He asked questions which nobody has ever asked me in any other interview like what are your thoughts on Open source, what you want to be 5 years down the line, do you blog etc. I liked the fact that he was not only focussing on project work but talking about things which are also important for building a successful career as a Software developer.
- I wanted to work for a company which will give me a platform to discover myself. From GlobalLogic time I had interest in writing and speaking but because of lack of support and mentorship was not able to do much.
- I wanted to work for small organisation which values quality over quantity.
- Go beyond the conventional project work and do much beyond that and make my name in community.
- Xebia Values : I joined Xebia because I believed in Xebia values.
What I did at Xebia?
The three main things that I did at Xebia are :
- For most part of my 2.5 year stint at Xebia I worked on building a scalable de-duplication engine. I worked with some wonderful and knowledge people(in no particular order) — Guneet, Rahul, Sameer, Karan, Nancy, Rajneesh, Richa and Paritosh. I would like to thank all of them for their help and support.
- Writing : At Xebia I discovered my interest in writing and I have written at lot of technical or developers oriented portals like IBM DeveloperWorks, Developer.com, JavaLobby and Xebee and my blog. Recently a publisher has approached me to write a book. Lets see how it goes.
- Speaking : I discovered my passion for speaking while giving XKE’s at Xebia India office. XKE is Xebia Knowledge Exchange where in on every alternate Wednesday we have three hours of technical or non-technical sessions followed by dinner. I have spoken at most of developer oriented conference in India and have also spoken at RedHat Summit 2012 in Boston.
What lies ahead for me?
I am joining RedHat as OpenShift Evangelist on 21st September. I will be travelling around the world speaking at various conferences, writing about OpenShift, building cool applications and building active and vibrant community around OpenShift. I might also think considering about writing a book if time permits. Let see how things unfold in future.
My Advice to fellow Xebians
Although I am nobody to advice anybody but will still give my advice. Xebia is one of very few IT organisation in India which gives platform to do lot of other things apart from project work; please do make use of them and build an exciting and wonderful career.
Best of luck to everyone and stay connected!
2011 in review — How my blog performed in 2011?
The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.
Here’s an excerpt:
The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 56,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 21 sold-out performances for that many people to see it.
A very bad Software Developer Job Advertisement by Infosys.
I don’t read newspaper daily but today morning somehow I had some extra time so I thought to spent that time reading news paper. While reading or browsing the newspaper I saw a Job advertisement from Infosys. In recent past I have interviewed lot of Java developers from companies like Infosys , TCS and other biggies and found that most of them don’t know how to write code, never heard of new things happening in Software world, technically very weak overall. So, I was very curious to read about what all technologies they are looking to hire.
You can view the Job Opening here.
The first thing I read was …
Web Technologies
Java, J2EE, EJB, WebLogic, WebSphere Commerce Server, WebSphere Portal Server
Here I don’t get what they are trying to say when they write Java as a Web technology. J2EE is very old now it is JavaEE. EJB ?? I am sure they are working on EJB 2 or even prior version of it. And finally the big beasts from Oracle and IBM..
Second Thing which caught my eye…
Open Systems
C++, Unix
..WTF.. Please tell me what do you mean by this.. are you looking for developers who have knowledge of C++, and can work on Unix boxes.. ??
Last Thing that I saw.
Others
Hadoop, Apace Cassandra, OpenLink, etc…
Now you are talking.. Hadoop and Cassandra are the latest technologies and any good developer will love to work on these technologies. Why you are putting these technologies in others..
To enable JGroups on ubuntu system
While you are using jgroups on ubuntu you might get this exception
INFO: JGroups version: 2.6.16.GA org.jgroups.ChannelException: failed to start protocol stack at org.jgroups.JChannel.startStack(JChannel.java:1617) at org.jgroups.JChannel.connect(JChannel.java:366) at org.jgroups.demos.Draw.go(Draw.java:174) at org.jgroups.demos.Draw.main(Draw.java:144) Caused by: java.lang.Exception: problem creating sockets (bind_addr=shekhar/127.0.1.1, mcast_addr=228.10.10.10:45588) at org.jgroups.protocols.UDP.start(UDP.java:389) at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:129) at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:402) at org.jgroups.JChannel.startStack(JChannel.java:1614) ... 3 more Caused by: java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method) at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:309) at java.net.MulticastSocket.setInterface(MulticastSocket.java:424) at org.jgroups.protocols.UDP.createSockets(UDP.java:527) at org.jgroups.protocols.UDP.start(UDP.java:385)
To solve this you need to disable ipv6 on ubuntu. To do that do the following
java -Djava.net.preferIPv4Stack=true -classpath /home/shekhar/JB431/opt/jboss-soa-p-5/jboss-as/lib/concurrent.jar:/home/shekhar/JB431/opt/jboss-soa-p-5/jboss-as/common/lib/commons-logging.jar:/home/shekhar/JB431/opt/jboss-soa-p-5/jboss-as/server/all/lib/jgroups.jar org.jgroups.demos.Draw
2010 in review
The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

The Blog-Health-o-Meter™ reads Wow.
Crunchy numbers
About 3 million people visit the Taj Mahal every year. This blog was viewed about 32,000 times in 2010. If it were the Taj Mahal, it would take about 4 days for that many people to see it.
In 2010, there were 19 new posts, growing the total archive of this blog to 30 posts. There were 15 pictures uploaded, taking up a total of 604kb. That’s about a picture per month.
The busiest day of the year was May 13th with 1 views. The most popular post that day was Reasons for incompetent software developers in India.
Where did they come from?
The top referring sites in 2010 were dzone.com, groups.google.com, code.google.com, javaworld.com, and twitter.com.
Some visitors came searching, mostly for java struts 2 upload, google app engine struts 2, google app engine struts2, maven 3, and maven classpath.
Attractions in 2010
These are the posts and pages that got the most views in 2010.
Reasons for incompetent software developers in India May 2010
76 comments
Creating Struts2 application on Google App Engine (GAE) August 2009
58 comments and 2 Likes on WordPress.com
File Upload on Google App Engine using struts2 October 2009
25 comments
Speed up your build with Maven 3 October 2010
6 comments
Applying Design Patterns with Java Enums June 2010
5 comments
Top 10 New Features in Maven 3
Maven 3.0 was just released and the Java build tool has come a long way since version 2 was released almost six years back. Maven 2 had reached a stage where it was difficult to extend and its code was difficult to understand. In version 3.0 many of the Maven internals have been revamped to overcome all the issues associated with Maven 2. In this article, I run down the top 10 features in Maven 3.
Speed up your build with Maven 3
I have been trying to find ways to make my project’s maven build run fast. It is very frustrating and annoying when your project’s full build takes 12 minutes to complete. It does not happen too often in a day because you work at module level, but 2-3 times a day you need to build the full project and if your build takes this long, it really slows you down. These days builds take a lot of time because you embed all sorts of plugins in your build like checkstyle, findbugs, cobertura (It is evil because it run your test twice), etc. Although, It does give you time to have coffee but 12 minutes is way too much. So, I was really pissed off.
Few days back I was checking my tweets and found out that Maven is releasing its new version and it will have some performance improvements. Maven 3 is the latest version of maven which is expected to be released today. So, I decided to play with it. I downloaded the beta version of Maven 3, changed my windows path system variable to point to Maven 3 and ran a mvn clean install on my project. Without any build failures or other problems, the build just ran fine. I have heard that when Maven 2 was released people had hard time migrating from version 1 to 2 as it was not backward compatible. But Maven 3.0 is completely backward compatible and most of the plugins will also work fine. To my surprise, the build took 9 minutes. This is still a high number but it was way better than 12 minutes. Seeing this decrease in build time motivated me to read more about Maven 3.
After reading some blogs and watching Jason Van Zyl presentation, I found out that there are lot of new features in Maven 3. One of the new features in Maven3 is Parallel Builds. Parallel build analyzes your project’s dependency graph and schedule modules that can be run in parallel. This is a very cool feature and it really sped up the build. To run a paralled build, you can type
mvn -T 4 clean install mvn -T 2C clean install
The first command will run your build with 4 threads and second command will build your project with 2 threads per core. How fast your build will become, depends a lot on your project/build structure, how your unit tests are distributed in modules so it may vary from project to project. For my project with 4 threads, the build time got reduced to under 6 minutes, which I think is great. You should try out some combination with number of threads or number of threads per core to find out the best possible combination for your project. I am very happy that build time of my project got reduced to almost half.
In his presentation, Jason Van Zyl talks a shell based tool called Maven Shell which can also further improve the performance. Maven Shell is maven embedded in a long lived shell process. It does not comes bundled with maven 3 so you have to download it from http://shell.sonatype.org/. I tried running my project build inside Maven Shell but it gives PermGen space error all the time. I tried changing the perm gen memory setting but it didn’t helped. Maven shell is expected to run much fast because it caches the parsed POMs.
Maven 3 is definitely worth spending time so have a look at it. I have just touched the tip of iceberg , there are lot of new features in Maven 3. I will try and talk about others in my future blogs.

