In ancient times, there was a man who sold spears and shields. He used to boast, "My spears are the sharpest things in the world. They can penetrate anything." A moment later he would boast, "My shields are the toughest things in the world. Nothing can penetrate them." One day, a passerby asked him: "What would happen if you threw one of your spears at one of your shields?"
This idiom, "contradicting oneself", and the noun 矛盾, contradiction, all came from the above story.