Hi Jaikiran,
Thanks for the feedback. I completely agree with you that the examples should work out the box, however, I found it odd that he had an incomplete url specified in the properties file "java.naming.provider.url=localhost" which may be causing the exception (unless it defaults to port 1099?).