The judge and a court officer were injured in the attack.