BZ-1018220 - A deployment unit for uploaded kjar is not created due to negative number of transferred bytes
BZ-1018209 - NPE while creating a deployment unit for an uploaded kjar

(cherry picked from commit 6ad803cb7d3faa4b9496e63a74d107a05ad68c8e)