The jumper shorts the Arduino power to the motor power when connected. So when you had the 4xAA and 9V both plugged in they were shorted to each other. Take the jumper off, power the motors with the 4xAA (6xAA is probably better) and power the Arduino with the 9V.