Other risk factors for prostatitis are having:  A bladder infection. A prostate biopsy. HIV/AIDS.