Philip Glass’ opera “The Trial,” which received its North American premiere at Opera Theatre of St. Louis on Sunday night, has almost everything it needs to be a big success: one of the composer’s best scores, a libretto from Christopher Hampton that captures the essence of the source material, witty and intelligent direction, a solid cast, an excellent conductor and a fine production.

What it doesn’t have is a plot with much in the way of redeeming qualities or character development.

“The Trial,” based on Franz Kafka’s absurdist novel of the same name, is the tale of a man trapped in a tragedy he didn’t cause and doesn’t understand, with a preordained arc that can end only in despair. There is certainly dark comedy here, but the laughter echoes with hopelessness.

Josef K., a bank manager, awakens on his 30th birthday to find two men in his room. They inform him that he’s under arrest but won’t tell him why. K. proclaims his innocence and tries to find help, but everything he does just seems to make matters worse. The constant response he gets from those to whom he reaches out is that he’s not taking his case seriously enough.

OTSL’s production, directed by Michael McCarthy, is from Music Theatre Wales, which commissioned the opera. Set and costume designer Simon Banham has complemented the claustrophobia of Kafka’s story and Glass’ score with a boxy unit set of pale gray boards.

The cast’s eight singers (all but one of them playing multiple roles) are dressed in black and white, with the occasional beard or handlebar mustache to distinguish between characters.

That’s fortunate, because they’re largely interchangeable, bullying or groveling and prone to sordid sexual encounters.

When they’re not singing, they’re lounging — on the floor, in a doorway or window, against a wall — watching everything that happens and building the atmosphere of oppression.

The lack of distinct personalities isn’t the fault of the singers, who all contort their bodies as required and project their words clearly. It’s just that Glass (who has learned a good deal about writing for the voice since his operas of the 1970s and ’80s) hasn’t given them much to work with, just declamatory lines. All of the most engaging writing is for the 21-piece orchestra, where hints of dance tunes and marches can be detected amid the repetitious minimalism. (Interestingly, the voices are listed with the instruments on Glass’ website.)

All but one of the cast are returnees to OTSL and the Loretto-Hilton stage; five are former Gerdine Young Artists. As Josef K., Theo Hoffman appears and sings in every scene, displaying remarkable endurance and a gorgeous, wide-ranging baritone. By turns bewildered, defiant and lusting, he seems to shrink into himself at the inevitability of the final scene, in a memorable image.

In the (rather tawdry) roles of Fraulein Burstner and Leni, soprano Susannah Biller showed a very different dramatic side from her clever Adina of “Elixir of Love” and the noble Costanza of “Richard the Lionheart” in 2014 and 2015; she sang beautifully throughout.

Baritone Keith Phares brought his clear voice and strong stage presence to bear most notably as Lawyer Huld. The lone debut belonged to tenor Brenton Ryan, whose turn as the painter Titorelli had real comic flair. Tenor Joshua Blue and baritone Robert Mellon were a strong team as the guards Franz and Willem. Mezzo-soprano Sofia Selowsky and baritone Matthew Lau made the most of their moments.

Conductor Carolyn Kuan is clearly at home in this idiom and kept the music moving; communication between the stage and pit was excellent. The heroic members of the St. Louis Symphony Orchestra risked repetitive stress injuries with this score but performed admirably throughout.