
866 So.2d 375 (2004)
David W. GIBSON
v.
STATE of Louisiana, Richard Ieyoub, Attorney General, State of Louisiana, Harry Morel, District Attorney, 29th Judicial District Court, State of Louisiana.
No. 03-CA-1112.
Court of Appeal of Louisiana, Fifth Circuit.
February 10, 2004.
Rehearing Denied March 3, 2004.
*377 David W. GibsonIn Proper Person, Angie, LA.
Harry J. Morel, Jr., District Attorney, Hahnville, LA, for appellee.
Panel composed of Judges THOMAS F. DALEY, SUSAN M. CHEHARDY and CLARENCE E. McMANUS.
CLARENCE E. McMANUS, Judge.
At issue in this appeal is whether the trial court erred in granting defendant's exceptions of no right of action and no cause of action. For the following reasons, we affirm.
FACTS AND PROCEDURAL HISTORY
Plaintiff/appellant in this case is David Gibson who was convicted of theft and forgery and was sentenced as a multiple offender to thirty-two years at hard labor in 1989.[1] His conviction and sentence were affirmed on appeal. See, State v. Gibson, 596 So.2d 832 (La.App. 5 Cir. 1992). His application for post-conviction relief was denied. See, State v. Gibson, 598 So.2d 348 (La.1992). His petition for habeas corpus was denied. Gibson v. Whitley, 1992 WL 211537 (E.D.La.1992).
In August 2002, Gibson filed a pro se petition for declaratory judgment against Attorney General Richard Ieyoub and Harry Morel, the District Attorney for the Twenty-Ninth Judicial District. The petition alleges that La. Const. Art. V § 26(B) and La. R.S. 16:1(B) are unconstitutional because those provisions conflict with the Separation of Powers Doctrine, Articles I, II, III of the United States Constitution, the Supremacy Clause, Article VI, Clause 2 of the United States Constitution and La. Const. Art. I § 2. Gibson argues that an error in the Louisiana Constitution of 1974 resulted in an unconstitutional delegation of executive powers to the District Attorney. He believes that the unconstitutional delegation of power to the District Attorney's Office to prosecute on behalf of the State of Louisiana deprived him and deprives others of due process. He asserts that the court system as it exists is invalid, a court without jurisdiction. Thus, arrests, investigations and criminal convictions are "void" because there is no "properly empowered" executive branch officer in court to legally represent the State of Louisiana.
In response, the St. Charles Parish District Attorney's Office, ("the DA"), filed exceptions of no cause of action and no right of action. The DA contends that Gibson's attack on the framework of our judicial system by alleging the DA has no authority to institute and prosecute criminal action for the state is absurd. Thus, Gibson is not entitled to the relief sought. Gibson dismissed the Attorney General as a party in this case. The trial court rendered judgment on the pleadings and granted the DA's exceptions of no cause of action and no right of action. This appeal followed.
DISCUSSION
Gibson argues that the trial court erred in granting the DA's exceptions. *378 The function of an exception of no cause of action is to test the legal sufficiency of the petition by determining whether the law affords a remedy on the operative facts alleged in the pleading. Jackson v. State ex rel. Dept. of Corrections, 00-2882 (La.5/15/01), 785 So.2d 803. No evidence may be introduced to support or controvert the objection that the petition fails to state a cause of action. La.Code Civ. P. art. 931. Therefore, the court reviews the petition and accepts well pleaded allegations of fact as true, and the issue at trial of the exception is whether, on the face of the petition, the plaintiff is legally entitled to the relief sought. Id. citing, Everything on Wheels Subaru, Inc. v. Subaru South, Inc., 616 So.2d 1234 (La.1993).
In reviewing a trial court's ruling sustaining an exception of no cause of action, the reviewing court conducts de novo review because the exception raises a question of law. Id. citing, City of New Orleans v. Board of Commissioners of the Orleans Levee Dist., 93-0690, (La.7/5/94), 640 So.2d 237, 253. Every reasonable interpretation must be accorded the language of the petition in favor of maintaining its sufficiency and affording to the plaintiff the opportunity of presenting evidence at trial. Id. citing, Hero Lands Co. v. Texaco, Inc., 310 So.2d 93 (La.1975).
Trial courts are vested with wide discretion in deciding whether to grant or refuse declaratory relief. Louisiana Supreme Court Committee on Bar Admissions ex rel. Webb v. Roberts, 00-2517 (La.2/21/01), 779 So.2d 726. For a declaratory judgment to be granted, there must be a justiciable controversy, as courts are not permitted to issue advisory opinions based on a contingency which may or may not occur. Id. Courts should not decide abstract, hypothetical or moot controversies, or render advisory opinions with respect to such controversies. Id.
Accepting all of the allegations in the petition as true, and applying the legal principles for the exception of no cause of action to the instant case, we find the trial court properly granted the DA's exception of no cause of action. This situation presents no existing, actual and substantial dispute for which declaratory judgment would be appropriate. No resolution of a justiciable controversy could possibly be served by a declaratory judgment in this case.
Second, we consider whether this particular plaintiff has a right to bring the suit in this case. Generally, an action can only be brought by a person having a real and actual interest which he asserts. La. Code Civ. Proc. Art. 681. The exception of no right of action is designed to test whether the plaintiff has a real and actual interest in the action. La.Code Civ. Proc. Art. 927(A)(5). The function of the exception of no right of action is to determine whether the plaintiff belongs to the class of persons to whom the law grants the cause of action asserted in the suit. Industrial Companies, Inc. v. Durbin, 02-0665 (La.1/28/03), 837 So.2d 1207, citing, Louisiana Paddlewheels v. Louisiana Riverboat Gaming Com'n, 94-2015, (La.11/30/94), 646 So.2d 885, 888. The exception of no right of action assumes that the petition states a valid cause of action for some person and questions whether the plaintiff in the particular case is a member of the class that has a legal interest in the subject matter of the litigation. Id. The trial court did not err in granting the exception of no right of action.
For the foregoing reasons, the trial court's judgment is affirmed.
AFFIRMED.
DALEY, J., dissents.
*379 DALEY, J., dissents.
I dissent from the majority opinion. First, I disagree with the majority's characterization of the suit. Plaintiff, David Gibson, filed a Petition for Declaratory Judgment against Harry Morel in his capacity as District Attorney for the 29th Judicial District Court, alleging that R.S. 16:1 and Art. V, Section 26(B) of the Louisiana Constitution (1974) are unconstitutional as being in direct conflict with the Doctrine of Separation of Powers and the Supremacy Clause of the United States Constitution, because, he argues, the Attorney General of the State, who is part of the Executive Branch, is the only officer empowered to represent the State in criminal matters, and the delegation of that authority to the District Attorney, who is part of the Judicial Branch, by the Louisiana Constitution, is in violation of the federal Separation of Powers doctrine. His suit asks that these two statutes be found unconstitutional.
The majority's opinion does not set forth the basis of the District Attorney's exceptions, but only states that the District Attorney characterized the plaintiff's suit as "absurd." The District Attorney's appellate brief, however, sets forth more significant legal grounds for its position.
The District Attorney, on appeal, cites Robertson v. Caddo Parish, LA, 833 So.2d 1139 (La.App. 2 Cir. 12/11/02), which stated that a suit for declaratory judgment is an appropriate means of testing the constitutionality of a statute or applicability of an ordinance in which there is an actual controversy between the parties.
The District Attorney contends that Gibson filed this suit to collaterally attack his previous conviction(s) now that he has exhausted all of his appellate and post-conviction remedies. The Prayer in Gibson's Petition, however, does not request that his convictions be overturned. The District Attorney argues that since Gibson's conviction is final, there is no longer an actual controversy between the parties. I disagree with the majority and the trial court because Gibson is susceptible to prosecution by a District Attorney for violation of a criminal statute. Robertson stated:
The law is clear that a suit for declaratory judgment is an appropriate means of testing the constitutionality of a statute or applicability of an ordinance in which there is an actual controversy between the parties. It is available to test the validity of a criminal ordinance where a criminal prosecution has not yet begun. (cites omitted) * * * In the criminal context, the courts have found ... an individual falls within a class which is threatened with prosecution under an allegedly unconstitutional statute, not after the prosecution has begun.
Robertson's affirmance of the Exception of No Cause of Action can be distinguished from the current suit, because Robertson sought a determination of the constitutionality of a provision that no longer existed. Specifically, Robertson sought relief based upon the past application of a (since) repealed provision to his 1986 indictment and conviction. In this case, plaintiff seeks constitutional review of the past and current structure of State prosecutorial authority.
I find that Robertson actually supports plaintiff's right and cause of action. Since plaintiff could be prosecuted for criminal conduct in St. Charles Parish, he has asserted a cause of action and he has a right of action. I admit that his cause of action asserts a claim of questionable merit, but the merits are not determined when reviewing exceptions of no cause and no right of action. I would, therefore, reverse *380 the judgment granting the Exceptions and remand for further proceedings.
NOTES
[1]  He is presently incarcerated in Angie, Louisiana.
