#### GEOFFREY W. FREEMAN, Plaintiff-Appellant, v. ROGER COWAN, Defendant-Appellee.

Fifth District

No. 5—01—0704

Opinion filed May 29, 2002.

*219Geoffrey W Freeman, of Menard, appellant pro se.

James E. Ryan, Attorney General, of Chicago (Joel D. Bertocchi, Solicitor General, and William L. Browers and Karen Kaplan, Assistant Attorneys General, of counsel), for appellee.

JUSTICE RARICK

delivered the opinion of the court:

Geoffrey W Freeman (plaintiff) filed a pro se petition for a writ of habeas corpus in the circuit court of Randolph County. The petition contended that the United State Supreme Court’s decision in Apprendi v. New Jersey, 530 U.S. 466, 147 L. Ed. 2d 435, 120 S. Ct. 2348 (2000), rendered his sentences void. The court dismissed the petition upon the defendant’s motion. Plaintiff appeals, contending that the circuit court improperly dismissed his petition for a writ of habeas corpus. We affirm.

Plaintiff was found guilty after a jury trial of armed robbery and first-degree murder and was sentenced to natural-life imprisonment on the murder conviction and 25 years’ imprisonment for the armed robbery. Plaintiff exhausted all other postconviction appeals and remedies. On May 15, 2001, plaintiff filed his pro se petition for a writ of habeas corpus, contending that his natural-life sentence was an improper extended term because the finding that his offense was accompanied by exceptionally brutal and heinous behavior indicative of wanton cruelty was not put before a jury and proved beyond a reasonable doubt. The trial court dismissed the petition for the failure to state a cause of action. Plaintiff initially argues that the court failed to enter an appealable order. An order of dismissal for the failure to state a cause of action, however, is a final and appealable order. See Boonstra v. City of Chicago, 214 Ill. App. 3d 379, 385, 574 N.E.2d 689, 693 (1991). Plaintiff also argues that the court erred in dismissing his petition. We disagree. A writ of habeas corpus is available only to obtain the release of a prisoner who has been incarcerated under a judgment of a court that lacked jurisdiction of the subject matter or the person of the plaintiff or where there has been some occurrence subsequent to the prisoner’s conviction that entitles him to his release. Owens v. Lane, 196 Ill. App. 3d 358, 360, 553 N.E.2d 784, 786 (1990); Newsome v. Hughes, 131 Ill. App. 3d 872, 874, 476 N.E.2d 478, 480 (1985). A complaint for a writ of habeas corpus may not be used to review proceedings that do not exhibit one of these defects, even though the alleged error involves a denial of constitutional rights. Barney v. *220 Prisoner Review Board, 184 Ill. 2d 428, 430, 704 N.E.2d 350, 351 (1998); Newsome, 131 Ill. App. 3d at 874, 476 N.E.2d at 480. Plaintiff did not raise any issue regarding jurisdiction or allege any postconviction event entitling him to release, and his claim that his sentence is unconstitutional or otherwise imposed in error is not cognizable. See Schlemm v. Cowen, 323 Ill. App. 3d 318, 321, 752 N.E.2d 647, 649 (2001); People ex rel. Bright v. Twomey, 4 Ill. App. 3d 365, 368, 279 N.E.2d 538, 540 (1972). Plaintiff did not allege any error that is subject to review in habeas corpus proceedings, and therefore he failed to state a cause of action entitling him to habeas corpus relief. Accordingly, the trial court did not err in dismissing plaintiffs petition for a writ of habeas corpus.

For the aforementioned reasons, we affirm the judgment of the circuit court of Randolph County.

Affirmed.

GOLDENHERSH and CHAPMAN, Melissa, JJ., concur.