 John 9, when Jesus is asked, who sinned, this man or his parents, that he was born blind? He replies, neither this man nor his parents sinned, but that the works of God might be revealed in him. 2 Samuel 12, because by this deed you have given great occasion to the enemies of the Lord to blaspheme the child whose born shall surely die. Okay, no, I don't see any contradiction here whatsoever.