This is a declaratory judgment action brought by the Attorney General for the County Assessor of Los Alamos County against the State Tax Commission and the commissioners thereof. By it the Assessor questions the constitutionality of § 72-1-13, N.M.S.A.1953 Comp., which had been amended by ch. 304, N.M.S.L.1967. The amendment added the sentence italicized below so that the pertinent portion of the section now reads as follows :
“72-1-13. Soldiers’ exemption — Real and personal property. — Real and personal property, including the community or joint property of husband and wife, of every soldier shall be exempt from taxation in the sum of two thousand dollars ($2,000). The exemption, pursuant to this section, shall he allowed against the assessed valuation of the property against which the exemption is claimed. Where both the husband and wife are soldiers as defined by this act each shall be entitled to assert the full amount of their respective exemptions. * * *”
The Assessor had received a letter from the Tax Commission dated May 2, 1967, advising him of the amendment of § 72-1-13, supra, and instructing him to allow the soldiers’ exemption against the assessed valuation and to correct any exemption that might have been granted against the market value.
The complaint alleges that the amendment above set forth was unconstitutional in that it violated Art. VIII, § 5 of the New Mexico Constitution which required that the exemption be deducted from the actual value of the property rather than the assessed valuation. In addition, it is alleged that § 72-1-11, N.M.S.A.1953, Comp., as amended by ch. 42, N.M.S.L.1967, violated Art. VIII, § 5, supra, because it restricted the allowance of the exemption to veterans with at least 90 days active duty who had been residents prior to certain dates, whereas the constitution had no such requirements. The complaint also sets forth in the alternative that § 72-1-11, supra, as so amended, was arbitrary and discriminatory and in violation of Art. II, § 18 of the New Mexico Constitution and in violation of the Fourteenth Amendment to the Constitution of the United States.
The complaint states that an actual controversy exists and that the Tax Commission, pursuant to its supervisory powers over the assessment and tax laws of New Mexico, will force relator (the Assessor) to wrongfully apply the exemption to the assessed valuation instead of the actual value of veterans’ property in Los Alamos County, and will prohibit his granting the exemption to all bona fide resident veterans as required by Art. VIII, § 5, supra.
After an answer was filed by the Tax Commission, the New Mexico United Veterans Council intervened on the side of the Commission to the extent of the constitutional issues, and the Veterans for Equalization of Taxes intervened on the side of the Assessor. Thereafter, and on June 20, 1968, the Assessor amended his complaint to add that ch. 304, supra, also violated Art. VIII, § 1 of the New Mexico Constitution, in that the allowance of the exemption against the assessed value of the property would result in levying taxes upon tangible property not in proportion to the value thereof and that the taxes imposed would neither be equal nor uniform upon subjects of the same class. The intervenors’ pleadings were similar to those of the parties they joined, except that the Veterans for Equalization of Taxes, by amendment, alleged that ch. 304, supra, also violated Art. IV, § 26 of the New Mexico Constitution, which prohibits the granting of privileges and immunities.
The Commission’s answer to both the Assessor’s complaint and the complaint of the intervenor, Veterans for Equalization of Taxes, denied the constitutional violations, and, in addition, set up separate ju*31risdictional defenses which included the claim that the plaintiff and the intervenor had no standing to sue and that their complaints presented no justiciable issue or controversy. Although these affirmative defenses were not pressed before the trial court, they were set forth in the Tax Commission’s requested findings and conclusions. The trial court concluded that it had jurisdiction and that an actual controversy existed because the Assessor was being required to do an unconstitutional act, and that the defense of sovereign immunity was not applicable under the circumstances of this declaratory judgment proceeding.
The judgment of the trial court was in two parts: First, that the 1967 amendment allowing the exemption against the assessed value was unconstitutional, but that this was a severable provision from the rest of the act .which was constitutional; and second, that § 72-1-11, supra, which set forth the resident and active duty requirements was a reasonable legislative implementation and was constitutional. The Tax Commission and the United Veterans appealed from the first part of the judgment, and the Assessor and the Veterans for Equalization of Taxes cross-appealed from the second part.
Although it has not been urged upon us, nor covered in the briefs, we cannot ignore jurisdictional questions. There must be an “actual controversy” before jurisdiction is obtained under § 22-6-1, N.M.S.A.1953 Comp. American Linen Supply of N. M., Inc. v. City of Las Cruces, 73 N.M. 30, 385 P.2d 359 (1963). Jurisdiction of the subject matter cannot be conferred by consent of the parties, much less waived by them. Public Service Co. of N.M. v. Wolf, 78 N.M. 221, 430 P.2d 379 (1967) ; Martinez v. Research Park, Inc., 75 N.M. 672, 410 P.2d 200 (1965). Absent jurisdiction over the parties or absent the power or authority to decide the particular matter presented, and the lack of any essential element is just as fatal to the judgment. Elwess v. Elwess, 73 N.M. 400, 389 P.2d 7 (1964) ; Bernstein v. Bernstein, 73 N.M. 365, 388 P.2d 187 (1964). If sensed by the court, even though not raised by the parties, the question of jurisdiction compels an answer. State v. Morris, 69 N.M. 89, 364 P.2d 348 (1961) ; William K. Warren Foundation v. Barnes, 67 N.M. 187, 354 P.2d 126 (1960) ; Taos County Board of Education v. Sedillo, 44 N.M. 300, 101 P.2d 1027 (1940).
In Sedillo, supra, we pointed out that there must be a real and not a theoretical question, and the party raising it must have a real interest in the question before a declaratory judgment action will lie.
Here the plaintiff is the County Assessor whose duty it is to assess the property and to allow the exemption based upon evidence submitted by the veteran. Sections 72-1-14 to 72-1-16, N.M.S.A. 1953 Comp. The Assessor has no personal stake in the matter. He is under the direction of the State Tax Commission, a superior office. § 72-6-12, N.M.S.A.1953 Comp. The Assessor has no duty to protect taxpayers or veterans against wrongful discrimination. He cannot represent their interests. Board of County Commissioners, etc. v. Hubbell, 28 N.M. 634, 216 P. 496 (1923); See also Tadlock v. Smith, 38 N.M. 288, 31 P.2d 708 (1934). He is not a proper party to represent other persons under Rule 17 of the Rules of Civil Procedure (§ 21-1-1(17). N.M.S.A.1953 Comp.). State Farm Mutual Automobile Ins. Co. v. Foundation Reserve Insurance Company, Inc., 78 N.M. 359, 431 P.2d 737 (1967).
The general rule is that a public officer as such does not have such an interest as would entitle him to question the constitutionality of a statute so as to refuse to comply with its provisions. 16 Am.Jur. Constitutional Law § 128, where it is also said:
“If the duty to act devolves on a superi- or officer who directs one of his subordinates to perform the act, the general rule is that such subordinate may not in effect review the decision and order of his superior and refuse to act merely on the ground that the law is unconstitu*32tional. Under such circumstances, the superior, and not the subordinate, is responsible for the official act in question.”
We have held that the unconstitutionality of a statute cannot be raised as a defense to a mandamus action against a public officer unless there is a showing that the officer will be injured or jeopardized by the operation of the enactment. Hutcheson v. Gonzales, 41 N.M. 474, 71 P. 2d 140 (1937). See also State ex rel. Davidson v. Sedillo, 34 N.M. 1, 275 P. 765 (1929), in which we held that a county treasurer could not question the constitutionality of an act affecting his office unless it had been previously declared unconstitutional by a court of competent jurisdiction. Here there is no allegation or finding that the Assessor will be injured or jeopardized by the questioned laws, the general administration of which is in the defendant. The State Tax Commission has the duty to direct the Assessor as to his duties under the law (§ 72-6-12(2), N.M.S.A.1953 Comp.). The responsibility lies with the Commission, not the Assessor. Nor does the fact that the action was brought by the Attorney General create a cause of action. Asplund v. Hannett, 31 N.M. 641, 249 P. 1074, 58 A.L.R. 573 (1926); Hutcheson v. Gonzales, supra; State ex rel. Capitol Addition Bldg. Commission v. Connelly, 39 N.M. 312, 46 P.2d 1097 (1935).
The standing of the Assessor to bring a similar action was not questioned or noted by this court in Flaska v. State, 51 N.M. 13, 177 P.2d 174 (1946). It would have been just as pertinent there. Under such circumstances, it cannot be deemed stare decisis upon the proposition that a justiciable controversy was present. Taos County Board of Education v. Sedillo, supra.
The plaintiff-intervenor, Veterans for Equalization of Taxes, has alleged that it is an unincorporated association made up of veteran taxpayers, some of whom are entitled to the exemption and some of whom are not. All are interested in the welfare of the state, a sound tax basis, and in the equal assessing and levying of taxes. If any of the members have been injured or their rights jeopardized, it is not so alleged; nor would it seem that an action for any personal injury as required for their standing in court could be brought by an association purporting to represent such varied interests. Certainly the members are not similarly situated within the meaning of Rule 23 of the Rules of Civil Procedure (§ 21-1-1(23), N.M.S.A.1953 Comp.), as adequate representation in behalf of those entitled to the exemption would conflict with the interests of those who were not. Since it is not a legal entity, its right to bring an action could only be permitted itnder Rule 23, supra. 67 C.J.S. Parties § 4.
In Asplund v. Alarid, 29 N.M. 129, 219 P. 786 (1923), Mr. Asplund, as a taxpayer and in behalf of himself and others similarly situated, brought an action to enjoin the assessor and the treasurer of Santa Fe County from giving effect to ch. 130, N.M.S.L.1923, which is the same soldiers’ exemption law with which we are now concerned as originally enacted (§ 72-1-13, N.M.S.A.1953 Comp., see history note). There it was contended that the statute violated Art. IV, § 32 of the New Mexico Constitution because it was retroactive, and that because it discriminated between resident and nonresident taxpayers it violated the federal Constitution. As to the latter contention, this court said:
“In view of the fact that there is no nonresident taxpayer before us, claiming the impairment of his constitutional rights, if any he might have in this particular, we do not feel justified in giving any consideration to the question, preferring to leave a determination of that matter until such time as it shall be brought before us by some one qualified to raise the point. It is not the duty of this or any other court to sit in judgment upon the action of the legislative *33branch of the government, except when the question is presented by a litigant claiming to be adversely affected by the legislative act on the particular ground complained of.”
There must be an invasion of some private right of the complaining party before he has standing to sue. Tomlin v. Town of Las Cruces, 38 N.M. 247, 31 P.2d 258, 97 A.L.R. 185 (1934); Kuhn v. Burroughs, 66 N.M. 61, 342 P.2d 1086 (1959). Only a person whose rights have been adversely affected has a right to attack the constitutionality of an act of the legislature. State ex rel. Sanchez v. Stapleton, 48 N.M. 463, 152 P.2d 877 (1944); Patton v. Fortuna Corporation, 68 N.M. 40, 357 P.2d 1090 (1960).
In Asplund v. Hannett, supra, we said: “In our scheme of government, the function of the courts is to declare and apply the law in the decision of justiciable controversies. We are not placed over the other departments of government, generally, to review or interfere with their acts, as the special guardian of the Constitution. Ours is the judicial power. In the exercise of that power- — the hearing and determination of causes of action — we necessary [sic] enforce the supremacy of the Constitution and disregard all enactments and proceedings violative of it. That is the beginning and the end of the much discussed and misunderstood power of the courts to declare the unconstitutionality of statutes.” (31 N.M. at 647, 249 P. at 1076).
Hannett, supra, was a suit brought by a taxpayer to enjoin the governor and other state officers from enforcing a law which the plaintiff claimed was unconstitutional. We wrote an opinion holding the act complained of unconstitutional. Pending a rehearing, however, the attorney general filed a motion to dismiss on the grounds that the taxpayer plaintiff had no standing to sue. We granted the motion and withdrew our opinion. A few years later, in State ex rel. Yeo v. Ulibarri, 34 N.M. 184, 279 P. 509 (1929), we upheld the constitutionality of the same act when we considered it less academically in litigation brought by a party with a real interest.
As desirable as it may be to have our opinion on questions of public importance as soon as possible, it is always dangerous to “function in the abstract.” Borchard on Declaratory Judgments at 34 and 35 (2d ed. 1941). We must avoid “ill-defined controversies over constitutional issues.” United Public Workers of America v. Mitchell, 330 U.S. 75, 67 S.Ct. 556, 91 L.Ed. 754 (1947). The “gist of the question of standing” is whether the party seeking relief has “alleged such personal stake in the outcome of the controversy as to assure the concrete adverseness which sharpens the presentation of issues upon which the court so largely depends for illumination of difficult constitutional questions.” Baker v. Carr, 369 U.S. 186, 204, 82 S.Ct. 691, 7 L.Ed.2d 663 (1962). Compare Flast v. Cohen, 392 U.S. 83, 88 S.Ct. 1942, 20 L.Ed.2d 947 (1968); and Protestants and Other Americans, etc., et al. v. Watson, 407 F.2d 1264 (D.C.Cir.1968). Although a determination of what constitutes the necessary personal stake depends as much on the issues involved as on the parties plaintiff, here the required nexus is not present; nor do we believe that either the plaintiff or the intervenor could allege by amendments to their complaints the “personal stake” required.
Having found that no actual controversy within the meaning of § 22-6-1, supra, was presented, the trial court had no jurisdiction to decide the constitutional questions involved, nor can we decide them. Neither do we consider it necessary to determine the matters raised by the cross-appeal. The case will be remanded for the dismissal of the action.
It is so ordered.
MOISE, COMPTON, JJ., and WALDO SPIESS, J., Ct. App., and GERALD D. FOWLIE, J., D. C., concur.