
61 P.3d 219 (2002)
2002 OK 94
WASTE CONNECTIONS, INC. d/b/a Red Carpet Landfill, Plaintiff/Appellant,
v.
OKLAHOMA DEPARTMENT OF ENVIRONMENTAL QUALITY, Defendant/Appellee.
No. 97,928.
Supreme Court of Oklahoma.
December 10, 2002.
Keith R. Gibson, Oklahoma City, OK, Jack Y. Perry & Lori J. Marco, Minneapolis, MN, for Waste Connections, Inc. d/b/a Red Carpet Landfill.
Stan A. Koop, Assistant Attorney General, Oklahoma City, OK, for the Department of Environmental Quality.
*221 BOUDREAU, J.
¶ 1 This appeal is the result of a June 13, 2002 order of the district court of Major County, in which the trial court dismissed Waste Connections', Inc. d/b/a Red Carpet Landfill (Waste Connections), request for declaratory judgment and injunctive relief, so that this case may proceed through the administrative process before the Department of Environmental Quality (DEQ).
*222 ¶ 2 The DEQ is a state agency charged with the administration of the Oklahoma Solid Waste Management Act, 27A O.S.2001, § 2-10-201, et seq. Waste Connections received a DEQ permit to operate its Meno, Oklahoma (Red Carpet Landfill) facility in September 2001. Shortly thereafter, the DEQ notified Waste Connections that it must submit a disposal plan under 27A O.S.2001, § 2-10-801(D)(1) before receiving any imported waste in excess of 200 tons per day.[1] Waste Connections submitted a plan, but the DEQ refused to approve it, claiming it was inadequate. After conducting inspections of the landfill, the DEQ issued a notice of violations to Waste Connections, citing specific operational deficiencies as well as a lack of an acceptable disposal plan. On January 3, 2002, the DEQ issued an administrative compliance order, stating that Waste Connections failed to obtain a disposal plan prior to accepting imported waste in excess of 200 tons per day. The order further imposed daily fines.
¶ 3 The parties then scheduled an administrative appeal, which was continued at the request of the administrative hearing clerk. Prior to the rescheduled hearing, Waste Connections initiated suit against the DEQ in Major County, requesting a declaratory judgment, temporary restraining order and a temporary injunction. In its suit Waste Connections asserted, among other things that the rule, O.A.C. 252:205-3-2(c), did not apply to its landfill and both the rule and the statute, 27A O.S.2001, § 2-10-801(D)(1), are unconstitutional under the commerce clause of the U.S. Constitution.[2]
¶ 4 The DEQ moved to dismiss the cause for improper venue and failure to state a claim upon which relief could be granted. The trial court determined venue was appropriate in Major County, but dismissed Waste Connections' claim, because it failed to exhaust all administrative remedies prior to filing action in district court. In the order dismissing the claim the court determined it lacked jurisdiction to consider the matter in light of Waste Connections' failure to exhaust its administrative remedies.[3]
¶ 5 Waste Connections appealed the order dismissing its claim, asserting jurisdiction was proper.[4] Waste Connections argued that its attack on the constitutionality of the statute, 27A O.S.2001, § 2-10-801(D), rendered it futile to proceed through the administrative process, because administrative agencies lack the power to determine the constitutionality of legislation. Waste Connections also asserted that it is entitled to bring a declaratory judgment action to determine the validity and application of an administrative rule, specifically O.A.C. 252:205-3-2(c), whether or not it requested the agency to pass upon the validity or applicability of the rule in question.
¶ 6 Waste Connections requested this Court retain this appeal. We retain this *223 appeal to examine an apparent conflict between the trial court's decision and a number of recognized exceptions to the exhaustion of administrative remedies requirement.

I. Exhaustion of Administrative Remedies
¶ 7 Where relief is available from an administrative agency, a plaintiff is ordinarily required to pursue that avenue of redress before proceeding to the courts. Walker v, Group Health Services, Inc., 2001 OK 2, 37 P.3d 749, as corrected on denial of rehearing; See also Lincoln Income Life Ins. Co. v. Wood, 1976 OK 140, 556 P.2d 602, 603; Allen v. State ex rel. Bd. of Trustees of Oklahoma Retirement Sys. for Justices & Judges, 1988 OK 99, 769 P.2d 1302; Martin v. Harrah Indep. School Dist., 1975 OK 154, 543 P.2d 1370, 1372; Arbuckle Abstract Co. v. Scott, 1998 OK 125, 975 P.2d 879, 886-87. The exhaustion rule is one of "orderly procedure", "designed to allow administrative bodies to perform their statutory functions free from premature and unnecessary interference by preliminary court litigation." Arbuckle Abstract Co., 975 P.2d at 886. There are several policy rationales for requiring exhaustion of administrative remedies. First, exhaustion of administrative remedies allows the agency to apply its expertise and discretion under the statutory scheme the agency itself is charged with administering. Arbuckle Abstract Co., 975 P.2d at 887; Ledbetter v. Oklahoma Alcoholic Beverage Laws Enforcement Comm'n, 1988 OK 117, 764 P.2d 172, 180. Second, exhaustion of administrative remedies allows the agency opportunity to correct errors in the administrative process, possibly vindicating the rights of a plaintiff before the courts ever become involved. See Arbuckle Abstract Co., 975 P.2d at 887; Ledbetter, 764 P.2d at 180. Finally, exhaustion allows an administrative agency to compile a record which is adequate for judicial review. Moore v. City of East Cleveland Ohio, 431 U.S. 494, 524-25, 97 S.Ct. 1932, 52 L.Ed.2d 531 (1977); Harline v. Drug Enforcement Admin., 148 F.3d 1199, 1203 (10th Cir.1998).
¶ 8 In cases in which exhaustion of remedies is not required by statute, this Court has held that the requirement to exhaust administrative remedies is a prudential rule, rather than a jurisdictional bar. Walker, 37 P.3d at 761-62. The exhaustion rule "presents a remedial barrier to judicial proceedings when an agency's rule-prescribed administrative review process is not pursued to conclusion." Id. at 762. In such cases, the exhaustion requirement is discretionary with the court and may be excused if the administrative remedy is unavailable, ineffective or would have been futile to purse. Tinker Inv. & Mortgage Corp. v. City of Midwest City, 1994 OK 41, 873 P.2d 1029. When an administrative remedy is unavailable, ineffective or futile to pursue, the policy justifications for invoking the exhaustion of administrative remedies doctrine are no longer compelling.
¶ 9 The notion that an administrative process may be inadequate to fully and satisfactorily protect a right in question forms the basis of an exception to the doctrine of exhaustion of remedies for constitutional claims. The exception is a recognition that administrative agencies lack the power to pass on constitutional questions. Dow Jones & Co. Inc. v. State ex rel. Oklahoma Tax Comm'n, 1990 OK 6, 787 P.2d 843, 845 n. 9; Conoco, Inc. v. State Dept. of Health of State of Oklahoma, 1982 OK 94, 651 P.2d 125, 128-29. However, the exhaustion requirement is not excused merely because a party asserts a constitutional claim in a request for judicial relief. Ledbetter, 764 P.2d at 180. If relief may be granted on non-constitutional grounds, the necessity of deciding constitutional issues may be avoided and exhaustion may be required. Public Utilities Comm'n of the State of California v. U.S., 355 U.S. 534, 78 S.Ct. 446, 2 L.Ed.2d 470, rehearing denied by 356 U.S. 925, 78 S.Ct. 713, 2 L.Ed.2d 760 (1958). In Ledbetter, we recognized "where the situation involves the presence of constitutional questions, coupled with a sufficient showing of the inadequacy of the administrative process or remedy and of threatened or impending irreparable injury flowing from the delay that would be caused by following the administrative process[,]" administrative remedies need *224 not be exhausted. Ledbetter, 764 P.2d at 180 (emphasis in original).
¶ 10 In addition, a plaintiff need not exhaust administrative remedies when the Administrative Procedures Act (APA) states that exhaustion is not required. Title 75 O.S.2001, § 306 of the APA provides an exception to the exhaustion rule. Section 306 provides that the validity or applicability of a rule may be determined in an action for declaratory judgment if it is alleged that "the rule, or its threatened application, interferes with or impairs . . . the legal rights or privileges of the plaintiff." 75 O.S.2001, § 306(A). Section 306(D) specifically provides that the "declaratory judgment may be rendered whether the plaintiff has requested the agency to pass upon the validity or applicability of the rule in question."
¶ 11 A declaratory judgment under § 306 of the APA is not available for review of an adjudication effected in the course of a judicial proceeding. Texas Co. Irrigation & Water Resources Ass'n v. Oklahoma Water Resources Bd., 1990 OK 121, 803 P.2d 1119, 1123. In differentiating between rules and adjudications, Oklahoma Courts have explained the difference between an administrative rule and an administrative adjudication.
An agency's authority to make rules is clearly distinguishable from that of adjudication. Rulemaking includes the power to adopt rules and regulations of general applicationboth substantive and proceduralwhich are legislative in nature, operate prospectively and have general application. Orders of an administrative body are adjudicative in character. They apply to named persons or specific situations and have immediate rather than future operation.
Harry R. Carlile Trust v. Cotton Petroleum Corp., 1986 OK 16, 732 P.2d 438, 441-42 (emphasis in original). Section 306 is intended to apply only to rules issued by an agency in its quasi-legislative function and not to orders in individual proceedings in its quasi-adjudicative function.

II. The Trial Court Erred When It Dismissed Waste Connections' Claim for Lack of Jurisdiction
¶ 12 In sustaining the DEQ's motion to dismiss, the trial court was of the view that the exhaustion of administrative remedies doctrine presented a jurisdictional bar to its consideration of Waste Connections' request for relief, rather than a prudential one. This view is contrary to our most recent pronouncement in Walker, 37 P.3d at 761-62. The trial court erred when it determined that the exhaustion of administrative remedies doctrine deprived it of jurisdiction. Because a court may not by error divest itself of jurisdiction, this case must be remanded to the trial court for further consideration. Cook v. Winklefleck, 16 Cal.App.2d Supp. 759, 59 P.2d 463 (Cal.App.Super.1936); State ex rel. Bechtel v. McCabe, 60 Ohio App. 233, 20 N.E.2d 381 (OhioApp. 6 Dist.1938).
¶ 13 In its petition, Waste Connections contends that DEQ's interpretation and enforcement of 27A O.S.2001, § 2-10-801(D)(1) unconstitutionally discriminates against interstate commerce. On remand, the trial court must decide whether Waste Connections, in pressing this constitutional claim, is able to demonstrate a sufficient showing of inadequate administrative remedy and impending harm to overcome the exhaustion of administrative remedies rule.
¶ 14 Similarly, Waste Connections contends alternatively in its petition that O.A.C. 252:205-3-2(c) does not apply to its landfill and, in the event it does apply, the rule unconstitutionally burdens interstate commerce. Waste Connections alleges that the rule or its threatened application interferes with or impairs its legal rights. These allegations directly attack the validity and applicability of the rule in controversy and accordingly 75 O.S.2001, § 306 explicitly confers jurisdiction on the trial court to render a declaratory judgment, without the agency having passed upon the rule in question. Accordingly, the trial court may not dismiss Waste Connections' claim for judicial relief as it relates to O.A.C. 252:205-3-2(c) because it failed to exhaust its administrative remedies.
¶ 15 We note that 75 O.S.2001, § 306 of the APA provides that the court "may" *225 grant a declaratory judgment, indicating that a court has discretion whether or not to entertain the declaratory judgment action. Declaratory relief will be granted only when the interest of justice will be advanced and an adequate and effective judgment may be rendered. Linn Plywood Corp. v. Millmen's Union No. 1120, 222 Or. 265, 352 P.2d 594 (1960); See also National Valve and Mfg. Co. v. Grimshaw, 181 F.2d 687 (10th Cir. 1950) (disapproved on other grounds in Allendale Mut. Ins. Co. v. Kaiser Engineers, Div. of Henry J. Kaiser Co., 804 F.2d 592 (10th Cir.1986)). While this Court finds the trial court erred in its determination that it lacked jurisdiction, this opinion expresses no view as to whether Waste Connections is entitled to the declaratory relief requested.
¶ 16 APPEAL RETAINED; DECISION OF THE TRIAL COURT REVERSED AND CAUSE REMANDED WITH DIRECTIONS TO PROCEED IN A MANNER CONSISTENT WITH THIS OPINION.
¶ 17 HARGRAVE, C.J., WATT, V.C.J., HODGES, LAVENDER, KAUGER, SUMMERS, and WINCHESTER, JJ., Concur.
¶ 18 OPALA, J., Concurs in Result.
NOTES
[1]  Title 27A O.S.2001 § 2-10-801(D)(1) provides:

D. Before any disposal site accepts for disposal any solid waste generated outside the territorial limits of this state in excess of two hundred (200) tons per day:
1. The operator of the disposal site shall submit to the Department for approval a disposal plan prepared by either the generator or shipper as set out in the rules promulgated by the Board. Such plans as a minimum shall indicate the type and amount of solid waste generated, the handling, storage, treatment, disposal method and the disposal site to be used. The disposal plans shall be kept current by the persons submitting the original disposal plans and the Department shall be advised not less than five (5) working days prior to the day on which such changes are to be implemented. Persons storing or shipping recyclable materials in an environmentally acceptable manner for the purpose of recycling shall be required to file disposal plans required by this subsection only for those wastes which are to be disposed.
[2]  O.A.C. 252:205-3-2(c) incorporates by reference the Code of Federal Regulations, Environmental Protection Agency, 40 C.F.R. § 261. Section 261 deals with various aspects of identifying and listing hazardous waste, including how to identify hazardous material, how material may be transported, labeled and categorized and directions for identifying and quantifying particular waste which may be received at some facilities in only limited quantities.
[3]  Order of the District Court of Major County, June 19, 2002 stated: "The Court further finds that Defendant's Motion regarding dismissal based on lack of jurisdiction should be and hereby is granted."
[4]  Neither party appealed the trial court's determination with regard to venue.
