In 2 Samuel Chapter 12 we read:
... Now listen to what the LORD God of Israel says to you: ... "Why did you disobey me and do such a horrible thing? You murdered Uriah the Hittite by having the Ammonites kill him, so you could take his wife. Because you wouldn't obey me and took Uriah's wife for yourself, your family will never live in peace. ..." (Contemporary English Version)God pointed out that from that day forward David would know violence and bloodshed among his own family members.
Now in 1 Kings 2 we read:
"Then King Solomon swore by the LORD: "May God deal with me, be it ever so severely, if Adonijah does not pay with his life for this request! And now, as surely as the LORD lives—he who has established me securely on the throne of my father David and has founded a dynasty for me as he promised—Adonijah shall be put to death today!" So King Solomon gave orders to Benaiah son of Jehoiada, and he struck down Adonijah and he died."It is important to point out that Solomon had three older brothers: Absalom, Adonijah, and Amnon. Adonijah was passed over by his father David and Solomon who was only about 12 or 15 years old was made king.
Dr. Chuck Missler summarizes the family disaster that was put in motion by David's moral failing. "His first son by Bathsheba died. He also lost his moral authority. Amnon, one of his sons, raped David's daughter, Tamar. Absalom, another son, killed Amnon. Absalom led a rebellion against his father David, primarily counseled and encouraged by David's trusted counselor, Ahithophel." I would also add that Athithophel was Bathsheba's grandfather who then later killed himself after the failed rebellions. So from one act of sin came incest, fratricide, intrigues, rebellion, and ultimately civil war.
For me it is important that I remind myself that as much as the Bible is about God it is also about humans. Humans that are not perfect and have failings. I must be careful not to elevate people in the Bible just because they are in the Bible. King David was a great King and God speaks of him as "a man after God's own heart." But he failed. He committed adultery and murder. This had effects and led to horrible things in his family. Sin has consequences. But as I pointed out with some of the other dysfunctional families in the bible God still uses them and speaks to them. God doesn't abandon humans he creates a way to be near us.
"The wisdom of God has devised a way for the love of God to satisfy the wrath of God without compromising the justice of God." (John Piper)