he had only once had a truly unhappy experience in his naval service : as a freshly made lieutenant of seventeen he had been assigned to the shorewise , under captain barstowe , an older man and a relic of an older navy , where officers had not been required to be gentlemen as well .