“The Fault in Our Stars,” John Green’s No. 1 bestselling novel about a pair of cancer-afflicted but thoroughly alive teens, reaches the movie screen just 2½ years after its publication.

An inspired-by-reality story about young cancer patients who fall in love, the book has been adapted into an affecting, beautifully wrought film. A theme emerges quickly: Whether someone has a terminal illness or is strong and healthy, life is finite and every day is a gift.

Hazel Grace Lancaster and Augustus Waters meet at a support group for young cancer patients. Their relationship proceeds gradually and, on Hazel’s part, cautiously. Meanwhile, the impact cancer has upon them isn’t softened for Hazel and Gus or the movie’s audience.

Overabundant length is the major fault in “The Fault in Our Stars,” a love story that can’t have a conventionally happy ending. The filmmakers can’t let Hazel and Gus go. After the story’s tears-inspiring drama reaches what feels like the end, the movie continues, stretching past two hours.

Before “The Fault in Our Stars” hits overtime, it unfolds with freshness and honesty that’s rare for a mainstream Hollywood production. Those qualities reflect the upbeat Gus, who is cancer free following the amputation of a leg, and Hazel, who’s likely doomed but still sparking with life, especially after she meets Gus.

Shailene Woodley, previously seen in “Divergent” and “The Descendants,” plays Hazel, a 16-year-old girl who’s been dying most of her life. Hazel must constantly wear a flexible tube in her nostrils, which in turn is attached the oxygen tank that’s always beside her.

Woodley powers her bright, thoughtful character with intelligence and sensitivity. The 22-year-old has a glow on the screen, much like Jennifer Lawrence, who’s just a year older than Woodley.

Ansel Elgort, one of Woodley’s “Divergent” co-stars, plays 18-year-old Gus. Despite Gus’ maiming ordeal with cancer, he is an annoyingly chipper young man.

Gus instantly likes Hazel. He asks her out after the first cancer support group they attend. The always sunny Gus persists in his courtship of the reluctant girl he calls Hazel Grace.

Gus and Hazel’s flirtation follows their requisite sharing of their cancer stories. They hold hands, talk on the phone for hours, like non-sick teens do. It’s a sweet, chaste relationship. The blooming love story is told in part by social media messages that pop up on the movie screen in comic book-style balloons.

Watching in the background, Hazel’s parents are, depending on the circumstances, supportive, worried, frantic. Like Woodley and Elgort as the story’s principal teens, Sam Trammell and the great Laura Dern fit the movie’s prescription precisely, providing earnestness and poignancy.

“The Fault in Our Stars” takes a radical turn when one of the screen’s great actors, Willem Dafoe, shows up to knock the story on its head. It’s a classic Dafoe performance, infected with bitterness and rage. Unfortunately, the punishing blast of cynicism Dafoe unleashes is almost kills the film. “The Fault in Our Stars” never quite recovers.

Following the damage Dafoe does, there are few special moments left to experience. But the movie slogs on, threatening to undermine the warm welcome it earned in its first 90 minutes. Fortunately, 90 minutes of well-pitched performances combined with unusually good, touching storytelling goes a long way.