earlier i have posted my doubt regarding null pointer exception ,while i was waiting for my doubt to be cleared i was just going through forums with similar doubts and i tried doing the below steps then my error got resolved.thank you so much sir.
Help
Install new software...
What is already installed?
Select the TestNG M2E software and click uninstall
and then install testng again.
goto install new software
http://beust.com/eclipse