Bastardy complaint. The child was begotten in Cumberland County in this State, where the defendant was resident and the complainant commorant. Before the child was born, the complainant, a minor, returned to her father’s house in New Hampshire and was there delivered. Afterwards, she came to Portland for the purpose, and made this complaint, but has had no residence in this State since the child was born. The complaint alleges her residence to be in Cumberland County.
After motion to dismiss the complaint for causes that will be considered later, the case went to tidal on the merits, presumably upon a plea of not guilty, although the record does not state that fact.
At the conclusion of the evidence, the defendant requested the court to rule that "the action could not be maintained.”
*287This is a civil action ; Mahoney v. Crowley, 36 Maine, 486 ; Smith v. Lint, 37 Maine, 546 ; Knowles v. Scribner, 57 Maine, 495 ; criminal in form, but not local. Dennett v. Kneeland, 6 Greenl. 460. It is to be brought in the county where the complainant resides. R. S., c. 97, § 3. The complaint shows jurisdiction of the court.
It is settled law, that a plea to the merits, in a civil transitory action, waives all matters of abatement. Webb v. Goddard, 46 Maine, 505; Demuth v. Cutler, 50 Maine, 298; Brown v. Webber, 6 Cush. 560; Thornton v. Leavitt, 63 Maine, 384.
In applying this rule, a distinction must be made between cases, over the subject matter of which the court has no jurisdiction, and cases of wrong venue or defective process. A prerequisite to a valid judgment is jurisdiction of the subject matter and of the persons of the parties, so that the "person and case may be rightly understood.”
In the case at bar, the complainant came within the jurisdiction of the court and attached the defendant, who voluntarily submitted the cause to the jury on its merits. The court had jurisdiction of the subject matter, and the parties went to trial. It is too late to object to the residence of the plaintiff. And, if it were not, the plaintiff’s residence seems sufficient. Alley v. Caspari, 80 Maine, 234; Peabody v. Hamilton, 106 Mass. 217.
In local actions, wrong venue may be pleaded in abatement or taken advantage of on trial, but can only be set up as a defense once. Cassidy v. Holbrook, 81 Maine, 589.
The defendant is a resident of this State. It would be unreasonable to hold that he was not amenable to our laws, because from distress, the complainant sought shelter in her father’s house, in another State, the only place for her to go, outside the alms-house.
Exceptions to the overruling of motions to quash in criminal cases do not lie. Stale v. Maher, 49 Maine, 569 ; State v. Hurley, 54 Maine, 563. In civil actions, they must be filed within the two first days of the return term. The motion in *288this case was not filed until the eighth day of the eighth term. For any defect in the complaint, it came too late. No other defect appears upon the record. The declaration, filed before trial, appears, plainly enough, to have been sworn to by her.
Exceptions overruled.
Peters, C. J., Walton, Libbet and Foster, JJ., concurred.