Since these cases involve similar issues, they were consolidated for argument in this court.
Case No. S-90-333 is an action brought by Wats Marketing of America, Inc., in the nature of an action for a declaratory judgment declaring that the taxes assessed and levied against the personal property of the plaintiff in Douglas County, Nebraska, for the years 1982 through 1989 were wholly void.
Case No. S-90-334 is a similar action brought by First Data Resources Inc., for a judgment declaring that the taxes assessed and levied against the personal property of the plaintiff in Douglas County, Nebraska, for the years 1972 through 1989 were wholly void.
The defendants in each case are the Tax Commissioner of the State of Nebraska; the Department of Revenue of the State of Nebraska; the County of Douglas, Nebraska; and the County Treasurer of Douglas County, Nebraska.
All of the defendants filed demurrers. Each of the demurrers of the county defendants alleged that the trial court had no *254jurisdiction of the subject matter of the action and that the petition failed to state facts sufficient to constitute a cause of action. The demurrers of the State defendants included an additional allegation that there was a defect of parties defendant.
On March 9, 1990, the trial court sustained all of the demurrers and dismissed the petitions. From those judgments the plaintiffs have appealed.
At the time the original petitions in these cases were filed, Neb. Rev. Stat. § 77-1736.04 (Reissue 1986) provided for a refund of taxes which had been previously adjudged and determined to be illegal. The statute stated in part:
If, by judgment or final order of any court of competent jurisdiction in this state, in an action not pending on appeal or error, it has been or shall be adjudged and determined that any personal property or real estate tax, assessment, or penalty or any part thereof was illegal and such judgment or order has not been made or shall not be made in time to prevent the collection or payment of such tax, assessment, or penalty, then such tax, assessment, or penalty, whether expended or not, which has been collected pursuant to such illegal tax, assessment, or penalty for the year such tax, assessment, or penalty is determined to be illegal shall, without the necessity of filing a claim therefor, be repaid and refunded in the county where originally paid to the person paying such tax, assessment, or penalty. Where the tax, assessment, or penalty so declared illegal is applicable either throughout the state or in taxing districts beyond the geographic jurisdiction of the court making such declaration of illegality then, for the purpose of this section, a judgment or final order shall mean a judgment or final order of the Supreme Court____
Although the statute seems to contemplate an automatic refund of taxes which have been held to be illegal, we have held that a taxpayer may sue under the statute to obtain a declaration that taxes which have been paid were illegal. See Higgs v. Hall County, 184 Neb. 508, 168 N.W.2d 920 (1969).
In order to state a cause of action under § 77-1736.04, it must *255be alleged that the plaintiff has paid taxes which have been held to be illegal by a court of competent jurisdiction.
The plaintiffs’ amended petitions were filed in these cases on November 6, 1989. The petition in case No. S-90-334 alleged that First Data Resources had paid general personal property taxes to Douglas County for the taxable years 1972 through 1989, and the petition in case No. S-90-333 alleged that Wats Marketing had paid general personal property taxes to Douglas County for the taxable years 1982 through 1989. The petitions further alleged:
8. In Northern Natural Gas Co. v. State Board of Equalization . . . the Nebraska Supreme Court held that the state could not constitutionally tax the personal property of one taxpayer while exempting the personal property of other taxpayers.
9. The system of taxing personal property in Nebraska has resulted in the personal property of railroads, car line companies, associated railroad property, pipeline personal property, certain agricultural income producing machinery and equipment, business inventory, and certain household goods and other items of tangible personal property listed in Neb. Rev. Stat. §77-202 (Reissue 1988) escaping taxation.
10. The personal property taxes subject to this action are wholly void in that Plaintiff[s were] not subject to taxation and accordingly, there is no tax which the plaintiff[s] should in equity be bound to pay; alternately, the tax is wholly void in that it was assessed for an unlawful purpose; alternatively, under the holdings of Trailer-Train Car Co. v Leuenberger [and] Northern Natural Gas Co. v. State Board of Equalization [and] under the equal protection clause of the 14th Amendment to the U. S. Constitution, Article VIII, Section 1 of the Nebraska Constitution, and the equal protection clause of Article I, Section 1 of the Nebraska Constitution, the personal property taxes which are the subject of this action are wholly void and illegal in that such taxes are not assessed in compliance with provisions of the law imposed.
*256The plaintiffs prayed for judgments declaring the taxes assessed and levied against the personal property of the plaintiff First Data Resources for the years 1972 through 1989 and against Wats Marketing for the years 1982 through 1989 “are void, illegal and without force of law,” for costs, and for such other relief as the court deemed equitable and just.
The defendants argue that the judgments of the trial court should be affirmed because no court has held that the taxes assessed and levied against the property of the plaintiffs were illegal and the decisions referred to in the petitions of the plaintiffs dealt with issues of equalization, and since the property of the plaintiffs is locally assessed, the plaintiffs’ sole remedy was by protest to the county board of equalization. This argument is an incorrect characterization of the plaintiffs’ petitions.
Although the decisions referred to in the plaintiffs’ petitions did not involve the particular taxes which were assessed and levied against the property of the plaintiffs, the plaintiffs rely upon those decisions as establishing the legal basis for determining that the taxes assessed and levied against the property of the plaintiffs were illegal and void.
Any language in Northern Natural Gas Co. v. State Bd. of Equal., 232 Neb. 806, 443 N.W.2d 249 (1989), which might support the defendants’ argument that the plaintiffs’ cases are for equalization of their personal property’s value with that of other similarly situated personal property was specifically disapproved in MAPCO Ammonia Pipeline v. State Bd. of Equal., 238 Neb. 565, 471 N.W.2d 734 (1991). In the MAPCO decision, we stated the process of equalization cannot be applied to property that is not taxed. The plaintiffs’ personal property cannot be equalized with property that is exempt from taxation.
Since we determine that the judgments appealed from must be reversed as to some of the defendants in each case and the causes remanded for further proceedings, it is appropriate to note that in the event the plaintiffs prevail on the merits in their respective cases, they are not entitled to recover a refund for all of the years alleged in their petitions. Section 77-1736.04 provides for a refund only of tax paid during the year for which *257the tax is determined to be illegal. If the plaintiffs are successful in their cases, they will be entitled to a refund only of any illegal tax they paid in 1989. Furthermore, if the plaintiffs are successful in their separate actions under Neb. Rev. Stat. § 77-1735 (Reissue 1986), in which the plaintiffs requested refunds of taxes paid on November 23, 1988, and June 22, 1989, any taxes paid on June 22, 1989, cannot be refunded under both sections.
Neb. Rev. Stat. § 25-208 (Reissue 1989) provided in part:
In the absence of any other shorter applicable statute of limitátions, any action for the recovery of any excise or other tax, which has been collected under any statute of the State of Nebraska, which has been finally adjudged to be unconstitutional, shall be brought within one year after the final decision of the court declaring it to be unconstitutional.
Under § 25-208, the plaintiffs had the right to bring actions for a refund within 1 year or less after the decision in Northern Natural Gas Co., supra. The statute of limitations begins to run from the time the tax is paid, not from the time the illegality is judicially determined. Dorland v. City of Humboldt, 129 Neb. 477, 262 N.W. 22 (1935); Monteith v. Alpha High School District, 125 Neb. 665, 251 N.W. 661 (1933). Therefore, for taxes paid in 1989, the plaintiffs’ causes of action were brought within the time prescribed in the statute of limitations, but for taxes paid in years prior to 1989 the plaintiffs’ causes of action are barred by § 25-208.
With respect to the demurrers of the State defendants alleging a defect of parties defendant, the Department of Revenue and the defendant Boehm argue that the district court properly sustained their demurrers because the allegations of the amended petitions provided no basis for joining the Tax Commissioner or the Department of Revenue as party defendants to the action. We agree.
In order for a person to be a necessary party to a cause of action, it must appear that the person may be compelled to respond to the prayer of the plaintiff’s petition, and where there is nothing such person is called upon to do, or can be compelled to do as a duty, the person is not a necessary party. Mills v. *258Ehler, 407 Ill. 602, 95 N.E.2d 848 (1950).
The amended petitions in these cases establish that the plaintiffs are locally assessed taxpayers and their taxable property is subject to assessment and levy for tax purposes by the county in which their property is located. If the plaintiffs prevail on the merits in these cases, Boehm and the Department of Revenue cannot be compelled to respond to the relief sought by the plaintiffs. Under § 77-1736.04, it is the duty of the county treasurer to pay any refund due under this section.
The only references in the plaintiffs’ amended petitions to Boehm and the Department of Revenue are statements that “Boehm is the . . . Tax Commissioner . . . and is the chief executive officer of the Nebraska Department of Revenue” and that the “Department of Revenue is . . . responsible for executing faithfully the revenue laws of the State of Nebraska.” No relief was requested against Boehm or the Department of Revenue, and in the event the plaintiffs are successful in obtaining a declaration that the taxes assessed and levied against their personal property were void and illegal, Boehm and the Department of Revenue cannot be compelled to respond in any way. We conclude that the demurrers were properly sustained as to Boehm and the Department of Revenue.
Since the plaintiffs have a right to amend after a demurrer has been sustained, the judgments dismissing the petitions are reversed and the causes remanded for further proceedings.
Reversed and remanded for FURTHER PROCEEDINGS.
Caporale, J., not participating in the decision.