Barack Obama actually said...
There is no military solution in Iraq, and there never was.
Context
Obama Campaign Press Release - On Fifth Anniversary of Speech Opposing Iraq War
10/01/2007
Obama Campaign Press Release - On Fifth Anniversary of Speech Opposing Iraq War