I read in a book that if the constraint forces do work, the system is conservative, else it's nonconservative. In that case, consider a system of two bodies moving in an elliptical path under gravitational attraction. Since the gravitational force is continuously doing work on the particles, by the above definition, gravitation is a nonconservative force and the system is nonconservative. However, the mechanical energy of the system remains constant and in newtonian mechanics, gravitation is classifed under conservative force. Can someone explain where am I going wrong.