The motion of fluxons in Josephson junctions with periodical systems of structure defects with a magnetic moment is investigated. A new type of fluxon pinning, namely the pinning outside the defects, is predicted. The dependence of the critical current on the external magnetic field and distance between defects has been obtained. It is shown that in the case of a fast fluxon its interaction with the magnetic defect is only magnetic. The existence of supersolitons in the fluxon chains is predicted. The results of the theory is used to explain the dependence of critical current on the magnetic field in high temperature superconductors.