Ecclesiastes 1:1,2 “The words of the Teacher, son of David, king in Jerusalem: “Meaningless! Meaningless!” says the Teacher. “Utterly meaningless! Everything is meaningless.””
Solomon first refers to himself as ‘The Teacher’ or ‘The Preacher’(ESV). Then he mentions ‘son of David, king in Jerusalem’. His ‘primary identity’ is ‘The Teacher’ and he is no longer the humble young king who pleaded with God to:“Give your servant a discerning heart to govern your people and to distinguish between right and wrong.” (1 Kings 3:9)
After many years of famous people coming to him for his immense wisdom, Solomon has moved from an eager learner to an arrogant expert.
Solomon believes that God indeed has given to him “a wise and discerning heart, so that there has never been anyone like you, nor will there ever be.” 1 Kings 3:12
And so his conclusion; “Everything is meaningless”. Solomon has lost his perspective, lost his purpose in life and ultimately has lost his way.