In a java application, I send a document to print to an already installed printer in the network (and when I send a test page from the computer, it does recieve and print it), but that document never reaches the printer and in the console I receive an error that looks like this:

java.awt.print.PrinterException: Printer is not accepting job.
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1230)
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1196)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:186)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:88)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntPages(JasperPrintManager.java:348)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntReport(JasperPrintManager.java:239)
at net.sf.jasperreports.view.JRViewer$20.run(JRViewer .java:1090)
at java.lang.Thread.run(Thread.java:595)

NESTED BY :
java.awt.print.PrinterException: Printer is not accepting job.
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1230)
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1196)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:186)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:88)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntPages(JasperPrintManager.java:348)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntReport(JasperPrintManager.java:239)
at net.sf.jasperreports.view.JRViewer$20.run(JRViewer .java:1090)
at java.lang.Thread.run(Thread.java:595)

NESTED BY :
net.sf.jasperreports.engine.JRException: Error printing report.
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:200)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:88)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntPages(JasperPrintManager.java:348)
at net.sf.jasperreports.engine.JasperPrintManager.pri ntReport(JasperPrintManager.java:239)
at net.sf.jasperreports.view.JRViewer$20.run(JRViewer .java:1090)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.awt.print.PrinterException: Printer is not accepting job.
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1230)
at sun.print.RasterPrinterJob.print(RasterPrinterJob. java:1196)
at net.sf.jasperreports.engine.print.JRPrinterAWT.pri ntPages(JRPrinterAWT.java:186)
... 5 more

I don't have any idea of why printing within a java application does not seem to work under Ubuntu and MEPIS. I have tried it under Fedora and it does work. I was just wondering if anyone had an idea on what might be happening with the printing and how to make it work. Thank you.