15 All things have I seen in the days of my vanity: there is a just man that perisheth in his righteousness, and there is a wicked man that prolongeth his life in his wickedness. 16 Be not righteous over much; neither make thyself over wise: why shouldest thou destroy thyself ? 17 Be not over much wicked, neither be thou foolish: why shouldest thou die before thy time? 18 It is good that thou shouldest take hold of this; yea, also from this withdraw not thine hand: for he that feareth God shall come forth of them all.
We see that God in many different places in scripture requires people to do all his commandments, and to be perfect before him:
1 And when Abram was ninety years old and nine, the Lord appeared to Abram, and said unto him, I am the Almighty God; walk before me, and be thou perfect.
25 And it shall be our righteousness, if we observe to do all these commandments before the Lord our God, as he hath commanded us.
Deuteronomy 28 lists whole myriad of blessings and curses in cases of complete and partial obedience to God's commandments.
8 This book of the law shall not depart out of thy mouth; but thou shalt meditate therein day and night, that thou mayest observe to do according to all that is written therein: for then thou shalt make thy way prosperous, and then thou shalt have good success.
And at last even Solomon was blamed for not being perfect in 1 Kings 11:
4 For it came to pass, when Solomon was old, that his wives turned away his heart after other gods: and his heart was not perfect with the Lord his God, as was the heart of David his father.
What did then Solomon mean when he said to "be not righteous over much" and "be not over much wicked"? In order to be perfect, does that mean person must be excessive righteous?