Failed to generate report: No suitable print service found

Hello & Happy Christmas all!

I am getting the above error when I try to label print from OpenVPMS.

I am running FreeBSD 9.0.  I have installed ireports.  My print server is CUPS and I have tried printing to both local and network printers.  The printers work when printing the ooo documents from OPV.    Just on the off-chance, I linked the mysql connector to the ireports /bin folder, but that did not solve the problem.

 

I assume I need to do some more configuration to ireports, but I don't know what.  Here is the error report generated by OPV:

 

<error-report>
<version>1.6-beta-3</version>
<revision>4887</revision>
<message>Failed to generate report: No suitable print service found.</message>
<exception>
<type>org.openvpms.report.ReportException</type>
<message>Failed to generate report: No suitable print service found.</message>
<stackTrace>
<trace>org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:420)</trace>
<trace>org.openvpms.web.component.im.report.Reporter.print(Reporter.java:153)</trace>
<trace>org.openvpms.web.component.im.print.AbstractIMPrinter.print(AbstractIMPrinter.java:78)</trace>
<trace>org.openvpms.web.component.print.InteractivePrinter.doPrint(InteractivePrinter.java:370)</trace>
<trace>org.openvpms.web.component.print.InteractivePrinter$2.onClose(InteractivePrinter.java:339)</trace>
<trace>org.openvpms.web.component.event.WindowPaneListener.windowPaneClosing(WindowPaneListener.java:39)</trace>
<trace>nextapp.echo2.app.WindowPane.fireWindowClosing(WindowPane.java:154)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.fireWindowClosing(PopupWindow.java:221)</trace>
<trace>nextapp.echo2.app.WindowPane.userClose(WindowPane.java:795)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.userClose(PopupDialog.java:227)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.close(PopupWindow.java:145)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.close(PopupDialog.java:363)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.onOK(PopupDialog.java:279)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.onButton(PopupDialog.java:250)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog$2.onAction(PopupDialog.java:394)</trace>
<trace>org.openvpms.web.component.event.ActionListener.actionPerformed(ActionListener.java:41)</trace>
<trace>nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135)</trace>
<trace>echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120)</trace>
<trace>nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)</trace>
<trace>echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51)</trace>
<trace>echopointng.ButtonEx.processInput(ButtonEx.java:202)</trace>
<trace>nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)</trace>
<trace>nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)</trace>
<trace>nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471)</trace>
<trace>nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273)</trace>
<trace>org.openvpms.web.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:148)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:637)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</trace>
<trace>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</trace>
<trace>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</trace>
<trace>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</trace>
<trace>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</trace>
<trace>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)</trace>
<trace>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)</trace>
<trace>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)</trace>
<trace>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)</trace>
<trace>java.lang.Thread.run(Thread.java:679)</trace>
</stackTrace>
<cause>
<type>net.sf.jasperreports.engine.JRException</type>
<message>No suitable print service found.</message>
<stackTrace>
<trace>net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:150)</trace>
<trace>org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:698)</trace>
<trace>org.openvpms.report.jasper.AbstractJasperIMReport.print(AbstractJasperIMReport.java:418)</trace>
<trace>org.openvpms.web.component.im.report.Reporter.print(Reporter.java:153)</trace>
<trace>org.openvpms.web.component.im.print.AbstractIMPrinter.print(AbstractIMPrinter.java:78)</trace>
<trace>org.openvpms.web.component.print.InteractivePrinter.doPrint(InteractivePrinter.java:370)</trace>
<trace>org.openvpms.web.component.print.InteractivePrinter$2.onClose(InteractivePrinter.java:339)</trace>
<trace>org.openvpms.web.component.event.WindowPaneListener.windowPaneClosing(WindowPaneListener.java:39)</trace>
<trace>nextapp.echo2.app.WindowPane.fireWindowClosing(WindowPane.java:154)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.fireWindowClosing(PopupWindow.java:221)</trace>
<trace>nextapp.echo2.app.WindowPane.userClose(WindowPane.java:795)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.userClose(PopupDialog.java:227)</trace>
<trace>org.openvpms.web.component.dialog.PopupWindow.close(PopupWindow.java:145)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.close(PopupDialog.java:363)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.onOK(PopupDialog.java:279)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog.onButton(PopupDialog.java:250)</trace>
<trace>org.openvpms.web.component.dialog.PopupDialog$2.onAction(PopupDialog.java:394)</trace>
<trace>org.openvpms.web.component.event.ActionListener.actionPerformed(ActionListener.java:41)</trace>
<trace>nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135)</trace>
<trace>echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120)</trace>
<trace>nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)</trace>
<trace>echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51)</trace>
<trace>echopointng.ButtonEx.processInput(ButtonEx.java:202)</trace>
<trace>nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)</trace>
<trace>nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)</trace>
<trace>nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471)</trace>
<trace>nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273)</trace>
<trace>org.openvpms.web.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:148)</trace>
<trace>nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:637)</trace>
<trace>javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)</trace>
<trace>org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)</trace>
<trace>org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)</trace>
<trace>org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)</trace>
<trace>org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</trace>
<trace>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</trace>
<trace>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</trace>
<trace>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</trace>
<trace>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</trace>
<trace>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</trace>
<trace>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</trace>
<trace>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)</trace>
<trace>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)</trace>
<trace>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)</trace>
<trace>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)</trace>
<trace>java.lang.Thread.run(Thread.java:679)</trace>
</stackTrace>
</cause>
</exception>
<freeMemory>62627944</freeMemory>
<totalMemory>129892352</totalMemory>
<maxMemory>518979584</maxMemory>
<properties>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="sun.boot.library.path" value="/usr/local/openjdk6/jre/lib/i386"/>
<property name="java.vm.version" value="20.0-b12"/>
<property name="shared.loader" value=""/>
<property name="java.vm.vendor" value="Sun Microsystems Inc."/>
<property name="java.vendor.url" value="http://java.sun.com/"/>
<property name="path.separator" value=":"/>
<property name="java.vm.name" value="OpenJDK Client VM"/>
<property name="tomcat.util.buf.StringCache.byte.enabled" value="true"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="/"/>
<property name="java.runtime.version" value="1.6.0_32-b26"/>
<property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="/usr/local/apache-tomcat-6.0/endorsed"/>
<property name="os.arch" value="i386"/>
<property name="java.io.tmpdir" value="/usr/local/apache-tomcat-6.0/temp"/>
<property name="line.separator" value="
"/>
<property name="java.vm.specification.vendor" value="Sun Microsystems Inc."/>
<property name="java.naming.factory.url.pkgs" value="org.apache.naming"/>
<property name="os.name" value="FreeBSD"/>
<property name="sun.jnu.encoding" value="ISO8859-1"/>
<property name="org.apache.commons.jxpath.JXPathContextFactory" value="org.openvpms.component.system.common.jxpath.OpenVPMSContextFactoryReferenceImpl"/>
<property name="java.library.path" value="/usr/local/openjdk6/jre/lib/i386/client:/usr/local/openjdk6/jre/lib/i386:/usr/local/openjdk6/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib:/usr/local/lib"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="50.0"/>
<property name="sun.management.compiler" value="HotSpot Client Compiler"/>
<property name="os.version" value="9.0-RELEASE"/>
<property name="user.home" value="/nonexistent"/>
<property name="user.timezone" value="Europe/London"/>
<property name="catalina.useNaming" value="true"/>
<property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
<property name="java.specification.version" value="1.6"/>
<property name="file.encoding" value="ISO8859-1"/>
<property name="catalina.home" value="/usr/local/apache-tomcat-6.0"/>
<property name="user.name" value="www"/>
<property name="java.class.path" value="/usr/local/apache-tomcat-6.0/bin/bootstrap.jar:"/>
<property name="java.naming.factory.initial" value="org.apache.naming.java.javaURLContextFactory"/>
<property name="openvpms" value="/usr/local/apache-tomcat-6.0/webapps/openvpms/"/>
<property name="package.definition" value="sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper."/>
<property name="java.vm.specification.version" value="1.0"/>
<property name="sun.arch.data.model" value="32"/>
<property name="java.home" value="/usr/local/openjdk6/jre"/>
<property name="sun.java.command" value="org.apache.catalina.startup.Bootstrap start"/>
<property name="java.specification.vendor" value="Sun Microsystems Inc."/>
<property name="user.language" value="en"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.6.0_32"/>
<property name="java.ext.dirs" value="/usr/local/openjdk6/jre/lib/ext:/usr/java/packages/lib/ext"/>
<property name="sun.boot.class.path" value="/usr/local/openjdk6/jre/lib/resources.jar:/usr/local/openjdk6/jre/lib/rt.jar:/usr/local/openjdk6/jre/lib/sunrsasign.jar:/usr/local/openjdk6/jre/lib/jsse.jar:/usr/local/openjdk6/jre/lib/jce.jar:/usr/local/openjdk6/jre/lib/charsets.jar:/usr/local/openjdk6/jre/lib/modules/jdk.boot.jar:/usr/local/openjdk6/jre/classes"/>
<property name="java.vendor" value="Sun Microsystems Inc."/>
<property name="server.loader" value=""/>
<property name="catalina.base" value="/usr/local/apache-tomcat-6.0"/>
<property name="file.separator" value="/"/>
<property name="java.vendor.url.bug" value="http://java.sun.com/cgi-bin/bugreport.cgi"/>
<property name="common.loader" value="${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="package.access" value="sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans."/>
<property name="sun.cpu.isalist" value=""/>
</properties>
</error-report>

 

Any help much appreciated.  Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Failed to generate report: No suitable print service found

When you print a report from an OpenOffice template, OpenVPMS passes them to OpenOffice to print.

Reports that are generated from a Jasper Reports template are printed via OpenVPMS.

Can you verify that the user running Tomcat has permissions to print to the relevant print service?

-Tim

Re: Failed to generate report: No suitable print service found

Tim,  Thank you for your reply.  I think you may be on the right track in that my user permissions are not correct.

I run tomcat as user "openvpms".  But I am confused - how do I grant my user "openvpms" permission to print via "openvpms"?

 

Cahir

Re: Failed to generate report: No suitable print service found

To summarize what I've done so far (without success)

Created a user "openvpms" with access to the cups print group so it can use the CUPs server.

Made this "openvpms" user the owner of the tomcat6 process at startup.

Also made "openvpms" user the owner of the soffice process for accessing openoffice.

Created path variables for jdk and openoffice in the user "openvpms" shell.

 

I have not yet been able to make "openvpms" user the owner of the jsvc process, that user is set to www.  Am I missing some OpenVPMS-specific configuration?

Re: Failed to generate report: No suitable print service found

OK,

  Thanks for your help so far guys, but I still cannot print anything.  E.g. I go to a patient's medical records and hit the print button, but I still get "No print service found"

I have created a user openvpms and launched tomcat from the command line as that user.  The openvpms user is a member of groups cups, sudo, www

I have also manually launched openoffice as that user.

 

Nothing seems to sort this problem out though.  The only lead I have is that I can't launch OPV by running "/usr/local/etc/rc.d/tomcat6 start" when I am user openvpms.  I need to be root for that.  Anyone got any ideas?  I am even happy for a complete reinstall at this stage.  Is there something I am missing about print config?

Cheers

Re: Failed to generate report: No suitable print service found

Can you run iReport as the same user running tomcat and print anything from it?

-Tim

Re: Failed to generate report: No suitable print service found

Tim,

   Thank you for your reply.  I think I have the same problem with ireport.

 

I can see all printers listed under CUPS, but I cannot print anything to them.  The print jobs do not even show up in CUPS.  I have printer sharing enabled.

Re: Failed to generate report: No suitable print service found

This CUPS FAQ is fairly old but may be relevant: http://www.cups.org/articles.php?L433+TFAQ+Q

-Tim

Re: Failed to generate report: No suitable print service found

Hi Cahir,

make sure you have a printer set as the default printer on your cups server. Tomcat can't print to cups unless this is set for some reason. After you do this restart cups and then restart tomcat.

Print jobs from ireport on my system are sent to cups with the root user. Sounds like we have a similar setup. I know that on some printers I have needed to explicitly allowing printing from the root user in the cups setup for that printer. 

Matt Y. 

Syndicate content