I have fixed this issue using the following:
I found this replacing the p:commandButton with h:commandButton. When I did it, the following error showed up:
The request content-type is not a multipart/form-data
Next I googled this and found the link above. Thanks anyway.