INTRODUCTION
This matter is before the Court on the defendant’s motion to dismiss pursuant to Mass.R.Civ.P. 12(b). The defendant, Duga, LLC d/b/a Tape Publishing (Duga) has entered a special appearance to contest jurisdiction. Duga contends the complaint should be dismissed because it involves the same subject matter as a prior pending action in the Chancery Court of Shelby County, Tennessee, and must be brought as a compulsory counterclaim in the Tennessee action. The plaintiff, Lex Corporation d/b/a New England Register Tape (Lex) opposes Duga’s motion to dismiss on the grounds that the Tennessee court lacks personal jurisdiction over Lex.
For the reasons discussed below, the defendant’s motion to dismiss is ALLOWED.1
BACKGROUND
The pleadings and affidavits present the following facts relevant to this motion. Lex is a Massachusetts corporation which designs, produces, and sells advertising on supermarket cash register tape to various local advertisers in Massachusetts and New Hampshire. Duga is a Tennessee corporation which prints and supplies the actual register tape containing the *610advertisements. In or about July 1996, Lex and Duga entered into a contract whereby Duga was to print advertisements supplied by Lex on register tape and then ship the finished tape to Lex’s customers in Massachusetts and New Hampshire by August 15, 1996. In or about December 18, 1996, Duga filed a breach of contract collection action against Lex in Tennessee. Lex appeared specially in Tennessee to contest whether the Tennessee court had personal jurisdiction over it. On or about May 14, 1997, the Tennessee court issued an order denying Lex’s motion to dismiss and directed Lex to answer Duga’s complaint within thirty days. Lex did not participate any further in the Tennessee action.
On or about May 8, 1997, Lex filed the present complaint in Middlesex Superior Court. In its complaint, Lex alleges counts of breach of contract (Count I) and breach of warranty (Count II) against Duga arising out of the aforementioned July 1996 contract between the parties. Duga appeared specially in this case, asking this Court to dismiss Lex’s complaint. Originally, Duga argued that there was a prior pending action regarding the same subject matter in Tennessee (namely, Duga’s action against Lex), and Lex was required to bring its claims as compulsory counterclaims in that action pursuant to Rule 13.01 of the Tennessee Rules of Civil Procedure. Since Duga’s motion was initially filed, however, the parties have informed the court that on or about July 11, 1997, a final default judgment has entered against Lex in the Tennessee action.
After oral argument on Duga’s motion to dismiss, I asked the parties for supplementary memoranda addressing two issues: (1) whether Lex, having appeared specially in Tennessee and having been unsuccessful on its claim of no personal jurisdiction, was obliged to pursue the personal jurisdiction issue by appeal in Tennessee, and is now barred from raising that issue collaterally here, see Restatement (Second) of Judgments, §81, comments c and e; and (2) if so, whether Lex may nonetheless pursue this action because the default judgment in Tennessee does not bar the assertion of claims which were never raised in that action. Both parties filed memoranda on these issues.2
DISCUSSION
When evaluating the sufficiency of a complaint pursuant to Mass.R.Civ.P. 12(b)(6), I must accept as true the well pleaded factual allegations of the complaint, as well as any reasonable inferences to be drawn from them in the plaintiffs favor. Eyal v. Helen Broadcasting Corp., 411 Mass. 426, 429 (1991), and cases cited. Any inferences drawn from a pleading should be “construed so as to do substantial justice.” Ourfalian v. Aro Manufacturing Co., 31 Mass.App.Ct. 294, 296 (1991), citing Nader v. Citron, 372 Mass. 96, 98 (1977) and Mass.R.Civ.P. 8(f). The “complaint should not be dismissed for failure to state a claim unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief.” Nader, supra at 98, quoting Conley v. Gibson, 355 U.S. 41, 45-46 (1957).
The first question is whether Lex, having appeared specially in Tennessee and having been unsuccessful on its claim of no personal jurisdiction, was required to pursue the personal jurisdiction issue by appeal in Tennessee and correspondingly precluded from raising the issue on a collateral basis in this case. Relying on Wayside Transp. Co. v. Marcell’s Motor Exp., Inc., 284 F.2d 868, 871 (1st Cir. 1960), I conclude that Lex is precluded from raising the personal jurisdiction issue collaterally in Massachusetts.
Lex had the election not to appear in Tennessee at all. Had Lex not appeared, and had the Tennessee court proceeded to final judgment against it in its absence, Lex could assert the issue of the Tennessee court’s jurisdiction over it here for the reason that it never had its day in court on that issue. Wayside Transp. Co., 284 F.2d at 871, and case cited. But Lex’s “special appearance in the [Tennessee] court shows that it elected to enter that court for the express purpose of litigating that court’s jurisdiction over its person." Id. Upon the Tennessee court’s finding of jurisdiction, however, Lex took no further steps in the Tennessee case, although it might have appealed. Rather, Lex chose to file suit in Massachusetts on the same contract.
An unappealed decision of a trial court, Federal or State, to the effect that the court has personal jurisdiction over the defendant "is res judicata as to that issue and a judgment rendered by that court cannot be collaterally attacked on the ground of lack of jurisdiction over the defendant’s person when sued upon in another [state] court.” Id. See Davis v. Davis, 305 U.S. 32, 40 (1938). “If such a judgment is res judicata for the purpose of suit upon it, clearly it must also be res judicata when interposed in defense of suit on the same cause of action in another jurisdiction by the judgment debtor against the one who obtained the judgment.” Id. Applying this reasoning to the present case (and using more terminology), I conclude that the Tennessee default judgment operates to preclude Lex from challenging the jurisdiction of the Tennessee court over it in the present case in Massachusetts: at least this is so in the absence of any showing or even suggestion of fraud in obtaining the judgment, something not argued here.
The next question is whether Lex may nonetheless pursue this action because the default judgment in Tennessee does not bar the assertion of claims which were never raised in that action. Principles of claim preclusion and Rule 13.01 of the Tennessee Rules of Civil Procedure regarding compulsory counterclaims lead to the conclusion that Lex’s current claims against Duga for breach of contract and breach of warranty should have been asserted as compulsory *611counterclaims in the Tennessee action, and hence are barred.
Tennessee, like Massachusetts, interprets the doctrine of res judicata, or claim preclusion, as barring a second suit between the same parties or their privies on the same cause of action with respect to all issues which were or could have been litigated in the former suit. See Richardson v. Tennessee Bd. of Dentistry, 913 S.W.2d 446, 459 (1995). See also Wright Machine Corp. v. Seaman-Andwall Corp., 364 Mass. 683, 688 (1974); Willett v. Webster, 337 Mass. 98, 102 (1958). “A defendant who may interpose a claim as a counterclaim in an action but fails to do so is precluded, after the rendition of a judgment in that action, from maintaining an action on the claim if the counterclaim is required to be interposed by a compulsory counterclaim statute or rule of court.” Restatement (Second) of Judgments, §22(2)(a). Rule 13.01 of the Tennessee Rules of Civil Procedure3 provides, with certain exceptions , that a pleading shall state as a counterclaim any claim the pleader has against an opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party’s claim.
In the present case, it is manifest that Lex’s breach of contract and breach of warranty claims, which both involve the sole contract between the parties, clearly arose out of the same transaction or occurrence that was the subject matter of Duga’s breach of contract collection claim in Tennessee. Thus, under Tenn.R.Civ.P. 13.01, Lex was required to interpose its current claims as compulsory counterclaims before the Tennessee court. The purpose of the compulsory counterclaim rule of court is “to prevent multiplicity of actions and to achieve resolution in a single lawsuit of all disputes arising out of common matters. Carteret Sav. & Loan Ass’n. v. Jackson, 812 F.2d 36, 38 (1st. Cir. 1987), citing Southern Construction Co. v. Pickard, 371 U.S. 57, 60 (1962).
In summary, since a final judgment has entered in Tennessee against Lex, principles of claim preclusion or res judicata prevent Lex from instituting the present action before this Court. Accordingly, Lex’s present claims, which would have been compulsory counterclaims in Tennessee, are barred.
ORDER
It is therefore ORDERED that the defendant’s motion to dismiss be ALLOWED.
Duga has captioned its motion generally as a motion to dismiss pursuant to Mass.R.Civ.P. 12(b), referring to various grounds for dismissal in its memorandum including Mass.R.Civ.P. 12(b)(9) (prior pending action); Rule 13 of the Tennessee Rules of Civil Procedure (compulsory counterclaim); and the Full Faith and Credit Clause of the United States Constitution.
Since the motion was filed, however, a final default judgment has entered against Lex in Tennessee and the parties have submitted supplemental memorandum addressing further issues. Therefore, I will treat this motion as a motion to dismiss pursuant to Mass.R.Civ.P. 12(b)(6) on the grounds of prior adjudication. Res judicata is most properly an affirmative defense to be raised by answer, but in certain circumstances can be presented in a rule 12(b)(6) context where all of the materials necessary for the decision are official records available to the judge ruling on the motion and not subject to dispute, and can be read together with the complaint. See Boyd v. Jamaica Plain Co-operative Bank, 7 Mass.App.Ct. 153, 157 n.7 (1979), and cases cited.
The parties did so on a timely basis, but unfortunately the memoranda were not sent to me until very late in 1998. The delay is unfortunate and regrettable, and certainly not of the parties’ doing.
Rule 13.01, concerning compulsory counterclaims, provides: “[A] pleading shall state as a counterclaim any claim, other than a tort claim, which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party’s claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction, except that a claim need not be stated as a counterclaim if at the time the action was commenced the claim was the subject of another pending action. This rule shall not be construed as requiring a counterclaim to be filed in any court whose jurisdiction is limited either as to subject matter or as to mandatory amount so as to be unable to entertain such counterclaim.”