2 Samuel 7:12-16 is part of what is regarded as God's covenant with King David as relayed by Nathan the prophet. Many theologians have seen in this promise a pointing forward not just to David's immediate son Solomon but also to the Messiah. The language which describes an everlasting throne and kingdom lends credence to this idea as we know that Solomon's throne and kingdom did not last forever:
When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. He shall build a house for my name, and I will establish the throne of his kingdom forever. I will be to him a father, and he shall be to me a son. When he commits iniquity, I will discipline him with the rod of men, with the stripes of the sons of men, but my steadfast love will not depart from him, as I took it from Saul, whom I put away from before you. And your house and your kingdom shall be made sure forever before me. Your throne shall be established forever.’”
One of the characteristics of this Davidic offspring is that God will be as a father to him and he will be as a son to God. That is fine and is still pleasingly Messianic however it is also stated that this Son will be disciplined when he commits iniquity (goes astray) yet, unlike Saul, God's steadfast love will not be taken away when this occurs.
How can this promise to David point to Jesus since the New Testament insists that Jesus never committed iniquity?