There are several curious things about that doctrine: first off it can't be found in the Bible anywhere, there are no passages that definitively state the doctrine. Protestants like to use 2 Timothy 3:16 "All Scripture is God-breathed and is useful for teaching, rebuking, correcting and training in righteousness, so that the man of God may be thoroughly equipped for every good work." That is very interesting to use that passage because of one thing - what scripture did Timothy refer to that he a Jew grew up with and learned - The Old Testament. The New Testament was not formed yet - the canon had not been established for what constituted the books to be contained in the New Testament.
Another question that one must ask is this: If the Bible is the only infallible and inerrant authority where did the Bible come from? Who determine what books were true and authentic faith, inspired by God? Did the Bible just drop down from the sky? How was one writing accepted and another rejected? By what authority is your Bible that your read arranged? Who determined the table of contents? Well the answer is simple, and a fact, and historical. The Catholic Church did. Not only that, the Church had the authority to do so because Jesus Christ gave it the authority.
So it is rather illogical to think that the Bible is infallible & inerrant but it came from a source that was not infallible or inerrant. For 1500+ years no one raised that issue of the authority of the Church. If you read the Early Church Fathers they, who in some cases where around before there was a New Testament affirm the Church's authority, again it was never in question prior to the Reformation.
Sola Fides "faith alone" - does not show up any where in scriptures definitively, unless you take St. Paul's writings of justification out of context. Interesting enough there is a place where faith alone does show up. St. James writes: "You see that faith was active along with his works, and faith was completed by the works. Thus the scripture was fulfilled that says, "Abraham believed God, and it was credited to him as righteousness," and he was called "the friend of God."See how a person is justified by works and not by faith alone.
In Romans and Galatians, the apostle Paul has this question in mind: How can a guilty sinner be justified by God? Essentially Paul answers that a sinner is justified by faith in Christ, and not by the merit of his works. That is what we mean by 'sola fide'.
In his letter, James deals with a different question altogether. There is a man who claims to have faith and who assents to the cardinal doctrines of the gospel, including the first, namely, the unity of God. Yet this person is devoid of good works and is full of hypocrisy, so much so, that he insults a poor beggar with pious words without giving him anything. So, says James, can this sort of faith save him? 'What does it profit, my brethren, if someone says he has faith but does not have works? Can faith save him?'
James is not asking whether a person is saved by faith plus the merit of his good works. He is asking about the kind of faith that saves. He mentions two types, the real and the counterfeit. Works distinguish one from the other: 'Show me your faith without your works; and I will show you my faith by my works.' Real faith is living, manifesting itself in good works; counterfeit faith is dead, barren, the mere assent to doctrine.
James asks, 'Can faith save him?' The answer is simply this: If it is real faith, manifest in good works, yes. But if it is a counterfeit 'faith', no, it cannot save him.
No contradiction exists between Paul and James. The apostle Paul insists that the man 'who does not work but believes' is justified by God. But that is not all. Elsewhere Paul describes the character of true faith - 'faith working through love'.
If you can't find that in your Bible it is because Martin Luther decided on his own canon as to which books were inspired and which were not. Since James did not support Luther's new line of theology, his book(letter) was removed along with others.
The way to eternal life is through Jesus Christ present in the sacramental life. It is through God's grace and the gift of His only begotten Son that we have any chance of eternal life. That is the economy of salvation.