At least two people have been hurt after shots were fired near a courthouse in western Germany, where a high-profile murder trial is taking place.