Anomalous Josephson Effect in Nanowires