It could be that you're drinking too much cranberry juice at one time.
Although cranberry juice is good for your kidneys and other health if you drink too much of the Cranberry juice at one time then it can actually increase your chances of getting kidney stones.