f investiture from Władysław IV, King of Poland, and in a solemn ceremony in Vilnius Castle gave an oath of allegiance to the king. The description of the ceremony is not particularly detailed, mainly listing the persons present. The ceremony was followed by an official dinner, at which the duke sat between the king and the queen. In Vilnius, James also had to sign a promise to build Catholic churches in Mitau/Jelgava and Goldingen/Kuldīga.