引起:java.awt.print.PrinterException:找不到打印服务。 Windows Server 2008 - Java

时间:2012-11-06 13:14:41

标签: java printing jasper-reports windows-server-2008

我正在尝试使用glassfish 3.1.2,JReports 4.7.1打印文档,我遇到了这个问题:

在我的电脑中,我可以毫无问题地打印,一切都很顺利。但是在我将我的应用程序部署到客户端的服务器之后,如果我尝试打印,则会收到此消息错误。有没有人通过这个,或者可以帮助我解决它?

Windows Server 2008和我的电脑是Windows 7。 打印机设置为defaut,假脱机程序正在运行,我已经重新启动它,我测试了我的程序,连接...... 在堆栈跟踪下面:

谢谢!

    [#|2012-10-30T08:30:59.293-     0300|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_Thr    eadID=171;_ThreadName=Thread-1;|net.sf.jasperreports.engine.JRException: Error printing     report.
at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:197)
at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:84)
at    net.sf.jasperreports.engine.JasperPrintManager.printPages(JasperPrintManager.java:197)
at  net.sf.jasperreports.engine.JasperPrintManager.printPage(JasperPrintManager.java:136)
at br.com.hrtech.hrprodutos.model.command.Buscador.imprimirLista(Buscador.java:138)
at br.com.hrtech.hrprodutos.controller.CBuscador.actImprimirLista(CBuscador.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at   org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
at       com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at     javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at   com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipe line.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at  com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.awt.print.PrinterException: No print service found.
    at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1305)
    at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1277)
    at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:192)
    ... 48 more

0 个答案:

没有答案