We recently reported on new Android 4.2.2 firmware rolling out for the Xperia Z, Xperia ZL and Xperia ZR in the form of build number 10.3.1.A.0.244. Well, one particular down side of the firmware is that the root exploit has been patched by Sony. Fear not, xda-developer DooMLoRD has managed to find a way around this.
This is by using the older kernel for which the root works, then root the device and then flash back to the newer kernel. The download links for the Xperia Z can be found here and will work for handsets with both locked and unlocked bootloaders. It will also work for the Xperia ZL and Xperia ZR but you will need to download the appropriate kernel.