Re: FOP not properly working in UNIX environment
Thank you very much! It works fine now! J.Pietschmann wrote: > > Am 11.11.2011 23:41, schrieb Gabriele Falace: >> This servlet works fine in a Windows environment, but when the web app is >> deployed in a Unix environment I get the following error. >> ... >> It looks like FOP needs some graphics library but it fails to found them. > > FOP indeed uses some Java classes which are typically not available on > servers without a graphics environment. This can be resolved by running > the JVM in headless mode, usually by adding -Djava.awt.headless=true > to the JVM command line. Search the web for how to start Weblogic this > way. > > J.Pietschmann > > - > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > > -- View this message in context: http://old.nabble.com/FOP-not-properly-working-in-UNIX-environment-tp32828794p32853367.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: FOP not properly working in UNIX environment
Am 11.11.2011 23:41, schrieb Gabriele Falace: > This servlet works fine in a Windows environment, but when the web app is > deployed in a Unix environment I get the following error. > ... > It looks like FOP needs some graphics library but it fails to found them. FOP indeed uses some Java classes which are typically not available on servers without a graphics environment. This can be resolved by running the JVM in headless mode, usually by adding -Djava.awt.headless=true to the JVM command line. Search the web for how to start Weblogic this way. J.Pietschmann - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
FOP not properly working in UNIX environment
Hi all, I've experienced a strange problem using FOP: I've developed a servlet (actually a Struts 1.2 Action) which renders a PDF using a XML content file and a XSLT stylesheet. This servlet works fine in a Windows environment, but when the web app is deployed in a Unix environment I get the following error. <> <> <[ServletContext(id=623122,name=ragAgent,context-path=/ragAgent)] Root cause of ServletException. java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62) at java.awt.Font.initializeFont(Font.java:313) at java.awt.Font.(Font.java:349) at org.apache.xmlgraphics.java2d.GraphicContext.(GraphicContext.java:113) at org.apache.fop.render.intermediate.IFGraphicContext.(IFGraphicContext.java:42) at org.apache.fop.render.intermediate.IFRenderer.(IFRenderer.java:128) at org.apache.fop.render.RendererFactory.createRendererForDocumentHandler(RendererFactory.java:313) at org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker(RendererFactory.java:290) at org.apache.fop.render.RendererFactory.createRenderer(RendererFactory.java:270) at org.apache.fop.area.RenderPagesModel.(RenderPagesModel.java:69) at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130) at org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:102) at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:359) at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101) at org.apache.fop.apps.Fop.(Fop.java:79) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:248) at com.sanpaoloimi.rag.ragagent.struts.action.GestioneRispostaAction.printPdf(GestioneRispostaAction.java:4611) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:331) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) at com.sanpaoloimi.rag.ragagent.struts.common.RagAgentAction.execute(RagAgentAction.java:33) at com.sanpaoloimi.rag.ragagent.struts.action.GestioneRispostaAction.execute(GestioneRispostaAction.java:129) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) The server is WebLogic in both environments and CLASSPATH seems to be well set. It looks like FOP needs some graphics library but it fails to found them. -- View this message in context: http://old.nabble.com/FOP-not-properly-working-in-UNIX-environment-tp32828794p32828794.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org