This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have an unusual situation. We have code in place to capture text from a terminal emulation window (legacy application). The text is stored in a vector. I then call a method to send the text in the vector to the printer.
Here is the weird thing. We have about 30,000 users for the application. A select few of these users are having problems printing. It is very sporadic. Some users can print no problem. Other users send to the printer and do not receive any printouts, not even blank pages. Some of the users do have a cover page that prints before our information gets sent to the printer. This cover page contains the userID, ect of the person who is running a print job, and is part of the system in place at their place of work.
Some users have difficulty printing on a certain printer, so they select a different printer on their network and on the 2nd printer, everything prints fine.
The printers that seem to be having the issues are: Lexmark c910 ps3 Lexmark t622Ps3 Lexmark w820 PS 3
Does anyone know of any issues with Java on these printers?
If posting my code would help, let me know. Thanks.
This forum doesn't get much traffic and it doesn't sound like you are using an applet, so you should post your problem in a more applicable forum. If you are using the java.awt.print or javax.print classes to print, try the Swing/AWT/SWT/Jface forum. If you are using some other way to print, try one of the Java In General forums, like the Intermediate forum. Posting a SMALL snipped of your code will be helpful, as is any other information, like exception stack traces. My wild guess is that you have a "race condition". Some variable in your print processing class is getting hit by multiple threads at the same time and the result is that you lose information.
It is a JApplet actually. And the printing is done with the PrintJob and Graphics classes. There's almost 200 lines of code. I also have this posted on a java.sun.com forum. Just looking for input, not worried about forum traffic.
Originally posted by Kim Thompson: Just looking for input, not worried about forum traffic.
More eyeballs == greater chance for a helpful answer. I'd still suggest posting to the Swing forum. So the JApplet is sending the job directly to the printers? Are the printers used for any other printing tasks? If so, do those tasks get lost as well? Are the printers on the network, or are they controlled through a print server? About how much information are you printing at one time? Is it always the same users who have problems? If so, do they have the weakest hardware? My wild guess now is that the printer/print server or the client is running out of spool space. The Java Printing API can generate HUGE spool files. Do you check the Java Console of the client applet when these events occur? Also, check your source and make sure you are printing out EVERY exception that can occur. I've seen more than one person here claiming that their code doesn't encounter any exceptions, but then they've wrapped their code with something like this:
At the VERY least, make sure there's an e.printStackTrace() in that catch block so in the event an exception does occur, you'll know.