Jesse was the father of David the king. David was the father of Solomon by Bathsheba who had been the wife of Uriah.
(New American Standard Bible)
And Jesse begat David the king; and David the king begat Solomon of her that had been the wife of Urias;
(King James Version)