Skip to main content

A Mighty Mystery: JaxB Marshalling embedded byte Array document

1 reply [Last post]
dragonbait
Offline
Joined: 2008-08-22
Points: 0

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:
37
80
68
70
45
49
46
51
10
37
-57
-20
-113
-94
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!

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
russellnell
Offline
Joined: 2009-11-30
Points: 0

Was a solution found for this issue? I just ran into the exact same symptom.

Thanks
-Russ