Jump to content
We've recently updated our Privacy Statement, available here ×

No Printer found (NT Tomcat service)


2005 IR Help

Recommended Posts

By: steveRU - stevesfn

No Printer found (NT Tomcat service)

2004-11-02 07:28

Hi,

 

I get the following error when attempting to print to the default Win2K printer with Tomcat running as a Windows service:

 

2004-11-02 15:10:40 java.awt.print.PrinterException: No printer found.

at sun.awt.windows.WPrinterJob._startDoc(Native Method)

at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:673)

at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:310)

at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:232)

at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:131)

at net.sf.jasperreports.engine.JasperPrintManager.printPages(JasperPrintManager.java:392)

at net.sf.jasperreports.engine.JasperPrintManager.printReport(JasperPrintManager.java:283)

at co.uk.swintontechnology.util.PrintEngine.processStationReport(PrintEngine.java:508)

at co.uk.swintontechnology.util.PrintEngine.processIt(PrintEngine.java:131)

 

My servlet code:

 

506: JasperFillManager jfm = new JasperFillManager();

507: JasperPrint jp = jfm.fillReport(fileName, parameters, conn);

508: JasperPrintManager.printReport(jp,false);

 

If I run Tomcat in the foreground (via startup.bat) everything works ok and Jasper prints my report to the default printer.

 

I think it is an issue with windows security/JVM/AWT.

 

Does anybody know a workaround with the packages I am using, or have successful experience of later packages that allow Tomcat to run as a (headless) service on Win2k/XP and print to Windows printers.

 

My packages:

OS: Win2k

JDK: 1.3.1_09

Tomcat: 4.1.27

JasperReports: jasperreports-0.6.0.jar

 

Thanks in advance for any assistance.

 

Steve

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...