This paper presents a method for trajectory planning of multi-body systems. First, trajectory planning of a multi-body system is formulated as a constraint solving problem on a set of variables expressing the motion of the multi-body system over a finite time interval. Constraints express kinematic and dynamical conditions, range limits as well as task achievements, and they can be assigned different priority levels. The prioritized constraint-solving problem is treated under the framework of lexicographical goal programming. The local optimality of the problem is characterized in terms of Pareto efficiency condition. Based on this observation, an algorithm that iteratively updates the variables towards a locally optimal solution is derived. The proposed trajectory planning method is applied to target-reaching tasks of 3-DOF and 6-DOF robotic manipulators.