What is written above on this matter? "And Jacob came whole" (Genesis 33:18). He came from Paddan-Aram under the conditions that the Holy One, blessed be He, had stipulated with him; He had not diminished him in anything. What did Jacob do? He began to open up marketplaces. The Holy One, blessed be He, said to him: "That which you vowed before Me you have forgotten. Did you not speak thus, 'If God will be with me' (Genesis 28:20) — that I will not serve idolatry; 'and will keep me' (ibid.) — from the shedding of blood; 'on this way' (ibid.) — from sexual immorality, as it is said, 'Such is the way of an adulteress: she eats and wipes her mouth and says, I have done no wrong' (Proverbs 30:20)." The Holy One, blessed be He, kept him, for thus He says, "And I will keep you in all that you go" (Genesis 28:15). Jacob said: "If You keep me from all these things, of all that You give me I will surely tithe it to You" (Genesis 28:22). When he came to the land he forgot that vow. The Holy One, blessed be He, said: "By your life! By those very things concerning which you said that I should keep you, in them you shall stumble." Idolatry — from where? As it is said, "And they gave to Jacob all the foreign gods that were in their hand," etc. (Genesis 35:4). Shedding of blood — from where? As it is said, "And two of Jacob's sons, Simeon and Levi, Dinah's brothers, took each man his sword," etc. (Genesis 34:25). Sexual immorality — from where? From Dinah, as it is said, "And Shechem son of Hamor saw her, and his soul clung to Dinah daughter of Jacob" (Genesis 34:2-3). Rabbi Abbahu said: We have learned matters from a putrid drop. Pharaoh said to Joseph, "I am Pharaoh" (Genesis 41:44) — "I have said that you shall be king." The Holy One, blessed be He, said to Israel: For each and every commandment that they perform, "I am the LORD" — I who am destined to pay to each and every one the reward of his recompense. And if flesh and blood who said "I am Pharaoh" raised him up to all greatness, I who have said over each and every commandment "I am the LORD" — how much more so! And similarly you say, "Only by the throne will I be greater than you" (Genesis 41:40). The Holy One, blessed be He, said to Israel, "And you shall be only above" (Deuteronomy 28:13). And if the "only" of flesh and blood thus magnified Joseph, the "only" of the Holy One, blessed be He — how much more so!
Jacob's Forgotten Vow and the Three Sins at Shechem
Midrash Tanchuma Buber, Vayishlach 20:1
מה כתיב למעלה מן הענין ויבא יעקב שלם (בראשית לג יח). בא מפדן אדם בתנאין שהתנה עמו הקב"ה לא חיסרו כלום, מה עשה יעקב, התחיל פותח איטליסין, א"ל הקב"ה שנדרת לפני שכחת, ולא כך אמרת אם יהיה אלהים עמדי (שם כח כ) שלא אעבוד עבודה זרה, ושמרני (שם), משפיכות דמים, בדרך הזה (שם) מגילוי עריות, שנאמר כן דרך אשה מנאפת אכלה ומחתה פיה ואמרה לא פעלתי און (משלי ל כ), שמרו הקב"ה, שכן הוא אומר, ושמרתיך בכל אשר תלך (בראשית כח טו), אמר יעקב אם שמרתני מכל הדברים הללו, כל אשר תתן לי עשר אעשרנו לך (שם שם כב) כיון שבא לארץ שכח אותו נדר, אמר הקב"ה חייך באותן הדברים שאמרת לשמרך בהם אתה נכשל בע"ז, מנין שנאמר ויתנו אל יעקב את כל אלהי הנכר אשר בידם וגו' (שם לה ד). בשפיכות דמים מנין, שנאמר ויקחו שני בני יעקב שמעון ולוי אחי דינה איש חרבו וגו' (שם לד כה), בגילוי עריות מנין, מדינה, שנאמר וירא אותה שכם בן חמור ותדבק נפשו בדינה בת יעקב, אמר ר' אבהו למדנו דברים מליחה סרוחה, פרעה אמר ליוסף אני פרעה (שם מא מד), אני אמרתי שתהא מלך, אמר הקב"ה לישראל על כל מצוה ומצוה שעושין אני ה', אני שעתיד לשלם לכל אחד ואחד מתן שכרו, ומה בשר ודם שאמר אני פרעה, העלה אותו לכל הגדולה, אני שאמרתי על כל מצוה ומצוה אני ה' על אחת כמה וכמה, וכיוצא בדבר אתה אומר רק הכסא אגדל ממך (שם שם מ), אמר הקב"ה לישראל והיית רק למעלה (דברים כח יג), ומה רק של בשר ודם כך גידל את יוסף, רק של הקב"ה על אחת כמה וכמה.