GO SEE A DOCTOR!!!!
While all the advise so far is good, I don't think it goes far enough. If you're having pain for a couple of days after an Aikido class, then you ought to see a doctor!
Go ahead and modify your training, but also find out what's wrong.