Could be a kidney stone. Have you tried taking pills for pain like ibuprofen? How's your urine stream? Are you drinking a good amount of water every day?
You could get a KUB (xray of kidney, ureters, bladder) which would show if you have a calcific kidney stone somewhere between your kidneys and bladder.
Many people have hernias and don't know it (there are several types of hernias that occur in the abdominal area) so they're not necessarily painful.