Dan Bron is certainly correct (in his comments above) in pointing out that "schoolboy error" is associated in the first instance with errors typical of the ones that schoolboys make in class. Searches of Google Books yield seven matches for "schoolboy error[s]" between 1846 and 1867. All of them have the same general sense, and all are from British periodicals. The earliest is from a review of The Step-mother by G.P.R. James, in The Athenæum (April 11, 1846):
Such is the loose, rambling, incoherent, unmeaning style in which a popular novelist thinks fit to entertain (we dare say Mr. James would even call it instruct) the public! Anything that can fall from his pen is supposed to be, by virtue of its origin, good enough for the purpose; and Art is held altogether belo the necessities of a writer of so many books as Mr. James. We will not dwell, in the presence of these more serious charges, on mere grammatical slovenliness; such schoolboy errors were sure to follow in the train of a literary truancy like this. Nor will we dwell much upon the story itself—far more reprehensible than all the rest.
From "Barnes' Notes on the New Testament," in The Bible Review (October 1847):
Surely no expositor of the New Testament ought to be unfamiliar with the fact that the future participle is used to express the force of in order to in English. Did he forget Acts viii. 27, xxii. 5, &c., which he had already passed over? Now these are mere schoolboy errors, which strongly remind us of the feats of criticism which we performed, much to our own satisfaction, when, in the days of our boyhood, we murdered the Greek of Valpy's delectus.
From "Construction of Artillery," in The Civil Engineer and Architect's Journal (January 1857):
Again, at page 134, I do not say that Mv2, "the vis viva of recoil is transferred as a pressure against the interior of the breech," but that "the latter," namely, the recoil itself, is so transferred.
Charges of schoolboy errors ought not to be made upon readings so grossly careless and incorrect. It is not worth while, however, to pursue these remarks further. A critical reviewer fills a high office;—he is as a trustee between author and public: but he mistakes his office and abandons his trust, when, in place of regarding the main design of his author or its degree of fulfilment, he is occupied in showing the glitter of his own weapons, or in trying to pick holes in some miserable fragment disjointed from the entire.
From H.D. Garrison, "A Reviewer Reviewed," in The Eclectic Medical Journal (December 1858):
On page 518, occurs the following sentence: "The vast and rapid increase in the sale and use of extracts containing the essential qualities of medicinal plants, and the convenience of using them in place of the drug from which to manufacture syrups, infusions, etc. renders a work of the character of the one this doubtless was designed to be, very desirable." Besides the schoolboy error of using the singular verb "renders," as the predicate of the compound, (and hence plural) subject, "increase" and "convenience," the collocation of the words is such as to render the entire sentence exceedingly inelegant and ambiguous.
From "Books of the Quarter Suitable for Reading-Societies," in The National Review (April 1861):
Serbski Pesme; or National Songs of Servia. By Owen Meredith. Chapman and Hall.
However little accuracy as translations these English reproductions of Servian ballads may possess, they have beauty, spirit, and real fascination for a cultivated reader; that there may be schoolboy errors in the grammar even of the title itself, is a fault not likely to be offensively obvious to many English scholars.]
From "To Dishley Peters, Esq." in The Musical World (February 10, 1866):
To take his errors—for his they are—in detail, four of them most theorists have not thought necessary to register the rule against it, certain that everyone with a musical ear would recoil unwarned from its effect.
Enough of these schoolboy errors have been named to justify our views, or we might greatly extend their list; we regret to expose them and would far rather have left Mr. Oakeley to his insignificance, did not the Guardian boastfully announce that he has furnished, during several years, musical criticisms to that journal.
From a review of Henry Maudsley, "The Physiology and Pathology of the Mind," in The Saturday Review (May 25, 1867):
But a knowledge of Latin would appear to be requisite before one undertakes to translate Bacon's Instauratio, or to correct Mr. Spedding's version of that treatise. Mr. Spedding is a scholar, and knew the meaning of the term "radius" in the philosophical Latin of the sixteenth century; nor was he likely to fall into the schoolboy's error of translating "longius" "longer" (p. 29).
It follows that a "schoolboy error" was originally conceived of as the sort of mistake in writing, reasoning, or declaiming that a schoolboy was liable to make.