On July 7, 1908, Ensign Chester Nimitz ran the destroyer USS Decatur (DD 5) aground in the Philippines. He was court-martialed, found guilty of neglect of duty, and issued a letter of reprimand. It was a different era so he still able to make admiral despite this career setback.
Source: U.S. Naval Institute