A Santa Clara County judge has dismissed a rape charge against former San Francisco 49ers DT Ray McDonald after prosecutors said the woman who made the allegation refused to testify.