According to this verse, David was without sin except on one occasion—the sin involving Bathsheba! It claims David “had not turned aside from anything that He [God] commanded him all the days of his life, except in the matter of Uriah the Hittite.” But, this is both contrary to general statements about fallen human beings (cf. Gen. 6:5; Jer. 17:9; Rom. 3:10–23) and specific condemnations of David on other occasions. David himself said, after God convicted him for numbering Israel (1 Chron. 21:1), “I have sinned greatly” (1 Chron. 21:8).
1 Kings 15:1 - 8
ESV - 1 Now in the eighteenth year of King Jeroboam the son of Nebat, Abijam began to reign over Judah. 2 He reigned for three years in Jerusalem. His mother's name was Maacah the daughter of Abishalom.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.