INTRODUCTION
Plaintiffs have brought the above two cases which they concede involve the same issues.3 The first case, against the Building Commissioner, is an action for declaratory judgment brought by plaintiffs in Superior Court prior to a ruling by the Foxborough Zoning Board of Appeals. The second action, against the Zoning Board of Appeals, is an appeal to the Superior Court, pursuant to M.G.L.c. 40A, §17, following the Board’s subsequent ruling. The Board has moved to dismiss the two actions.
BACKGROUND
Plaintiffs purchased the property at issue in this case in 1991. Plaintiffs then applied to the Foxborough Zoning Board of Appeals for a variance to use the property as a six-family dwelling. On September 16, 1992, the date on which a public hearing regarding the plaintiffs’ application was pending, the plaintiffs filed the action in this court which seeks a declaratory judgment. They sought a judgment “ratifying the status of the subject property as a six-family dwelling.” Plaintiffs’ Opposition to Motion to Dismiss at 3.
On October 8, 1992, the Board denied the plaintiffs’ request for a variance. The Board’s decision was filed with the Foxborough town clerk the following day. On October 29, twenty days after the Board’s decision was filed with the town clerk, the plaintiffs filed a complaint in Norfolk Superior Court, thus initiating their appeal from the decision of the Board pursuant to G.L.c. 40A, §17. On November 9, thirty-one days after the filing of the Board’s opinion, the plaintiffs filed their complaint with the Foxborough town clerk. Chapter 40A, § 17 states that “[njotice of the action with a copy of the complaint shall be given to [the] town clerk so as to be received within . . . twenty days” of the Board’s decision.4
DISCUSSION
The Court, in resolving this motion to dismiss, relies on plaintiffs’ statement in their opposition brief (in the case against the Zoning Board of Appeals) that “[i]t is undisputed that the Foxborough Town Clerk received notice of the action and a copy of the Complaint on November 9, 1992.” Because it is necessary to consider this fact in order to resolve the instant motion, the Court, pursuant to Mass.R.Civ.P. 12(b), treats the motion to dismiss plaintiffs chapter 40A appeal as a summary judgment motion. By this statement, the plaintiffs admit that there is no factual dispute as to the tardiness of their notice to the town clerk.
Plaintiffs contend that filing notice and a copy of the complaint with the town clerk more than twenty days after the Board’s decision is not fatal to their appeal. In addition to being contrary to the plain language of the statute, this argument is also contrary to the case law.
Plaintiffs have cited several cases that treated procedural irregularities in the filing of c. 40A appeals as “nonfatal.” These cases are factually distinguishable from the instant case. For example, in Carr v. Bd. Of Appeals of Saugus, 361 Mass. 361 (1972), notice without a copy of the complaint was filed with the town clerk within twenty days. In the instant case, nothing was filed with the town clerk within twenty days. Similarly, McLaughlin v. Rockland Zoning Bd. of Appeals, 351 Mass. 678 (1967), permitted an appeal to proceed where the plaintiff had filed a copy of the complaint, but no notice, with the town clerk within the twenty days. Konover Management Corp. v. Planning Bd. of Auburn, 32 Mass.App.Ct. 319 (1992), was a unique factual situation where a mishap in delivery prevented the town clerk from receiving the papers but she had actual notice of the filing well within the twenty-day period. Here, there is no allegation of actual notice on the part of the town clerk.5
By contrast, the situation in O'Blenes v. Zoning Bd. of Appeals of Lynn, 397 Mass. 555 (1986), is very similar to that in the instant case. In O'Blenes, the plaintiff filed its notice of appeal with the town clerk after tweniy-one days. The Supreme Judicial Court held that the appeal was barred, even though the plaintiff had relied on erroneous information from the Board of Appeals about when the notice was due. Similarly, in Costello v. Bd. of Appeals of Lexington, 3 Mass.App.Ct. 441 (1975), the plaintiffs appeal was also barred when notice was received by the town clerk on the twenty-first day, though it was mailed on the twentieth. This is a procedural provision with which the appellate courts have required strict compliance. In the instant case, the plaintiffs have not met the twenty-day notice requirement of c. 40A, and their appeal is therefore barred.
The plaintiffs’ action for a declaratory judgment should similarly be dismissed. The Legislature, in c. 40A, §17, has enacted an explicit and adequate procedure for review of decisions of zoning boards of appeal. Allowing a party to obtain a declaratory judgment in Superior Court before the local zoning authority has had an opportunity to resolve the dispute would circumvent the entire statutory scheme. See, for example, Williams v. Secretary of the Executive Office of Human Services, 414 Mass. 551 (1993). Plaintiffs’ sole avenue for review of the Board’s deci*650sion was by a properly-filed appeal under c. 40A, §17. Accordingly, plaintiffs’ declaratory judgment action must cliso be dismissed.
Ordinarily, in a declaratory judgment action, even when a party is not entitled to the requested relief, the court should declare the rights of the parties, rather than allow a motion to dismiss. Connery v. Commissioner of Correction, 33 Mass.App.Ct. 253 (1992). This case, however, presents one of the few exceptions to that rule. Plaintiffs here are not entitled to a declaration of any kind because they seek to use declaratory judgment as a substitute for an otherwise specified and available administrative and judicial procedure. In any event, the issue is moot, as the Zoning Board of Appeals has acted and a properjudicial proceeding was commenced.
ORDER
The defendants’ motion to dismiss docket no. 92-2716, treated as a summary judgment motion pursuant to Mass.R.Civ.P. 12(b), and the defendant’s motion to dismiss docket no. 92-2327, are hereby ALLOWED.
For purposes of the hearing on these motions, these two cases have been consolidated.
Although the parties have variously referred to applications by plaintiffs for both a variance and a Special Use Permit, the October 1992 decision of the Zoning Board of Appeals addresses only a request for a variance. It is this decision which plaintiffs have appealed.
There is an allegation of actual notice to the Foxborough town counsel within the twenty-day period. But such notice is not sufficient to meet the requirements of c. 40A, § 17, which explicitly requires notice to the town clerk.
Irene E. Geary and Cynthia Mignault.