A good cast equipped with cute names is forced to muddle through terminal whimsy in this less-than-magical adaptation of Aimee Bender’s adult fairy tale, sluggishly directed by Marilyn Agrelo, who more successfully helmed the delightful documentary “Mad Hot Ballroom.”

Jessica Alba tries hard in the impossible role of Gray, a depressed heroine whose dad (John Shea) has long had a mysterious mental ailment. By way of therapy, our heroine’s mom (Sonia Braga) suggests the daughter take a job teaching math in an elementary school — despite lacking a college degree or any common sense (she uses an ax as a classroom decoration, with predictable results).

Among those ambling through “An Invisible Sign” are Chris Messina as Alba’s confused love interest, a chemistry teacher named Smith, and the ever-reliable J.K. Simmons as Jones, a former math teacher who wears wax numbers on his chest to denote his mood every day. What’s the sign for boredom?