Genesis 21: 29-31.
And Avimelech said to Abraham, "What are these seven ewe lambs, which you have placed by themselves?" And he said, "For these seven ewe lambs you shall take from my hand, in order that it be to me for a witness that I dug this well." Therefore, he named that place Beersheva, for there they both swore.
כט. וַיֹּאמֶר אֲבִימֶלֶךְ אֶל אַבְרָהָם מָה הֵנָּה שֶׁבַע כְּבָשֹׂת הָאֵלֶּה אֲשֶׁר הִצַּבְתָּ לְבַדָּנָה
ל. וַיֹּאמֶר כִּי אֶת שֶׁבַע כְּבָשֹׂת תִּקַּח מִיָּדִי בַּעֲבוּר תִּהְיֶה לִּי לְעֵדָה כִּי חָפַרְתִּי אֶת הַבְּאֵר הַזֹּאת
לא. עַל כֵּן קָרָא לַמָּקוֹם הַהוּא בְּאֵר שָׁבַע כִּי שָׁם נִשְׁבְּעוּ שְׁנֵיהֶם
There's a bit of a pun there, since the word "sheva" relates to both the seven lambs and to the oath. Regardless, the Torah states that Abraham was responsible for the name of the place.
A few chapters later we have Isaac in the starring role. After some quarreling over water rights, Isaac goes to Beersheva (so named - anachronistically? - in 26:23) and Avimelech meets him there to make a covenant.
And he [Isaac] named it Shevah; therefore, the city is named Beersheva until this very day.This time, Beersheva clearly refers to an "oath at the well".
לג. וַיִּקְרָא אֹתָהּ שִׁבְעָה עַל כֵּן שֵׁם הָעִיר בְּאֵר שֶׁבַע עַד הַיּוֹם הַזֶּה
Each passage claims a different personality as being responsible for the naming of the city. One explanation from the traditionalist camp suggests that Isaac simply reconfirmed a name already given - and possibly forgotten - by his father, Abraham. A very unsatisfying answer that smacks of apologetics. It seems obvious that this is not the intention of the verses. I have highlighted the "therefore" (עַל כֵּן) in both passages since each one states an explicit reason for the origin of the name.
So why isn't Rashi "bothered" by this?
Needless to say, Bible critics love this one.