ものか・わけがない: the difference
ものかN2
Meaning
Definitely not, Absolutely not, Impossible, Do you really think~?
Past papers
Tested 2 times in past papers
Example
あんなひどいこと言われたんだ。平気なものか。
After the awful things he said? Of course I'm not OK.
わけがないN3
Meaning
There is no way, There is no reason, It is impossible, Cannot be
Past papers
Tested 2 times in past papers
Example
彼が嘘をつくわけがない。
There is no way he would lie.
How to tell them apart
「ものか」: anger, stubbornness and will: 「負けるものか」 (I won't lose!).
「わけがない」: objectively impossible from facts and logic: 「彼が犯人のわけがない」 (He can't be the culprit).
「はずがない」: the speaker is convinced it is impossible: 「鍵をかけたはずだ。泥棒が入るはずがない」 (I locked up, so a thief can't have got in).