If all these <attributes> are within you, you are able to swear; but if not, you are not permitted to swear. There is a story about King Yannai, who had two thousand towns on the King's Mountain, and all of them were destroyed on account of a true oath. How so? A person would say to his fellow with an oath, "I am going and will eat such-and-such in such-and-such a place, and I will drink such-and-such in such-and-such a place." And they would go and fulfill their oath, and they were destroyed. Now if this is what happens to one who swears truthfully, then as for one who swears falsely, how much more so!
King Yannai and the Towns Destroyed Over a True Oath
Midrash Tanchuma Buber, Matot 1:3
אם יש בך כל הללו אתה יכול להשבע, ואם לאו אין אתה רשאי להשבע, מעשה (בהר) [בינאי] המלך אשר היה לו שני אלפים עיירות בהר המלך, וכולן נחרבו על שבועת אמת, כיצד אדם אומר לחבירו בשבועה שאני הולך ואוכל כך וכך במקום פלוני, ואשתה כך וכך במקום פלוני, והיו הולכין ומקיימין את שבועתם ונחרבו, ומה הנשבע באמת כך, הנשבע לשקר על אחת כמה וכמה.