Rank: Guru
Rating: 89%, 5267 votes
In both cases, if lens gear are out of place, or if dust is obstructing the lens gear, only simple things you can try are playing with the lens or blowing compressed air and cleaning dust.
If you keep getting lens error then only effective way to proceed is taking apart the lens barrel, eventually cleaning parts, and mounting it back. This operation should be performed by somebody with experience in servicing cameras.
At the end of the owner manual you will find instructions on how to contact nikon service in your area.