Protevangelium of James 1
1In the histories of the twelve tribes of Israel it is written that there was one Ioacim, exceeding rich: and he offered his gifts twofold, saying: That which is of my superfluity shall be for the whole people, and that which is for my forgiveness shall be for the Lord, for a propitiation unto me.
2Now the great day of the Lord drew nigh and the children of Israel offered their gifts. And Reuben stood over against him saying: It is not lawful for thee to offer thy gifts first, forasmuch as thou hast gotten no seed in Israel.
3And Ioacim was sore grieved, and went unto the record of the twelve tribes of the people, saying: I will look upon the record of the twelve tribes of Israel, whether I only have not gotten seed in Israel. And he searched, and found concerning all the righteous that they had raised up seed in Israel. And he remembered the patriarch Abraham, how in the last days God gave him a son, even Isaac.
4And Ioacim was sore grieved, and showed not himself to his wife, but betook himself into the wilderness, and pitched his tent there, and fasted forty days and forty nights, saying within himself: I will not go down either for meat or for drink until the Lord my God visit me, and my prayer shall be unto me meat and drink.