James wasn't "dismissed" from Parliament, as the King is not a member of Parliament. James and Parliament were in conflict over many different things.
The most important source of conflict was James's Catholic faith. James sought to pass laws that would make it legal for Catholics to hold public office in England and access other civil rights, but the English Protestant establishment strongly rejected these because they feared James was about to impose Catholicism by force. When Parliament and the population began to turn against him, the Protestant William of Orange, third in line to the English throne and also married to James's Protestant daughter Mary, used the opportunity to invade England. When it became clear that the army would not support him, James fled to Ireland, leaving the Parliament to declare that James had abdicated and William and Mary were joint monarchs of England.
Chat with our AI personalities
James II converted to Catholicism, and the British people wanted a Protestant monarch. However, they did not immediately decided to get rid of him as a monarch, and were willing to wait for one of his Protestant daughters to take the throne upon his death. When James had a son who would be raised Catholic, they decided to remove him and have his daughter Mary and her husband William take the throne.
The empty throne
The fleeing abroad of the Catholic King James II.
During the glorious revolution
William of Orange and James II's daughter, Mary.
King John had a number of children, one of whom succeeded him as King Henry III.