dissenting.
As I believe the trial court did not have subject matter jurisdiction under the Declaratory Judgment Act, I dissent.
*855A trial court only has subject matter jurisdiction under the Declaratory Judgment Act if “an actual controversy... existfs] at the time the pleadings [are] filed and at the time of [the] hearing.” Hammock v. Bencini, 98 N.C. App. 510, 512, 391 S.E.2d 210, 211 (1990). In addition, although a trial court has the power to determine the validity of a statute, it can do so only “when some specific provi-siones) thereof is challenged by a person who is directly and adversely affected” by the statute. Greensboro v. Wall, 247 N.C. 516, 519-20, 101 S.E.2d 413, 416 (1958). Thus, the “validity or invalidity of a statute, in whole or in part, is to be determined in respect of its adverse impact upon personal or property rights in a specific factual situation.” Id. at 520, 101 S.E.2d at 416. Consequently, an individual can challenge a statute only when he can show that “the enforcement of all or any of its provisions will result in an invasion or denial of [his] specific personal or property rights under the Constitution.” Id. at 522, 101 S.E.2d at 418.
In this case, an actual controversy existed between plaintiff and defendant at the time defendant filed his counterclaim seeking a declaratory judgment to determine the constitutionality of the Domestic Violence Act. After the trial court dismissed plaintiffs complaint on 13 December 1999, however, the issue raised in defendant’s counterclaim was necessarily terminated, as he was no longer adversely affected by the Domestic Violence Act. Accordingly, the trial court was without subject matter jurisdiction to entertain a claim under the Declaratory Judgment Act concerning the constitutionality of the Domestic Violence Act. I, therefore, would affirm the trial court in denying defendant’s counterclaim for a declaratory judgment.