One does not expect a naval officer who has been court-martialed six times to go on to command the Mediterranean Fleet and retire as a commodore. But Uriah Phillips Levy did just that and more.
Levy first went to sea as a cabin boy and then joined the U.S. Navy during the War of 1812 as "proof of love to my country." As sailing master of the USS Argus he served for less than three months before being given command of a captured enemy vessel. When his ship was recaptured by the British, he and his prize crew were sent to Dartmoor prison for the remaining 16 months of the war.
After the war, he remained in the Navy and eventually commanded the sloop-of-war USS Vandalia, where one of his six courts marital occurred when he refused to have a young seaman flogged for a disciplinary offense. Sentenced to dismissal from the service as a result, he was reinstated when President John Tyler overturned the sentence.