Ubayy bin Kaab reported,

The Prophet ﷺ said, "Musa عليه السلام stood up to deliver a sermon to the Children of Israil. He was asked, 'Who is the most knowledgeable of people?' He answered, 'I am the most knowledgeable.' Allah reproached him for not referring the matter of knowledge back to Him, so Allah revealed to him that a servant of His at the junction of the two seas was more knowledgeable than him.Musa asked, 'My Lord, how can I reach him?'He was told, 'Carry a fish in a basket, and when you lose it, he will be there.'"He then mentioned the lengthy hadith about Musa's meeting with Khidr until he said, "The two of them set off walking along the seashore without a boat. A boat passed by them, and they spoke to its crew about taking them aboard. They recognized Khidr and carried them without charge. A sparrow then came and landed on the edge of the boat, dipping its beak into the sea once or twice. Khidr said, 'Musa, my knowledge and your knowledge compared to the knowledge of Allah is only like what this sparrow has taken from this sea.'"The hadith continues at length.

Azami 1253

Sahih

عن أبي بن كعب

عن النبي ﷺ قال: قام موسى عليه السلام خطيبا في بني إسرائيل فسئل: أي الناس أعلم؟ فقال: أنا أعلم، فعتب الله عليه، إذ لم يرد العلم إليه، فأوحى الله إليه: أن عبدا من عبادي بمجمع البحرين هو أعلم منك. قال: يا رب كيف به؟ فقيل له: احمل حوتا في مكتل فإذا فقدته فهو ثم. فذكر الحديث بطوله في اجتماعه بالخضر إلى أن قال: فانطلقا يمشيان على ساحل البحر، ليس لهما سفينة، فمرت بهما سفينة فكلموهم أن يحملوهما، فعرف الخضر فحملوهما بغير نول، فجاء عصفور فوقع على حرف السفينة فنقر نقرة أو نقرتين في البحر، فقال الخضر: يا موسى، ما نقص علمي وعلمك من علم الله إلا كنقرة هذا العصفور في هذا البحر الحديث بطوله.

الأعظمي 1253صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Warnings in matters of knowledge
Section
Discouragement from false claims regarding knowledge and the Quran
Numbering
Jami al-Kamil 1253 (2nd edition)
Azami 1253