
462 So.2d 1047 (1985)
Anthony G. COX
v.
STATE.
7 Div. 314.
Court of Criminal Appeals of Alabama.
January 8, 1985.
*1048 Hubert H. Wright, Gadsden, for appellant.
Charles A. Graddick, Atty. Gen., and P. David Bjurberg, Asst. Atty. Gen., for appellee.
PATTERSON, Judge.
This is an appeal from a judgment of conviction and sentence to life imprisonment without parole on a plea of guilty to *1049 an indictment that charged the capital offense of murder during the course of a robbery, in violation of § 13A-5-40(a)(2), Code of Alabama 1975. The record reveals that the body of Naomi Keith was discovered in her home in East Gadsden, Alabama. She had been killed by multiple blows to the head by a blunt instrument, which fractured her skull. Subsequently the appellant, Anthony G. Cox, was interviewed by police officers investigating the murder. The deceased, Naomi Keith, was appellant's great aunt. After being advised of his Miranda rights, and signing a written waiver of same, appellant confessed to killing Mrs. Keith. The confession was reduced to writing and signed. Cox stated that he went to Naomi Keith's home on the night of April 3, 1984, and carried an iron bar with him. After some discussion with her in reference to money, he hit her two or three times in the back of the head with the iron bar, causing her to fall to the floor. He took her purse and left. Her purse contained about $150. He removed the money and hid the purse and iron bar in the woods. After getting home that night he washed his clothing and shoes to remove blood stains which were noticeable. After his confession he directed the officers to the spot where he had hidden the purse and iron bar, and they were recovered. At the time the officers interviewed Cox and took his confession, which was on April 9, 1984, Cox was in confinement at the West Jefferson Correctional Facility, a branch of the State Department of Corrections. The record does not disclose the reason for his confinement, but it appears that it was due to matters unrelated to the murder of Mrs. Keith.
Cox was indicted on May 9, 1984, and an arrest warrant was served on him at the West Jefferson Correctional Facility on May 16, 1984. Counsel was appointed to represent him on May 22, 1984, and a motion for a preliminary hearing was filed on the following day. Along with the motion for a preliminary hearing, appellant filed motions for discovery, for polygraph results, to exclude, for change of venue, and to dismiss and quash the indictment. A hearing was held on the motion for a preliminary hearing on May 25, 1984, and upon conclusion of the hearing the trial judge denied the motion. On the same date, May 25, 1984, Cox was arraigned and entered a plea of not guilty. Trial was set for the week of June 25, 1984.
On May 28, 1984, Cox withdrew his not guilty plea, and entered a plea of guilty, whereupon the trial judge found him guilty, sentenced him to life imprisonment without parole, and advised him of his right to appeal. This action of the trial judge conflicts with the provisions of § 13A-5-42, Code of Alabama 1975, which requires that, "A defendant who is indicted for a capital offense may plead guilty to it, but the State must in any event prove the defendant's guilt of the capital offense beyond a reasonable doubt to a jury." The record reflects that there were plea bargaining negotiations between Cox and the State prior to the guilty plea. Prior to entering the guilty plea, the prosecuting attorney advised the trial judge that the State would not oppose a sentence of life imprisonment without parole.
On June 11, 1984, the court reconvened and another hearing was held, at which time Cox entered his plea of guilty to the capital offense again. A jury was empaneled and the State presented a prima facie case to the jury, which included Cox's confession. The appellant offered no evidence. The jury returned a verdict of guilty of the capital offense charged in the indictment. Cox waived his right to a sentencing hearing before the jury as provided in § 13A-5-44(c), and the trial judge again sentenced Cox to life imprisonment without parole.
The appellant raises two issues on appeal. They are (1) whether trial court committed reversible error by denying appellant's motion for a preliminary hearing, and (2) whether the judgment of conviction violates the appellant's constitutional right not to be put in jeopardy twice for the same offense. 
I
A guilty plea, if voluntarily and understandingly made, waives all nonjurisdicitional *1050 defects in the prior proceedings against an accused. Askew v. State of Alabama, 398 F.2d 825 (5th Cir.1968); United States v. McCoy, 477 F.2d 550 (5th Cir.1973); Knowles v. State, 280 Ala. 406, 194 So.2d 562, cert. denied, 386 U.S. 1011, 87 S.Ct. 1358, 18 L.Ed.2d 442 (1967); Barnes v. State, 354 So.2d 343 (Ala.Crim. App.1978); Browning v. State, 397 So.2d 253 (Ala.Crim.App.), cert. denied, 397 So.2d 256 (1981); Jackson v. State, 452 So.2d 895 (Ala.Crim.App.1984); § 13A-5-42, supra.
A voluntary guilty plea waives the right to a preliminary hearing. Morrow v. State, 426 So.2d 481 (Ala.Crim.App.1982); Browning v. State, supra; Roden v. State, 384 So.2d 1248 (Ala.Crim.App.1980); Harris v. State, 367 So.2d 534 (Ala.1979).
A plea of guilty is an admission of all the elements of the offense. It is a waiver of rights guaranteed by the due process clause of the Fifth Amendment. United States v. O'Donnell, 539 F.2d 1233 (9th Cir.1976), cert. denied, 429 U.S. 960, 97 S.Ct. 386, 50 L.Ed.2d 328 (1976); Hammonds v. State, 354 So.2d 345 (Ala.Crim. App.1978). As a general rule a guilty plea, intelligently and voluntarily made, bars the later assertion of constitutional challenges to the pre-trial proceedings. Lefkowitz v. Newsome, 420 U.S. 283, 95 S.Ct. 886, 43 L.Ed.2d 196 (1975); Hammonds v. State, supra.
The appellant does not contend that the guilty plea was involuntarily made or entered without understanding the consequences. However, even though there is no such contention, we have examined the record and find that the appellant was fully informed of his rights as per Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969), through the court's questions on each of the two occasions that the guilty pleas were entered. After considering all the circumstances surrounding the appellant's guilty plea, it is our judgment that the trial court was correct in determining that the plea was voluntarily, knowingly, and intelligently made. Appellant's guilty plea having been voluntarily and understandingly made, he waived all nonjurisdictional defects in the prior proceedings, including the right to a preliminary hearing, which would be, if improperly denied, a nonjurisdictional defect.
Furthermore, it has long been held in this jurisdiction that a preliminary hearing is not essential to criminal prosecution after indictment. Elmore v. State, 445 So.2d 943 (Ala.Crim.App.1983); Johnson v. State, 335 So.2d 663 (Ala.Crim.App.), cert. denied, 335 So.2d 678, cert. denied, 429 U.S. 1026, 97 S.Ct. 649, 50 L.Ed.2d 629 (1976).
The purpose of a preliminary hearing is to determine probable cause. The indictment satisfies this requirement. A repetitious inquiry to determine probable cause after indictment is not necessary. Elmore v. State, supra; Caifa v. State, 337 So.2d 146 (Ala.Crim.App.1976); Duncan v. State, 369 So.2d 885 (Ala.Crim.App.1979). Thus, the appellant did not have an absolute right to a preliminary hearing, as his motion for such a hearing did not come until after indictment. Elmore v. State, supra. There is no merit to this contention of appellant, and the trial court did not err in denying the motion for a preliminary hearing. Appellant's counsel suggests in his brief that the failure of the State to arrest appellant prior to his indictment was a device intended to deprive appellant of a preliminary hearing and the discovery that such a hearing would produce. The record does not support this suggestion. There was no necessity to arrest appellant at the time of his confession, since he was already in confinement.

II
The appellant next contends that he was twice placed in jeopardy, in violation of his constitutional rights by the trial judge's sentencing him twice for the same offense. He raises this issue for the first time on appeal. He cites no authorities to support it. He filed no pleas of former jeopardy during the proceedings below and made no objection to the procedure followed by the trial judge. The minutes of the trial court reflect that the appellant withdrew his earlier *1051 plea of guilty, was arraigned again, and reinstated his not guilty plea. The minutes further reflect that he then withdrew that plea, and entered a second guilty plea, whereupon the case was tried before a jury as required by § 13A-5-42, supra.
The United States and Alabama constitutions provide that no person shall be subject for the same offense to be twice put in jeopardy. U.S. Const.Amend. V; Ala. Const. Art. I, § 9 (1901). In Benton v. Maryland, 395 U.S. 784, 89 S.Ct. 2056, 23 L.Ed.2d 707 (1969), it was held that the Fifth Amendment guarantee against double jeopardy is enforceable against the states through the Fourteenth Amendment.
In Alabama a plea of former jeopardy must be in writing, and verified by oath, unless its truth appears by some matter of record, or other written evidence accompanying it. § 15-15-42, Code of Alabama 1975. There is no evidence in the record in the instant case to support a plea of former jeopardy. Further, in the absence of a plea of former jeopardy filed before or at the same time with a plea of not guilty, there is nothing for this court to review. Richmond v. State, 437 So.2d 612 (Ala.Crim.App.1983); Jelks v. State, 411 So.2d 844 (Ala.Crim.App.1981); Hancock v. State, 368 So.2d 581 (Ala.Crim.App.), cert. denied, 368 So.2d 587 (Ala.1979); Williams v. State, 348 So.2d 1113 (La.App.), cert. denied, 348 So.2d 1116 (Ala.1977). The general rule is that the defense of former jeopardy must be raised at or before a plea of not guilty is entered; otherwise it is waived. Hancock v. State, supra; A.R. Crim.P.Temp. 16.3; Ex parte Sales, (Ala.1984) 460 So.2d 1252 (Ala.1984). Roberson v. State, 183 Ala. 43, 62 So. 837 (1913); 21 Am.Jur.2d § 461 Criminal Law (1981). An exception to this rule is found in Ex parte Sales, supra, and Baldwin v. State, 47 Ala.App. 136, 251 So.2d 633 (1971), but these cases are to be distin guished from the instant case. The fact that a defendant has been in former jeopardy cannot be raised for the first time on appeal. Moring v. State, 129 Ala. 66, 29 So. 664 (1900). Since the appellant invoked no action in the lower court to raise the defense of former jeopardy, and raises it for the first time in brief on appeal, there is nothing for this court to review.
Even if appellant had timely filed a plea of former jeopardy, it would have been improper for the trial court to grant it. It is essential to constitute jeopardy that the court in which the accused is put upon his trial shall have jurisdiction. If it is without jurisdiction, there can be no valid conviction, and hence there is no jeopardy. McCrosky v. State, 17 Ala.App. 523, 87 So. 219 (1920); Pittman v. State, 18 Ala.App. 477, 93 So. 42 (1922); Serfass v. United States, 420 U.S. 377, 95 S.Ct. 1055, 43 L.Ed.2d 265 (1975); Holmes v. State, 29 Ala.App. 594, 199 So. 736 (1941); See Annot, 75 A.L.R.2d 683 (1958), and cases cited therein; 3 W. LaFave and J. Israel, Criminal Procedure, § 24.1(C) (1984).
Section 13A-5-42, supra, required that appellant's guilt be proved beyond a reasonable doubt by a jury, even though he had pleaded guilty. This requirement could not be waived. It was jurisdictional. When the trial judge accepted the first guilty plea and found the appellant guilty without empaneling a jury for that purpose, his action lacked jurisdiction and was a nullity. There could be no jeopardy, since the trial judge lacked jurisdiction to try the question of guilt. He was without power to make this determination. Consequently, since the first judgment of the trial court was void, it was no obstacle to the subsequent prosecution by the State and did not constitute prior jeopardy. The action of the trial judge in starting over by allowing the appellant to enter a new guilty plea, and the submission of the question of guilt to a jury which was regularly empaneled was entirely proper.
The appellant does not question the voluntariness of his confession, nor does he raise the sufficiency of the evidence as an issue on appeal. We have searched the record and find no error. This cause is due to be, and is hereby, affirmed.
AFFIRMED.
All Judges concur.
