
575 N.W.2d 399 (1998)
254 Neb. 219
Christine L. RICE, formerly known as Christine L. Hitzemann, Appellant,
v.
George M. ADAM, M.D., and Mary Lanning Memorial Hospital, Appellees.
No. S-96-899.
Supreme Court of Nebraska.
March 13, 1998.
*401 Daniel J. Thayer, of Lauritsen, Brownell, Brostrom, Stehlik & Thayer, Grand Island, for appellant.
Mark E. Novotny, of Kennedy, Holland, DeLacy & Svoboda, Omaha, for appellee Adam.
Robert W. Wagoner, Grand Island, for appellee Hospital.
WHITE, C.J., and CAPORALE, WRIGHT, GERRARD, STEPHAN, and McCORMACK, JJ.
WRIGHT, Justice.

NATURE OF CASE
Prior to commencing this malpractice action against the defendants, George M. Adam, M.D., and Mary Lanning Memorial Hospital, the plaintiff, Christine L. Rice, formerly known as Christine L. Hitzemann, filed a chapter 7 bankruptcy which was still *402 pending when Hitzemann commenced this action. The district court sustained the defendants' motion for summary judgment, finding that Hitzemann was not the real party in interest.

SCOPE OF REVIEW
The determination of a jurisdictional issue which does not involve a factual dispute is a matter of law which requires an appellate court to reach its conclusions independent from a trial court. State v. Gibbs, 253 Neb. 241, 570 N.W.2d 326 (1997).
The decision whether to allow or deny an amendment to any pleading lies within the discretion of the court to which application is made. Darrah v. Bryan Memorial Hosp., 253 Neb. 710, 571 N.W.2d 783 (1998).

FACTS
The plaintiff-appellant in this case is Christine L. Rice, who was formerly known as Christine L. Hitzemann. Because the briefs filed herein refer to the plaintiff as Hitzemann, we shall do so also. Hitzemann brought this malpractice action against the defendants-appellees, George M. Adam, M.D., and Mary Lanning Memorial Hospital. On May 5, 1991, Adam performed a diagnostic laparoscopy on Hitzemann at the hospital. Allegedly, Adam was also to have performed a tubal sterilization, but he did not perform the procedure because the hospital did not inform him that Hitzemann had given her consent. After Hitzemann was discharged, Adam allegedly made attempts to inform her of the omission, but he was unable to communicate this information until June 27. On July 24, it was determined that Hitzemann was pregnant and that the date of conception was early to mid-June 1991. On April 10, 1992, Hitzemann filed for bankruptcy. Her lawsuit was filed against the defendants on July 1.
This is the second time that this matter has appeared before us. Hitzemann's original petition alleged that the defendants negligently failed to perform a tubal sterilization procedure she had authorized during her hospitalization in May 1991. The defendants' demurrers to the original petition were sustained on the basis that Hitzemann had failed to properly allege a cause of action for medical malpractice and had failed to properly allege a cause of action for breach of contract.
On appeal, we reversed the judgment and remanded the cause for further proceedings, stating that although the district court had correctly sustained the demurrers, it had erred in dismissing the action without leave to amend, because "it may be possible for the plaintiff to state a cause of action for medical malpractice against the defendants in an amended petition." Hitzemann v. Adam, 246 Neb. 201, 206, 518 N.W.2d 102, 106 (1994). We concluded that damages for prenatal and delivery medical expenses; for emotional distress, loss of wages, pain and suffering, and loss of consortium caused by the failed sterilization, pregnancy, and childbirth; and for any costs associated with a second corrective sterilization procedure, if proved could be recovered.
Hitzemann subsequently filed a third amended petition. In response to this petition, the defendants denied they were negligent and alleged that Hitzemann was contributorily negligent, more than slight in degree, so that her claim was barred as a matter of law.
During discovery, the defendants learned that Hitzemann had filed a chapter 7 bankruptcy on April 10, 1992. Schedule B, which was filed with Hitzemann's petition for bankruptcy, required that she identify "[o]ther contingent and unliquidated claims of every nature," but Hitzemann's claim against the defendants was not listed. The bankruptcy was discharged on July 30.
After learning of the bankruptcy, the defendants moved for summary judgment, and the district court concluded that upon Hitzemann's filing for bankruptcy, all of Hitzemann's assets became the property of the bankruptcy estate. The district court entered summary judgment in favor of the defendants because it concluded that Hitzemann was not the real party in interest and dismissed the action without prejudice so that the real party in interest could file suit.
*403 Hitzemann filed a timely appeal with the Nebraska Court of Appeals, and we moved this case to our docket pursuant to our authority to regulate the caseloads of the Court of Appeals and this court.

ASSIGNMENTS OF ERROR
In summary, Hitzemann claims the district court erred (1) in finding that this lawsuit should have been listed as an asset on her bankruptcy schedule, (2) in addressing the real-party-in-interest issue on a motion for summary judgment instead of a demurrer, and (3) in not providing Hitzemann with an opportunity to amend her petition to reflect the real party in interest.

ANALYSIS
We first address the issue of Hitzemann's standing to commence this action against the defendants. The activities which gave rise to Hitzemann's alleged cause of action occurred on May 5, 1991. Hitzemann filed for chapter 7 bankruptcy on April 10, 1992, and subsequently filed this lawsuit on July 1.
In Pappas v. Sommer, 240 Neb. 609, 483 N.W.2d 146 (1992), we noted that the plaintiff's negligence claim against an attorney which accrued prior to the client's bankruptcy filing became the property of the trustee of the bankruptcy estate. We held that the district court had correctly concluded that once the plaintiff filed bankruptcy, she lacked standing to bring the lawsuit in her own name and on her own behalf.
Hitzemann argues that her potential cause of action against the defendants was not an asset of the bankruptcy estate and, therefore, did not need to be listed on her bankruptcy schedule. She asserts that a debtor need list on the debtor's schedule only assets which are certain at the time the bankruptcy is filed and that if there is a contingent future interest or expectancy, the debtor need file an amendment to the schedule only if the contingency vests within 180 days after the filing of the original bankruptcy petition. She argues that
"[a] special rule applies to contingent future interests and mere expectancies. Under the 1938 amendment of the [Bankruptcy Act of 1898], Section 70(a) and the separate paragraph following Section 70a(8) provided that such interest or estate shall pass to the trustee if it vests in the debtor within six months after the filing of a petition in bankruptcy...."
Brief for appellant at 12. In summary, she argues that because wrongful pregnancy was an issue of first impression in Nebraska at the time she filed bankruptcy, she was not required to list the potential lawsuit against the defendants as an asset on her bankruptcy schedule.
We find Hitzemann's claim that her malpractice action was outside the reach of the bankruptcy statutes because she sued under a novel legal theory to be without merit. Although it is true that this court had never decided a wrongful pregnancy action prior to this action, Hitzemann's claim against the defendants is simply one for medical malpractice. It is undisputed that the alleged negligence occurred on May 5, 1991, the date of Hitzemann's surgery. Accordingly, Hitzemann's cause of action accrued on this date; she had a recognizable claim on the day she filed bankruptcy, and she should have listed her claim on the bankruptcy schedule.
Hitzemann next asserts that the district court erred in finding that she was not the real party in interest and in sustaining the defendants' motion for summary judgment on these grounds. Neb.Rev.Stat. § 25-301 (Reissue 1995) provides that, with an exception not involved here, every action must be prosecuted in the name of the real party in interest. In determining if a party is the real party in interest, the focus of the inquiry is whether the party has standing to sue because the party has some real interest in the cause of action, or a legal or equitable right, title, or interest in the subject matter of the controversy. Goff v. Weeks, 246 Neb. 163, 517 N.W.2d 387 (1994). The determination of a jurisdictional issue which does not involve a factual dispute is a matter of law which requires an appellate court to reach its conclusions independent from a trial court. State v. Gibbs, 253 Neb. 241, 570 N.W.2d 326 (1997). It was established in Pappas v. Sommer, supra, that once a party files bankruptcy, *404 the trustee of the bankruptcy estate becomes the only party with standing to bring pending or accrued suits. Consequently, the district court was correct to grant summary judgment on these facts, because Hitzemann filed bankruptcy prior to commencing her suit against the defendants and, therefore, was no longer the real party in interest.
Next, Hitzemann argues that summary judgment was improperly granted because lack of real party in interest is properly raised by demurrer. Under the provisions of Neb.Rev.Stat. § 25-806 (Reissue 1995), a defendant may demur to the petition only when certain matters appear on the face of the petition. Hynes v. Hogan, 251 Neb. 404, 558 N.W.2d 35 (1997). In this case, Hitzemann did not inform the court that she had filed bankruptcy, and the defendants did not allege by answer that she lacked standing to bring suit. Thus, a real-party-in-interest or standing defect could not have been raised by demurrer because the defect was not apparent on the pleadings, and a motion for summary judgment could be used to bring the standing issue to the attention of the district court. See Nelson v. Sioux City Boat Club, 216 Neb. 484, 344 N.W.2d 634 (1984).
The defendants did not waive the real-party-in-interest defect by failure to raise the defect by answer. Standing is a jurisdictional component of a party's case because only a party who has standing may invoke the jurisdiction of a court. See, In re Interest of Archie C., 250 Neb. 123, 547 N.W.2d 913 (1996); Professional Firefighters of Omaha v. City of Omaha, 243 Neb. 166, 498 N.W.2d 325 (1993); State v. Baltimore, 242 Neb. 562, 495 N.W.2d 921 (1993); Bronner v. Exchange State Bank, 455 N.W.2d 289 (Iowa App.1990). Accordingly, lack of standing to sue is a jurisdictional defect that is not waived by the failure to plead.
Subject matter jurisdiction is a court's power to hear and determine a case of the general class or category to which the proceedings in question belong and to deal with the general subject involved in the action before the court. In re Application of Burlington Northern RR. Co., 249 Neb. 821, 545 N.W.2d 749 (1996). Parties cannot confer subject matter jurisdiction upon a judicial tribunal by either acquiescence or consent, nor may subject matter jurisdiction be created by waiver, estoppel, consent, or conduct of the parties. Fox v. Metromail of Delaware, 249 Neb. 610, 544 N.W.2d 833 (1996).
In Concerned Citizens v. Department of Environ. Contr., 244 Neb. 152, 505 N.W.2d 654 (1993), the plaintiff filed a declaratory judgment action under Neb.Rev.Stat. § 25-21,149 et seq. (Reissue 1989). The department demurred, alleging that the district court had no subject matter jurisdiction and that Concerned Citizens of Kimball County, Inc. (Concerned Citizens), was not a proper plaintiff. Another defendant, Waste-Tech Services, Inc., moved for summary judgment. The district court sustained both the demurrer and the motion for summary judgment and dismissed the action with prejudice because, inter alia, Concerned Citizens had no standing. We held that the district court correctly sustained the demurrer because of lack of subject matter jurisdiction. In affirming the district court's grant of summary judgment, we stated that "a summary judgment motion based on jurisdictional grounds is treated as and serves the same purpose as a demurrer on jurisdictional grounds." Concerned Citizens v. Department of Environ. Contr., 244 Neb. at 160-61, 505 N.W.2d at 660-61. See, also, Nelson v. Sioux City Boat Club, supra (absence of subject matter jurisdiction may be raised either by demurrer or by summary judgment motion).
However, we reversed the district court's dismissal of the petition. We held that for purposes of applying the rule regarding pleadings, a summary judgment motion based on a jurisdictional defect is treated the same as a demurrer based on a jurisdictional defect. Consequently, after a summary judgment motion on jurisdictional grounds has been granted, but where there is a reasonable possibility that the jurisdictional defect may be cured by amendment, denying the plaintiff the opportunity to replead is an abuse of discretion. We concluded that Concerned Citizens could amend its petition to cure the defect or defects therein *405 and state a cause of action and that the district court had abused its discretion in dismissing Concerned Citizens' petition with prejudice.
Our decision in Hynes v. Hogan, 251 Neb. 404, 558 N.W.2d 35 (1997), that the plaintiff was not entitled to amend his complaint in an effort to state a cause of action does not conflict with the result we reach in the case at bar. In Hynes, the defendant alleged in his answer that the plaintiff had failed to state a cause of action, but the defendant did not file a demurrer raising the issue. The case proceeded to trial, and the court determined that the plaintiff did not have a cause of action. We held that when no demurrer has been filed and the matter proceeds to trial on the merits under an objection in an answer that a cause of action has not been stated, and it is determined that the objection should have been sustained, the party against whom the objection was directed shall not be granted leave to amend. Id.
In denying the plaintiff in Hynes the right to amend, we distinguished between a demurrer to a failure to state a cause of action and a trial on the merits which ultimately results in a finding that the petition fails to state a cause of action. We noted that where a demurrer is sustained, the cause of action continues to pend until dismissed and no adjudication of the merits occurs. Id. See, also, Carlson v. Metz, 248 Neb. 139, 532 N.W.2d 631 (1995). Therefore, the party against whom a demurrer is directed must be granted leave to amend, unless it is clear that no reasonable possibility exists that the amendment will correct the defect. Hynes v. Hogan, supra. See, also, Baltensperger v. Wellensiek, 250 Neb. 938, 554 N.W.2d 137 (1996). In contrast, once an action proceeds to trial, one party has sustained the burden and expense of trial and has succeeded in securing a judgment on the facts at issue. That party has a right to keep the benefit of the judgment unless there is prejudicial error in the proceedings in which the judgment was secured. Hynes v. Hogan, supra. In the case at bar, the district court sustained a summary judgment motion on jurisdictional grounds. Thus, Hynes is readily distinguishable from the facts of this case and does not conflict with our holding.
Pursuant to our decision in Concerned Citizens v. Department of Environ. Contr., 244 Neb. 152, 505 N.W.2d 654 (1993), we treat the summary judgment motion filed by the defendants as a demurrer based on jurisdictional grounds. After a demurrer is sustained, leave to amend is to be given, unless it is clear that no reasonable possibility exists that the plaintiff will be able to correct the deficiency. Pappas v. Sommer, 240 Neb. 609, 483 N.W.2d 146 (1992). The decision whether to allow or deny an amendment to any pleading lies within the discretion of the court to which application is made. Darrah v. Bryan Memorial Hosp., 253 Neb. 710, 571 N.W.2d 783 (1998). Denying Hitzemann the opportunity to replead under these circumstances would be an abuse of discretion.
Without speculation as to whether Hitzemann will be permitted to reopen her bankruptcy estate, we conclude that there is a reasonable possibility that the trustee could be substituted as the real party in interest. See id. Therefore, the district court correctly sustained the motion for summary judgment because Hitzemann was not the real party in interest, but it erred in dismissing the cause of action without giving Hitzemann the opportunity to amend the petition to substitute the real party in interest. We therefore reverse the judgment of the district court and remand the cause for further proceedings.
REVERSED AND REMANDED FOR FURTHER PROCEEDINGS.
CONNOLLY, J., not participating.
