 He was the first of eight children born to a Venetian doctor, Ángel Castelli Salomón, and Josefa Villarino, who was a relative of Manuel Belgrano.He was trained by the Jesuits shortly before their expulsion, and attended the Real Colegio de San Carlos in Buenos Aires.As was customary, one of the children of the Castelli family was ordained into the priesthood, and Juan José was chosen for this.