LOCKPORT – A Lockport drug dealer, who re-entered the cocaine business after losing his job in 2010, was sentenced to two years in state prison Friday.

Niagara County Judge Sara Sheldon Farkas imposed the sentence on Eddie A. James, 40, of East Avenue, who had pleaded guilty to attempted fourth-degree criminal possession of a controlled substance and fifth-degree criminal sale of a controlled substance.

Assistant Public Defender Michael E. Benedict said James, who served federal prison time after a 1993 cocaine conviction, had been doing well from 1997 to 2010, when he lost his job. “He took this wrong path of selling drugs,” Benedict said.

He had about one-quarter ounce of cocaine when he was arrested Nov. 5, 2011, after trying to force his way into an apartment on Saxton Street in Lockport. James also sold crack cocaine in Lockport Nov. 29.