Binary data garbled

G

George Weis

Hi All:
We are having a problem with an application that runs under
tomcat. One thing this application does is send binary files to a
remote printer. We know that the code in this application has at
least one problem. It handles the binary data as a String object and
we are told that we should not be doing this.
We'll fix this, but we hope this fixes our problem, because the
application seems to work fine for a few days. Then it gets 'stuck'
and sends garbled binary files to remote printer from that point on.
Sometimes restarting the tomcat application seems to fix things.
Sometimes rebooting the host seems to fix things. Last time nothing
did and we had to switch over to another tomcat server.
We are running the application on tomcat 6.0.14, using
jdk1.5.0.12.

Anyone have any ideas?

thanks,

George
 
D

Dave Miller

George said:
Hi All:
We are having a problem with an application that runs under
tomcat. One thing this application does is send binary files to a
remote printer. We know that the code in this application has at
least one problem. It handles the binary data as a String object and
we are told that we should not be doing this.
We'll fix this, but we hope this fixes our problem, because the
application seems to work fine for a few days. Then it gets 'stuck'
and sends garbled binary files to remote printer from that point on.
Suggests that the problem is in the use of cache. Do you write directly
to the printer or are you writing via the host's spooler? If the former,
check how the cache is being handled on the printer side; if the later
look at spooler.
Sometimes restarting the tomcat application seems to fix things.
Sometimes rebooting the host seems to fix things. Last time nothing
did and we had to switch over to another tomcat server.
Are you writing the data to disk as part of the process? If not, a hard
reboot has to clear the server's cache which leaves the printer's.
 
A

Arne Vajhøj

George said:
We are having a problem with an application that runs under
tomcat. One thing this application does is send binary files to a
remote printer. We know that the code in this application has at
least one problem. It handles the binary data as a String object and
we are told that we should not be doing this.
We'll fix this, but we hope this fixes our problem, because the
application seems to work fine for a few days. Then it gets 'stuck'
and sends garbled binary files to remote printer from that point on.
Sometimes restarting the tomcat application seems to fix things.
Sometimes rebooting the host seems to fix things. Last time nothing
did and we had to switch over to another tomcat server.
We are running the application on tomcat 6.0.14, using
jdk1.5.0.12.

Start by fixing the known problem and take it from there.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top