Uploaded image for project: 'VPMS Web Application'
  1. OVPMS-1916

Handle JasperReport 'No suitable print service found.' errors

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9
    • Fix Version/s: 2.0
    • Component/s: Reporting
    • Labels:
      None
    • Sprint:

      Description

      If JasperReports cannot locate a printer, it raises a net.sf.jasperreports.engine.JRException with the message 'No suitable print service found' (see stack below).
      This might be caused by:

      • printers being changed, but the corresponding Document Template Printers not being updated.
      • a printer not being able to support the requested paper size.

      Before performing a print, the existence of the printer should be checked if the name comes from the Document Template.
      If printing fails, error reporting of 'No suitable print service found' messages should be suppressed.

      Stack trace, from a 1.9 error report:

      org.openvpms.report.ReportException: Failed to generate report receiptA5.jrxml: No suitable print service found.
      	at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:463)
      	at org.openvpms.web.component.im.report.Reporter.print(Reporter.java:152)
      	at org.openvpms.web.component.im.print.AbstractIMPrinter.print(AbstractIMPrinter.java:82)
      	at org.openvpms.web.component.print.InteractivePrinter.doPrint(InteractivePrinter.java:427)
      	at org.openvpms.web.component.print.InteractivePrinter.printDirect(InteractivePrinter.java:417)
      	at org.openvpms.web.component.print.InteractivePrinter.print(InteractivePrinter.java:177)
      	at org.openvpms.web.component.print.InteractivePrinter.print(InteractivePrinter.java:160)
      	at org.openvpms.web.component.workspace.AbstractCRUDWindow.print(AbstractCRUDWindow.java:846)
      	at org.openvpms.web.workspace.customer.account.AccountCRUDWindow.onPrint(AccountCRUDWindow.java:140)
      	at org.openvpms.web.component.workspace.AbstractCRUDWindow$4.onAction(AbstractCRUDWindow.java:493)
      	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:178)
      	at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.openvpms.web.echo.servlet.Log4JMDCUserFilter.doFilter(Log4JMDCUserFilter.java:58)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	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:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: net.sf.jasperreports.engine.JRException: No suitable print service found.
      	at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:321)
      	at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:816)
      	at org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:461)
      	... 74 more
      

        Attachments

          Activity

            People

            • Assignee:
              tanderson Tim Anderson
              Reporter:
              tanderson Tim Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h

                  Who's Looking?