WALTHAM, Mass. — Actor Tom Wopat, a Columbia County native who played Luke Duke on the 1980s television show “The Dukes of Hazzard,” pleaded not guilty Thursday to groping a female member of the cast of a musical he was supposed to appear in.

Wopat — who was born and raised near Lodi and still owns property in the town of Lodi — was released on $1,000 bail and was told to stay away from the woman after pleading not guilty to indecent assault and battery and drug possession charges. He refused to comment outside court before driving away from the courthouse.

Wopat, 65, was arrested by Waltham police Wednesday night on a warrant on the indecent assault charge. Police said that during a search of him and his vehicle they found “two bags of white powder believed to be cocaine.”

Wopat denied touching anyone inappropriately, according to court documents. He said he flirts but did “nothing that could be considered inappropriate.”

He told police that he buys cocaine “in large quantities and uses it over time,” the court documents said.

Wopat was supposed to play Julian Marsh in “42nd Street” at the Waltham-based Reagle Music Theatre of Greater Boston starting Thursday. But the theater announced Thursday that a different actor would play the role.

Besides his role on “The Dukes of Hazzard,” an action-comedy that ran from 1979 until 1985, he has acted in other television shows and movies, is a Tony Award-nominated stage actor and is a recording artist.

Although he is best known for starring in “The Dukes of Hazzard” from 1979 to 1985, Wopat also has recorded eight albums of pop, country and rock music. He also has appeared in numerous theater roles, in musical and non-musical productions.

In 1999, he was nominated for an Antoinette Perry (Tony) Award for his performance in the leading male role of Frank Butler in the Broadway revival of Rodgers and Hammerstein’s musical “Annie Get Your Gun.”

The Tommy Awards, given annually to recognize excellence in musical theater of Wisconsin schools and students, are named after Wopat. This year, Portage High School’s production of “Les Miserables” garnered 19 Tommy nominations.

Daily Register Reporter Lyn Jerde contributed to this story.

Follow Lyn Jerde on Twitter @LynJerde