
114 N.H. 392 (1974)
COLEBROOK WATER COMPANY
v.
COMMISSIONER OF DEPARTMENT OF PUBLIC WORKS AND HIGHWAYS OF THE STATE OF NEW HAMPSHIRE.
No. 6679.
Supreme Court of New Hampshire.
June 28, 1974.
*393 Hamblett, Kerrigan, LaTourette & Lopez and John P. Griffith (Mr. Griffith orally) for the plaintiff.
Warren B. Rudman, attorney general, and John C. Boeckeler, attorney (Mr. Boeckeler orally), for the defendant.
DUNCAN, J.
Plaintiff Colebrook Water Company was incorporated by Ch. 155, Laws of 1897 for the purposes of providing water for domestic and commercial use to the residents of Colebrook and for firefighting and other uses by the town. Id. § 1. By section 5 of this charter, the corporation was authorized to contract with the town for the provision of hydrants and water to the town, and the town was similarly authorized to contract with the company. Id. § 5.
By contract with the town dated October 5, 1903 the plaintiff undertook to establish a water works and distribution system, including hydrants; and the town agreed, inter alia, "that the expense of changing the original location of any of the hydrants or other fixtures when ordered by the Town shall be borne by said Town". At some time prior to 1960 the Main Street in Colebrook was incorporated by the State into the state highway system as part of U.S. Route 3. See Laws 1945, 188:1. Main Street thus ceased to be under the ownership and control of the town.
In 1960, and again in 1963, the State undertook to improve Main Street and in the process required the plaintiff to move some of its mains and hydrants at considerable cost to the plaintiff. In 1963 the company, claiming that the State should be bound by the reimbursement provision of the contract with the town sought reimbursement from the State. On rejection of this claim the plaintiff filed a bill of complaint against the State. The *394 State moved to dismiss on the ground that the State was not a party to the 1903 contract. The motion was denied, and the case proceeded to trial. On May 5, 1965, the petition was dismissed by the superior court for failure to state a cause of action in contract. RSA 491:8.
The case now transferred to this court arises from a petition for declaratory judgment (RSA 491:22) filed by the plaintiff in 1966 which in addition to relying upon the contract theory of the prior petition, alleges that the company "owned an interest in the land where its pipes and appurtenances lay by virtue of the [contract with the town]" and is entitled to compensation for the taking of this property interest and for the cost of relocation of the mains and hydrants.
The State moved to dismiss this second petition on alternative grounds (1) that the action is barred by res adjudicata and (2) that the plaintiff has no compensable interest in the public highway. See Opinion of the Justices, 101 N.H. 527, 132 A.2d 613 (1957). This motion was denied by Bownes, J. The State's exception was reserved and transferred to this court by Keller, C.J., upon an agreed statement of facts.
It appears from the agreed statement that the underlying facts and the relief sought are essentially the same in this and in the prior case. The only substantive difference between them is the addition in the present action of the allegations of a taking of the plaintiff's interest without compensation.
"`Having been defeated on the merits in one action, a plaintiff sometimes attempts another action seeking the same or approximately the same relief but adducing a different substantive-law premise or ground. This does not constitute the presentation of a new claim when the new premise or ground is related to the same transaction or series of transactions, and accordingly the second action should be held barred.' Restatement (Second) of Judgments § 61.1, Comment d (Tent. Draft No. 1, 1973)." Lougee v. Beres, 113 N.H. 712, 714, 313 A.2d 422, 424 (1973).
While the record is scanty as to how far the trial of the *395 first action progressed before dismissal, it is evident that the dismissal for failure to state a cause of action in contract was a dismissal on the merits. It is also apparent that no amendment, or transfer to this court was sought by the company. See Restatement (Second) of Judgments § 48, Comments a & d (Tent. Draft No. 1, 1973). A dismissal for failure to state a cause of action does not rest upon a purely procedural ground, but rather upon the conclusion of the trial judge that the cause alleged is without substantive merit. See Saylor v. Lindsley, 391 F.2d 965 (2d Cir. 1968); A. Vestal, Res Judicata/Preclusion V-105-06 (1969). Examples of purely procedural dismissals which do not bar a subsequent action are dismissals for improper venue, or misjoinder of parties, or for lack of capacity to sue. See F. James, Jr., Civil Procedure § 11.17 (1965); Restatement (Second) of Judgments § 48.1 (Tent. Draft No. 1, 1973). The basis for the oft-stated general rule that a prior judgment for defendant bars a subsequent action on the same claim is that "fairness to the defendant, and sound judicial administration, require that at some point litigation over the particular controversy come to an end." Restatement (Second) of Judgments § 48, Comment a (Tent. Draft No. 1, 1973); Williamson v. Columbia Gas & Elec. Co., 186 F.2d 464, 469 (3d Cir. 1950). This policy requires dismissal of the plaintiff's petition.
The foundation of the pending petition is the same contract which was adjudged in the prior action to furnish no cause of action against the State. If it can reasonably be thought that by now stating its claim in a different form, and relying for the first time upon an alleged "taking" by the State of an "interest in the land", the plaintiff in fact has stated a different cause of action, then this action should also have been dismissed upon the alternative ground advanced by the motion to dismiss.
The petition fails to allege any facts which would create an interest in the land. The asserted interest is alleged to have arisen "by virtue of the aforesaid contract between [the plaintiff] and the town of Colebrook". The agreed statement of facts shows that this contract purported to *396 grant no interest in the land (RSA 477:7), but at most was a license from the town to maintain the plaintiff's mains in the highway. Thus the plaintiff's claim for reimbursement for removal of the mains can be against the town only, as its licensor, and not against the State which was not a party to the contract. Mayor and City Council v. Brack, 175 Md. 615, 3 A.2d 471 (1939); see 25 Am. Jur. 2d Easements and Licenses § 3, and § 130, at 533 (1966).
"In the present case the effect of the requisition was to bring the contract to an end, not to keep it alive for the use of the Government". Omnia Co. v. United States, 261 U.S. 502, 513 (1923). The State incurred no liability to the town by reason of its assumption of control of the highway (City of Winooski v. State Highway Bd., 124 Vt. 496, 207 A.2d 255 (1965); 26 Am. Jur. 2d Eminent Domain § 178 (1966)) and the plaintiff's rights as licensee under the contract with the town could rise no higher than the right of its licensor. See Taylor v. Gerrish, 59 N.H. 569 (1880); United States v. 180.37 Acres of Land, 254 F. Supp. 209, 211 (W.D. Va. 1966).
We conclude that the motion should have been granted for the further reason that the petition fails to state a cause of action. In this no constitutional issue is perceived.
Petition dismissed.
GRIMES, J., dissented; GRIFFITH, J., did not sit; the others concurred.
GRIMES, J., dissenting:
Res judicata is a drastic device which precludes a party from litigating an essential issue and it should be applied with caution. McNellis v. First Fed. Sav. & Loan Ass'n, 364 F.2d 251, 257 (2d Cir. 1966). Our case law up to now has struck a fair balance between the rights of the plaintiff and defendant. When the second suit is on the same cause of action, the former judgment on the merits is a bar not only as to all matters that have actually been tried but also as to all matters that might have been tried.
*397 Where however the second suit is on a different cause of action, the former judgment on the merits is a bar only as to those matters which were actually tried and determined against the plaintiff. Metcalf v. Gilmore, 63 N.H. 174 (1884); Lovejoy v. Ashworth, 94 N.H. 8, 45 A.2d 218 (1946); Ainsworth v. Claremont, 108 N.H. 55, 226 A.2d 867 (1967); McGrath v. McGrath, 109 N.H. 312, 251 A.2d 336 (1969). This is a fair rule. A plaintiff ought to be required to fully try his cause of action at one hearing and he ought to be barred in a second and different cause of action only by determinations of issues which he has already litigated. He ought not be prevented, however, from litigating issues which are not necessarily included as part of his first action and which have not in fact been litigated.
Here it is agreed that plaintiff had certain contractual rights with respect to the hydrants. The prior action could not therefore have been dismissed on the basis that there was no such contract. The prior action was not decided on the merits but the trial judge, according to the agreed statement of facts, dismissed the action "for failure to state a cause of action in contract. RSA 491:8."
RSA 491:8 is the statute by which the State has waived its sovereign immunity as to actions "founded upon any express or implied contract with the state." Obviously the action was dismissed because of a failure to allege a contract "with the state" so as to bring it within the waiver of sovereign immunity. This is not a determination on the merits and therefore is no bar to another action even for the same cause under any rule. All reasonable doubt as to what was decided in the prior action should be resolved in favor of the plaintiff. McNellis v. First Fed. Sav. & Loan Ass'n, 364 F.2d 251 (2d Cir. 1966).
But even assuming that the prior decision was on the merits, it would not bar the present action because this is a different cause of action and no issue essential to it has been decided against the plaintiff. The previous action was based on contract but failed because the contract was not "with the state" and sovereign immunity prevented recovery. The present claim is not on the contract but rather *398 is for the taking of a property right created by the contract. The contract with the town gave the plaintiff an easement to maintain the hydrants and other fixtures in their original location unless the town paid the expense of moving them. This situation is different from that covered by Opinion of the Justices, 101 N.H. 527, 132 A.2d 613 (1957), where there was no such contract. The plaintiff, therefore, had a right which could not be taken without just compensation. Eaton v. B.C. & M. RR., 51 N.H. 504 (1872); Lynch v. United States, 292 U.S. 571 (1934); see Am. Jur. 2d Eminent Domain § 81 (1966). Sovereign immunity is no bar to this claim because the constitutional right to just compensation is self-executing and not dependent on waiver of sovereign immunity. N.H. Water Resources Bd. v. Pera, 108 N.H. 18, 226 A.2d 774 (1967). This is a claim which is certainly based on a different cause of action from the previous action and it is one which has never been litigated. Trans World Airlines, Inc. v. Hughes, 317 A.2d 114 (Del. Ch. 1974).
In a line of cases in this State the harsh rule of preclusion of issues not litigated and determined has not been applied where the second suit is for a different cause of action even though arising out of the same transaction. In Lovejoy v. Ashworth, 94 N.H. 8, 45 A.2d 218 (1946), in a suit on a foreign judgment on a note, the court held that a claim of equitable setoff based on deceit was not barred even though it arose out of the same transaction as the judgment sued on because it was a different cause of action and the issue had not in fact been determined in the former suit. In McGrath v. McGrath, 109 N.H. 312, 251 A.2d 336 (1969), a bill in equity to have a contract declared void because of fraud on incompetent parents was considered a different cause of action from a prior action in assumpsit which had been terminated in defendant's favor even though it arose out of the same transaction. The second action was barred only by collateral estoppel because the issues raised in the bill in equity had in fact been determined in the first action. Other examples of the application of this rule are found in Metcalf *399 v. Gilmore, 63 N.H. 174 (1884); Patey v. Peaslee, 101 N.H. 26, 131 A.2d 433 (1957), and Ainsworth v. Claremont, 108 N.H. 55, 226 A.2d 867 (1967).
It seems to me that the rule adopted by the court takes us back to the days when a plaintiff's rights were determined not on their merits but on technicalities. Thus, no second action can be brought arising out of the same transaction if the plaintiff misconceived his remedy in the first action and lost for that reason. This rule seems unnecessarily harsh to me and I oppose its adoption. It visits hardship upon the party whose lawyer fails to think of "all the aspects of all possible claims" against the defendant. F. James, Jr., Civil Procedure § 11.10, at 555-56 (1965); Cleary, Res Judicata Reexamined, 57 Yale L.J. 339 (1948).
I adhere therefore to the rule laid down in our aforementioned prior cases and to my dissent in Lougee v. Beres, 113 N.H. 712, 313 A.2d 422 (1973), and would hold, as the trial court did, that the plaintiff's present action is not barred.
