Prophets are sent by God and shall also be examples. But if one reads the stories of David and Solomon, it becomes clear that both have committed grave sins. How can these persons be prophets?
Answer: Please start by reading the first section to the answer to question 27. The patriarchs, the prophets and other major characters in the Old Testament, among them holy women like Sarah, Rebecca, Miriam, Deborah, Hannah, Judith and Esther, were and still are revered by the Church as saints. According to Catholic teaching, saints are people who have lived their faith in a convincing, even heroic manner. Such holiness does not mean that one or the other of them cannot have committed sins. Neither is it primarily based on extraordinary or highly visible good deeds, rather it is visible in extraordinary faithfulness, love and patience in the ordinary and daily life, in the glorification of God and in the service to mankind, especially in the bearing of suffering, persecution and tribulations of all kind. All of this is in them as the fruit of their openness towards Gods presence in them. The Islamic doctrine of the sinlessness (‘isma) of the prophets, does not exist in the Bible or in Christian teachings. According to this Islamic teaching the prophets of God cannot commit any sins. With respect to their belief and their religious faithfulness, they can neither err nor betray. The sunna has turned every prophet into a ma’sûm, i.e. a person who has been equipped with the privilege of being protected from evil and error. God has forgiven all the sins they may have committed before they were chosen by Him because of their human (Cheikh Si Hamza Boubakeur, “Traité Moderne de Théologie Islamique” . Paris, 1985, p. 127).