In an application to prove a will or for the appointment of an executor or administrator, the petition shall set forth the facts necessary to give the court jurisdiction, and the names, age, and residence, so far as known of his heirs. In the case of an application for the appointment of an executor or administrator, the application shall also state whether or not the deceased left a will.