Originally posted by Adam It could be that you aren't mounting your lenses properly. If the AF shafts on the lens and camera don't align, you can get erratic behavior until the problem is remedied- and in this case, the solution is to wiggle the lens back and forth a bit until the two shafts are properly linked.
Adam has identified the situation in most of these issues. My specific mounting method is to press and hold the lens release button as you mount the lens. Turn the lens until it stops (but don't force it). Release the lens release button and gently turn the lens back until the locking pin just clicks into place.
My only guess as to why this works is the hole for the locking pin in the lens mount might be just slightly enlongated. Going the opposite direction into the locking position is a trifle more accurate.
One other check .... with the lens removed, press the lens release button. Not only the locking pin but also the autofocus nub should visibly retract. When you release the lens release button, it should visibly extend just above the mount. If it is not doing this, the body will interpret this non-extension as having mounted a manual focus lens.