A Mighty Mystery: JaxB Marshalling embedded byte Array document
Hello, I've got a bit of a mystery and I'm looking for some help. I'm working with an application with some JaxB classes generated from xsd.
Most of the time, the document is base64 encoded and sent over with no problem. However about ever 4 instances or so, the marshalled XML jumps to between 10 and 50 MB (instead of the usual 200K to 1MB files) and instead of having a single base64 encoded document within a document XML node, we have one document XML node per character with the ascii code for each character listed within the document tag, like this:
I stripped the document tags out and converted the ascii characters into text (I added 256 to any that were negative). The first few characters were as follows: %PDF-1.3 %Ã‡Ã¬
Has anyone seen anything like this before and how can I fix it? I tried making the thread sleep anytime we write a large file to the system, I thought perhaps it was an issue with writing the files to the network or something along those lines. It seems that waiting 30 seconds after writing each file may have helped some, however, we're still having the issue with about 25% of the files processed
We compared the PDF documents to each other and nothing SEEMS different between them. Any insight would be appreciated! Please help!