We're updating the issue view to help you get more done. 

Suppress error reporting for java.awt.print.PrinterException: Invalid name of PrintService.

Description

Suppress error reporting for "java.awt.print.PrinterException: Invalid name of PrintService". It indicates a printer configuration error, rather than an error in OpenVPMS. E.g., from a 2.0.1 error report:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 org.openvpms.report.ReportException: Failed to print report Invoice.jrxml on printer Reception: java.awt.print.PrinterException: Invalid name of PrintService. at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:466) at org.openvpms.web.component.im.report.Reporter.lambda$print$1(Reporter.java:155) at org.openvpms.web.component.im.report.ReportRunner.run(ReportRunner.java:97) at org.openvpms.web.component.im.report.Reporter.generate(Reporter.java:296) at org.openvpms.web.component.im.report.Reporter.print(Reporter.java:155) at org.openvpms.web.component.im.print.AbstractIMPrinter.print(AbstractIMPrinter.java:85) at org.openvpms.web.component.print.InteractivePrinter.doPrint(InteractivePrinter.java:446) at org.openvpms.web.component.print.InteractivePrinter.printDirect(InteractivePrinter.java:412) at org.openvpms.web.component.print.InteractivePrinter.print(InteractivePrinter.java:187) at org.openvpms.web.component.print.InteractivePrinter.print(InteractivePrinter.java:167) at org.openvpms.web.component.print.BatchPrinter.print(BatchPrinter.java:172) at org.openvpms.web.workspace.workflow.checkout.PrintDocumentsTask.print(PrintDocumentsTask.java:182) at org.openvpms.web.workspace.workflow.checkout.PrintDocumentsTask.access$200(PrintDocumentsTask.java:71) at org.openvpms.web.workspace.workflow.checkout.PrintDocumentsTask$2.onClose(PrintDocumentsTask.java:150) at org.openvpms.web.echo.event.WindowPaneListener.windowPaneClosing(WindowPaneListener.java:37) at nextapp.echo2.app.WindowPane.fireWindowClosing(WindowPane.java:154) at org.openvpms.web.echo.dialog.PopupWindow.fireWindowClosing(PopupWindow.java:229) at nextapp.echo2.app.WindowPane.userClose(WindowPane.java:795) at org.openvpms.web.echo.dialog.PopupDialog.userClose(PopupDialog.java:280) at org.openvpms.web.echo.dialog.PopupWindow.close(PopupWindow.java:158) at org.openvpms.web.echo.dialog.PopupDialog.close(PopupDialog.java:450) at org.openvpms.web.echo.dialog.PopupDialog.onOK(PopupDialog.java:341) at org.openvpms.web.component.print.BatchPrintDialog.onOK(BatchPrintDialog.java:126) at org.openvpms.web.echo.dialog.PopupDialog.onButton(PopupDialog.java:312) at org.openvpms.web.echo.dialog.PopupDialog.onButtonProtected(PopupDialog.java:499) at org.openvpms.web.echo.dialog.PopupDialog.access$000(PopupDialog.java:33) at org.openvpms.web.echo.dialog.PopupDialog$2.onAction(PopupDialog.java:481) at org.openvpms.web.echo.event.ActionListener.actionPerformed(ActionListener.java:40) at nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135) at echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120) at nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70) at echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51) at echopointng.ButtonEx.processInput(ButtonEx.java:202) at nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116) at nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89) at nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471) at nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279) at nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273) at org.openvpms.web.echo.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:190) at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.openvpms.web.echo.servlet.Log4JMDCUserFilter.doFilter(Log4JMDCUserFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: net.sf.jasperreports.engine.JRException: java.awt.print.PrinterException: Invalid name of PrintService. at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:334) at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:819) at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:463) ... 93 more Caused by: java.awt.print.PrinterException: Invalid name of PrintService. at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method) at sun.awt.windows.WPrinterJob.setNativePrintServiceIfNeeded(WPrinterJob.java:620) at sun.awt.windows.WPrinterJob.setPrintService(WPrinterJob.java:608) at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:330) ... 95 more

Environment

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Components

Fix versions

Affects versions

2.0

Priority

Trivial