The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"Why in forest," etc.—This was a story told by the Master while dwelling at Jetavana, concerning the Captain of the Faith (Sāriputta). That elder, they say, when wicked folk came to him, such as hunters, fishermen and the like, laid down the moral law to them, and any others that he might see from time to time, saying, "Receive ye the law." Through respect for the elder, they could not disobey his words and accepted the law, but failed to keep it, and still followed each after his own business. The elder took counsel with his fellow-priests and said, "Sirs, these men receive the law from me, but keep it not."  They answered, "Holy Sir, you preach the law to them against their wishes, and as they dare not disobey what you tell them, they accept it. Henceforth lay not down the law to such as these." The elder was offended. On hearing of the incident they started a discussion in the Hall of Truth, how that the elder Sāriputta preached the law to any that he happened to see. The Master came and inquired what was the topic that the Brethren were debating in their assembly, and on hearing what it was, he said, "Not now only, Brethren, but formerly also he preached the law to any men he might chance to see, even though they did not ask for it." And herewith he told a story of the past.
Once upon a time when Brahmadatta reigned in Benares, the Bodhisatta was born and grew up in a brahmin household, and became the chief pupil of a world-famed teacher at Takkasilā. At that time this teacher preached the moral law to any one that he might see, fishermen and the like, even if they did not want it, repeatedly bidding them receive the law. But though they received it, they kept it not. The teacher spoke of it to his disciples. His disciples said, "Holy Sir, you preach to them against their wishes, and therefore they break the law. Henceforth preach only to those who wish to hear you, and not to those who do not wish." The teacher was filled with regret, but even so he still laid down the law to all whom he happened to see.
Now one day some people came from a certain village and invited the teacher to partake of the cakes offered to brahmins. He summoned his disciple named Kāraṇḍiya and said, "My dear son, I am not going, but you are to go there with these five hundred disciples, and receive the cakes, and bring the portion that falls to my share." So he sent him. The disciple went, and as he was returning, he spied on the road a cave, and the thought struck him, "Our master lays down the law, without being asked, to all that he sees. Henceforth I will cause him to preach only to those that wish to hear him."  And while the other disciples were comfortably seated,
he arose and picking up a huge stone, flung it into the cave, and again and again repeated the action. Then the disciples stood up and said, "Sir, what are you doing?" Kāraṇḍiya said not a word. And they went in haste and told their master. The master. came and in conversing with Kāraṇḍiya repeated the first stanza:—
Seizing oft a mighty stone,
Didst thou hurl it with a will,
Mountain cave as ’twere to fill?
On hearing his words, Kāraṇḍiya to rouse his master uttered the second stanza:—
Smooth as palm of human hand:
Thus I level knoll and hill
And with stones each hollow fill.
The brahmin, on hearing this, repeated the third stanza:—
Has the power to level earth.
Scarce Kāraṇḍiya can hope
With a single cave to cope.
 The disciple, on hearing this, spoke the fourth stanza:—
Has no power to level earth,
Heretics may well refuse,
Brahmin, to adopt thy views.
On hearing this the teacher made an appropriate reply. For he now recognized that other men might differ from him, and thinking, "I will no longer act thus," he uttered the fifth stanza:-
For my good thou dost exhort:
Earth can never levelled be,
Neither can all men agree.
Thus did the teacher sing the praises of his disciple. And he, after he had thus admonished his teacher, conducted him home.
 The Master, having ended this lesson, identified the Birth: "At that time Sāriputta was the brahmin, and I myself was the disciple Kāraṇḍiya."