I used to get bad joint pain in my knees quite often. I'm pretty sure I was getting is what they call Patellofemoral Pain Syndrome. I skipped running for a week, and really cleaned up my dead-lift, squat, and lunge form. Now I work out harder and heavier than I ever did with no pain.
I also had a similar, but less dramatic issue with my elbows from benching/dips which doesn't give me problems any more.
I think if you have VERY clean form, you can at least diminish the pain which I would attribute to inflammation.