jump to navigation

Maven <classifier> tag February 16, 2008

Posted by Mayank in maven.
Tags: , , , ,
add a comment

Maven has a <classifier> tag which helps in locating artifacts in the repo with a further level of granularity.

Hence, if you were using testng 5.7 for jdk1.5 your pom would look like this:


This will get the artifact testng-5.7-jdk15.jar from the repo.



Howto: View the JNDI Tree in JBoss January 22, 2008

Posted by Mayank in j2ee.
Tags: ,

With EJB3 around, it is sometimes difficult to figure out the default jndi names in your environment. Yesterday I got real desparate for one such requirement and was almost ready to sit down and write a jndi browser when I found out that …

goto http://localhost:8080/jmx-console

– click on “service=JNDIView” link under the “jboss” section

– click on the button under “java.lang.String list()” …

lo … behold… !! … ok thats how I felt :-)…


Airtel broadband modem trouble January 1, 2008

Posted by Mayank in broadband.
Tags: , ,
1 comment so far

I recently shifted to airtel broadband. Their customer care and link are undoubtedly far better than my the other two providers I’ve tried (bsnl and tata indicom).

However, I started facing a strange issue for which I received even stranger response from the customer care :-).

I usually keep my PC and modem powered on because I access it from outside. I noticed that the modem (Beetel 220BX1) usually hangs after 2-3 days of continuous operation. The only way out at that point is to “restart” (the microsoft bug 🙂 ) the modem.

When I told customer care about this, the lady at the other end told me not to use the modem continuously like this as it was an electronic item ! ( Sounded like my granny was on the other side of the call ! ). After I persisted she relucantly took the complaint. The field engineer told me that the modems provided by Airtel could not handle this kind of loads. They needed to be restarted every 48-72 hours.

Given the fact that I have an unlimited broadband connection which I need to be up 24×7, I’ve finally decided to return the beetel modem and buy a linksys router/modem.

So for those of you planning to take an airtel broadband, and are desirous of continuous uptime, I would recommend you not take the modem provided by airtel.

Useful Ubuntu download links December 19, 2007

Posted by Mayank in ubuntu.
add a comment

CD Images – http://releases.ubuntu.com/

DVD Images – http://cdimage.ubuntu.com/releases/

Howto: Setup wordpress blog on a home server? November 26, 2007

Posted by Mayank in home server, Wordpress.
Tags: , , , , ,

I’ve been wanting to do this for a long time and this flu I got over the weekend gave me that chance ! :-).

This blog (powered by wordpress 🙂 ) is hosted from my home pc. While most of the setup was a breeze with instructions readily available I faced problems in setting up the port forwarding (NAT) on my ISP provided router/modem. I’ll brief you through the process while paying special attention to the networking setup where I didn’t find much help..

1. Get the wordpress tar.gz from http://www.wordpress.com

2. Setup LAMP, WAMP, MAMP or any other xAMP ! 🙂 …

AMP is short for Apache MySQL PHP. The first character is chosen based on the OS one choses, viz. Linux Windows MAC, etc

3. Now go through the famous 5 minute wordpress installation, and believe me that is really a 5 minute install.

One word of caution, on one of the configuration pages you might be tempted to change the “WordPress Address (URL)”, “Blog Address (URL)”, **don’ do that** just yet. You’ll get locked out of your setup and would be needed to get into the MySQL database to fix it. However, later I also found a PHP script which can help you bail out of this situation.

4. Nows the part where you don’t find much help. For your site to be accessible from the external world, your home server needs to be seen on the internet. Typically most modern routers have firewalls built into them which keep your internal network secure (typically your home pcs behind the router).

In order to make your wordpress blog available on the internet, you should begin by opening a port on the router and asking the router to forward all requests received on this port to your home server. This is usually available as a setting called port fowarding or NAT.

Since I set this up on my airtel broadband connection, I’ll give some specifics about that to help other airtel broadband users. I got a Beetel 220BXI modem/router with my broadband connection. The configuration page of the router is generally available at If you are unsure of your routers ip address you could also go to http://whatismyip.com from your pc and use http://<ipaddress shown on whatismyip.com> The default access credentials for the router are admin/password.

Router – Login Screen

The advanced settings of this router are not directly accessible. Once logged in, type the following url in your browser –

Router – Home Page

This should take you to the advanced settings page where you can complete the NAT setup.

Router – Advanced Settings Page

Router – NAT Settings Main Page

Router – Setting up NAT

Router – NAT Settings completed!

5. Once you’re done with the NAT setup, your wordpress blog hosted on your home server should be visible outside. You can use this link to find out if your port is open now … https://www.grc.com/x/portprobe=80.

6. To allow user friendly url based access to your site, you can first get a Dynamic DNS.

7. If you don’t have a static ip address then read ahead. Map the dynamic dns account to the external ip address of your router (the one you got from whatismyip.com). You might want to setup a ddns client which will keep dyndns.org updated with your ip address everytime your ip address changes.

8. Finally, you can register a domain name (I used enom via google apps as it provided whois privacy for free) and point it to your static ip address if you have one or the dynamic dns name (the one you created in the last step).

9. We’re left with one final thingy .. since your home pc usually does not have a dns name it can become a problem to enable access to the blog to the external world as well as the world on your side of the router. So you can edit /etc/hosts and add and entry which looks something like this: http://www.geekzguru.net geekzguru.dyndns.org

10. edit httpd.conf and add “ServerName geekzguru.dyndns.org”

11. restart networking and apache.

Your blog should now be easily accessible both internally and externally :-).

Happy blogging!

Howto: Organise custom components in Flex? August 9, 2007

Posted by Mayank in flex.
1 comment so far

Most of the material on custom components in flex talks about their creation and their use within flex applications. As the number of components begin to grow one begins to feel the need for organising them in subfolders.

To use a custom component in a Flex application we usually add an attribute to the mx:Application tag:


and then use the components as


I recently solved the mystery behind this attribute :). If you would like to organise the components into subfolders, then create a folder as desired and while setting the namespace attribute in the mx:Application tag set it like this:


To access the components you would use


You can create additional folders and include their namespaces too :).


To take this a step further, you could nest your folders to mimick the way your organise your java packages:

Create sub1, and then sub2 under sub1

To use components under sub1 you could place a namespace declaration like:


and then to include sub2 components you would declare another namespace:


Hope that helps you in organising your custom flex components.

Happy Flex-ing! 🙂

Howto: Install IE on ubuntu July 13, 2007

Posted by Mayank in ie on ubuntu, ubuntu, wine.
add a comment


Add a jar to maven repository July 5, 2007

Posted by Mayank in maven.
add a comment

Install a standalone jar into a local maven repository

mvn install:install-file

Installing Borland Together for Eclipse on Ubuntu June 19, 2007

Posted by Mayank in borland together, ubuntu.
add a comment

When I tried installing Borland Together for eclipse on Ubuntu I got the following error:

kumarmay@kumarmaylap:/tmp $ Together_2006_R2_LINUX.bin
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
nawk: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

Launching installer…

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/tmp/install.dir.7420/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $ /bin/ls
env.properties.6269 env.properties.6967 gconfd-kumarmay hsperfdata_kumarmay install.dir.6967 keyring-Y5queS mapping-kumarmay orbit-root tmp7CTleI virtual-kumarmay.qQxDDJ
env.properties.6590 env.properties.7420 gconfd-root install.dir.6590 install.dir.7420 libgksu-vNFzZW orbit-kumarmay ssh-JHnKKy5938 Together_2006_R2_LINUX.bin
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $ basename
basename: missing operand
Try `basename –help’ for more information.
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $ java -version
java version “1.6.0”
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $ echo $JAVA_HOME
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $
kumarmay@kumarmaylap:/tmp $ ls /lib/libc.so.6 /lib/librt.so.1 /lib/libm.so.6
/lib/libc.so.6 /lib/libm.so.6 /lib/librt.so.1

After some research I found out that this was happening due to an export in one of the installation shell scripts. To rectify the problem modify the bin file using the following command and then rerun the installation :

cat Together_2006_R2_LINUX.bin | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > Together_2006_R2_LINUX.bin.new

Speed up your Broadband – Part II June 10, 2007

Posted by Mayank in broadband, ubuntu.
add a comment

Here’s another tip to speed up your broadband connection..

Besides other operations, the DNS lookup operation is a very expensive operation. A fast dns lookup operations really improves your browsing experience.

There is an excellent article about speeding up your dns connection @ wordpress which describes how you can create a local dns cache. I’ve tried it out and really love the new experience :).

Have a nice time..

Happy Ubuntu(ing)!