RE: embedding fop0.20.5 working on jdk1.3.1-linux?
Hi, In fact I faced a similar problem. It is most likely that your batik jar files you have included (apart from batik.jar file that comes with FOP) is causing the problem. I don't know your classpath, however, check if you have added batik-ext.jar (that comes with batik distribution) to your class path, this also has the w3c parser files. If this is so, try removing the class files which are part of xerces from batik-ext.jar file. Ganesh -Original Message- From: Cai, Judy [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 6:24 PM To: '[EMAIL PROTECTED]' Subject: RE: embedding fop0.20.5 working on jdk1.3.1-linux? Thanks, Ganesh Is XML parsers xercesImpl-2.2.1.jar? I can not find other XML Parsers in my classpath and current fop0.20.5 directory. I tried running the Sample document on the command line on the linux machine? There is also java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found. I narrowed down the problem to the input image file from my xsl file. If I comment fo:blockfo:external-graphic src=file:nsf_logo.svg / /fo:block from my xsl file, it did generate PDF file. Otherwise, it will cause java.lang.NoSuchMethodError method: org.apache.batik.dom.AbstractAttr: isReadonly()Z not found. But I put svg image files, xml file, xsl file, pdf file and fop.sh in the same folder fop-0.20.5. There is no reason FOP can not find the image file. Could you explain the reason? Thanks Judy Cai -Original Message- From: Ganesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 11:41 PM To: [EMAIL PROTECTED] Subject: RE: embedding fop0.20.5 working on jdk1.3.1-linux? java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) at org.apache.batik.dom.svg.AbstractElement$ExtendedNamedNodeHashMap.setUns peci fiedAttribute(AbstractElement.java:238) These isReadonly error comes only when there is more than one XML parsers are available in your classpath or current directory. Check it out. Ganesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) at org.apache.batik.dom.svg.AbstractElement$ExtendedNamedNodeHashMap.setUns peci fiedAttribute(AbstractElement.java:238) These isReadonly error comes only when there is more than one XML parsers are available in your classpath or current directory. Check it out. Ganesh -Original Message- From: Cai, Judy [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 11:17 PM To: '[EMAIL PROTECTED]' Subject: RE: embedding fop0.20.5 working on jdk1.3.1-linux? I tried to trace the exception stack. But I still don't know where is going wrong. Is the problem is batik.jar or something else. Could you give me some hint? Here is the output: root cause java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) at org.apache.batik.dom.svg.AbstractElement$ExtendedNamedNodeHashMap.setUns peci fiedAttribute(AbstractElement.java:238) at org.apache.batik.dom.svg.AbstractElement.setUnspecifiedAttribute(Abstrac tEle ment.java:149) at org.apache.batik.dom.svg.AttributeInitializer.resetAttribute(AttributeIn itia lizer.java:94) at org.apache.batik.dom.svg.AttributeInitializer.initializeAttributes(Attri bute Initializer.java:70) at org.apache.batik.dom.svg.AbstractElement.initializeAttributes(AbstractEl emen t.java:115) at org.apache.batik.dom.svg.AbstractElement.(AbstractElement.java:59) at org.apache.batik.dom.svg.SVGOMElement.(SVGOMElement.java:72) at org.apache.batik.dom.svg.SVGStylableElement.(SVGStylableElement.java:70) at org.apache.batik.dom.svg.SVGOMSVGElement.(SVGOMSVGElement.java:103) at org.apache.batik.dom.svg.SVGDOMImplementation$SvgElementFactory.create(S VGDO MImplementation.java:1508) at org.apache.batik.dom.svg.ExtensibleSVGDOMImplementation.createElementNS( Exte nsibleSVGDOMImplementation.java:212) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(SVGOMDocument.jav a:33 8) at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(SVGDOMImple ment ation.java:175) at org.apache.batik.dom.util.SAXDocumentFactory.startElement(SAXDocumentFac tory .java:471) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scan Root ElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentF acto ry.java:347) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentF acto ry.java:276) at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocu ment Factory.java:183) at org.apache.fop.image.analyser.SVGReader.loadImage(SVGReader.java:101) at org.apache.fop.image.analyser.SVGReader.verifySignature(SVGReader.java:8 5) at org.apache.fop.image.analyser.ImageReaderFactory.Make(ImageReaderFactory .jav a:129) at org.apache.fop.image.FopImageFactory.Make(FopImageFactory.java:181) at org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:188) at org.apache.fop.fo.flow.Block.layout(Block.java:257) at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:326) at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360) at org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:2 36) at org.apache.fop.fo.flow.Table.layout(Table.java:302) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400 ) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) at org.apache.xalan.transformer.ResultTreeHandler.endElement
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
Thanks, Ganesh Is XML parsers xercesImpl-2.2.1.jar? I can not find other XML Parsers in my classpath and current fop0.20.5 directory. I tried running the Sample document on the command line on the linux machine? There is also java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found. I narrowed down the problem to the input image file from my xsl file. If I comment fo:blockfo:external-graphic src=file:nsf_logo.svg / /fo:block from my xsl file, it did generate PDF file. Otherwise, it will cause java.lang.NoSuchMethodError method: org.apache.batik.dom.AbstractAttr: isReadonly()Z not found. But I put svg image files, xml file, xsl file, pdf file and fop.sh in the same folder fop-0.20.5. There is no reason FOP can not find the image file. Could you explain the reason? Thanks Judy Cai -Original Message- From: Ganesh [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 11:41 PM To: [EMAIL PROTECTED] Subject: RE: embedding fop0.20.5 working on jdk1.3.1-linux? java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) at org.apache.batik.dom.svg.AbstractElement$ExtendedNamedNodeHashMap.setUns peci fiedAttribute(AbstractElement.java:238) These isReadonly error comes only when there is more than one XML parsers are available in your classpath or current directory. Check it out. Ganesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
I just change (fo:external-graphic src) to jpg file from svg file. Fop did work for me. Now I guess the reason why the same code works fine in jdk1.4.1 on windows XP not in jdk1.3.1 on linux. My Open BSD may not support graphical environment for SVG. Am I right? Any solution for it? Thanks Judy Cai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
This may be way off base, and if so, my apologies... Cai, Judy wrote: I just change (fo:external-graphic src) to jpg file from svg file. Fop did work for me. Now I guess the reason why the same code works fine in jdk1.4.1 on windows XP not in jdk1.3.1 on linux. My Open BSD may not support graphical environment for SVG. Am I right? Any solution for it? Thanks Judy Cai Is it possible that the Linux box is running headless? If so, this might help: http://xml.apache.org/fop/graphics.html#batik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
Try to find out if anything is logged in the Tomcat Logs. If not try to set your own logger for FOP: [1] http://xml.apache.org/fop/embedding.html#basic-logging [2] http://xml.apache.org/fop/embedding.html#logging If your Linux is running in a headless environment (no X subsystem) then the following link may help: http://xml.apache.org/fop/graphics.html#batik Good luck! On 15.09.2003 22:54:30 Cai, Judy wrote: I have a java servlet to generate a PDF page using fop0.20.5. It works fine in the windows XP ( jdk1.4.1 on tomcat-4.1.24 server). But when I moved to Open BSD with jdk1.3.1-linux on tomcat-4.1.24, there was nothing to display, no any error or exception, just blank page. I was exhausted to figure it out. Will anybody tell me some experience working fop on jdk1.3.1-linux? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
Hi, Maerki I find out tomcat logs file. But there is log information from linux: [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] [1] [INFO] JkCoyoteHandler - -RESET And at the same time the browser show the exception: ( HTTP Status 500 - exception javax.servlet.ServletException: Servlet execution threw an exception ) But the same servlet display PDF page in windows xp browser, the tomcat log info is: [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] Parsing of document complete, stopping renderer [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] Parsing of document complete, stopping renderer Do you have any idea about this error? Thanks Judy Cai -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 8:32 AM To: [EMAIL PROTECTED] Subject: Re: embedding fop0.20.5 working on jdk1.3.1-linux? Try to find out if anything is logged in the Tomcat Logs. If not try to set your own logger for FOP: [1] http://xml.apache.org/fop/embedding.html#basic-logging [2] http://xml.apache.org/fop/embedding.html#logging If your Linux is running in a headless environment (no X subsystem) then the following link may help: http://xml.apache.org/fop/graphics.html#batik Good luck! On 15.09.2003 22:54:30 Cai, Judy wrote: I have a java servlet to generate a PDF page using fop0.20.5. It works fine in the windows XP ( jdk1.4.1 on tomcat-4.1.24 server). But when I moved to Open BSD with jdk1.3.1-linux on tomcat-4.1.24, there was nothing to display, no any error or exception, just blank page. I was exhausted to figure it out. Will anybody tell me some experience working fop on jdk1.3.1-linux? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
On 16.09.2003 17:52:33 Cai, Judy wrote: snip/ [INFO] JkCoyoteHandler - -RESET This here could give an indication what went wrong. I don't know. And at the same time the browser show the exception: ( HTTP Status 500 - exception javax.servlet.ServletException: Servlet execution threw an exception ) Is that all? Didn't Tomcat display a full stacktrace? If yes, you could find the original exception down in the stacktrace. The above alone doesn't help. snip/ Do you have any idea about this error? Not really. If logging the error doesn't help, modify the servlet, catch Exception and log it explicitely. That way you should get more information. Happy hunting. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
One more thing: After I run this servlet, I will get a java.lang.OutOfMemoryError when I try to display another web page. Here is my code about FOP: public static final String XSLFILE = /hr/xsl/jobdesc.xsl; protected Logger log = null; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ... if (log == null) { log = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); MessageHandler.setScreenLogger(log); } try { ... String fullPath = getServletContext().getRealPath( XSLFILE ); File xslfile = new File(fullPath); // create StreamSource for XSLT document Source xslSource = new StreamSource( xslfile ); // create DOMSource for source XML document Source xmlSource = new DOMSource( jobDocument ); renderBrowser(xmlSource, xslSource, response ); } // catch XML parser exceptions catch ( ParserConfigurationException pcException ) { pcException.printStackTrace(); } catch (ServletException ex) { throw ex; } catch (Exception ex) { throw new ServletException(ex); } } private void renderBrowser( Source xmlSource, Source xslSource, HttpServletResponse response ) throws ServletException { try { //Construct driver Driver driver = new Driver(); //Setup logger Renderer (output format) driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); //Setup output ByteArrayOutputStream out = new ByteArrayOutputStream(); driver.setOutputStream(out); // create TransformerFactory to obtain a Transformer TransformerFactory transformerFactory = TransformerFactory.newInstance(); // create Transformer for performing XSL transformation Transformer transformer = transformerFactory.newTransformer( xslSource ); //Resulting SAX events (the generated FO) must be piped through to FOP Result result = new SAXResult(driver.getContentHandler()); // perform transformation and deliver content to client transformer.transform( xmlSource, result ); byte[] content = out.toByteArray(); response.setContentType(application/pdf); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } // handle exception when transforming XML document catch ( TransformerException transformerException ) { transformerException.printStackTrace( System.err ); } catch (Exception ex) { throw new ServletException(ex); } } I really need help to fix this problem. Thanks Judy Cai -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 8:32 AM To: [EMAIL PROTECTED] Subject: Re: embedding fop0.20.5 working on jdk1.3.1-linux? Try to find out if anything is logged in the Tomcat Logs. If not try to set your own logger for FOP: [1] http://xml.apache.org/fop/embedding.html#basic-logging [2] http://xml.apache.org/fop/embedding.html#logging If your Linux is running in a headless environment (no X subsystem) then the following link may help: http://xml.apache.org/fop/graphics.html#batik Good luck! On 15.09.2003 22:54:30 Cai, Judy wrote: I have a java servlet to generate a PDF page using fop0.20.5. It works fine in the windows XP ( jdk1.4.1 on tomcat-4.1.24 server). But when I moved to Open BSD with jdk1.3.1-linux on tomcat-4.1.24, there was nothing to display, no any error or exception, just blank page. I was exhausted to figure it out. Will anybody tell me some experience working fop on jdk1.3.1-linux? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java: 1107) at cec.bms.servlets.hr.job.AddJobXML.renderBrowser(AddJobXML.java:270) at cec.bms.servlets.hr.job.AddJobXML.doGet(AddJobXML.java:184) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:479) Thanks Judy Cai -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 12:07 PM To: [EMAIL PROTECTED] Subject: Re: embedding fop0.20.5 working on jdk1.3.1-linux? On 16.09.2003 17:52:33 Cai, Judy wrote: snip/ [INFO] JkCoyoteHandler - -RESET This here could give an indication what went wrong. I don't know. And at the same time the browser show the exception: ( HTTP Status 500 - exception javax.servlet.ServletException: Servlet execution threw an exception ) Is that all? Didn't Tomcat display a full stacktrace? If yes, you could find the original exception down in the stacktrace. The above alone doesn't help. snip/ Do you have any idea about this error? Not really. If logging the error doesn't help, modify the servlet, catch Exception and log it explicitely. That way you should get more information. Happy hunting. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
On 16.09.2003 19:47:03 Cai, Judy wrote: I tried to trace the exception stack. But I still don't know where is going wrong. Is the problem is batik.jar or something else. Could you give me some hint? Here is the output: root cause java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) Obviously, this has something to do with Batik, right? Have you checked that you're using the right batik.jar (the one that comes with the FOP version you're using) and that no other batik.jar is somewhere in the classpath. You could enable classloading verbosity (-verbos:class) to find out where the classes are loaded from. Have you tried running the same document on the command line on the linux machine? AbstractElement.setUnspecifiedAttribute This method may (!) indicate that you have an unsupported attribute somewhere in your SVG code. I'm not sure. Try commenting out all SVG elements and see if that changes anything. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
It could be that you may need to limit the number of simultaneous runs on the FOP servlet or that you have to increase VM size or something. See: http://xml.apache.org/fop/running.html#memory for hints On 16.09.2003 18:13:55 Cai, Judy wrote: After I run this servlet, I will get a java.lang.OutOfMemoryError when I try to display another web page. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
Thanks, Maerki. I use batik.jar that comes with the FOP. I tried running the Sample doucment on the command line on the linux machine? The result is the same: [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [INFO] [1] [INFO] [1] Exception in thread main java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.init(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) I am a new graduate from school and programming experience is kind of poor. I don't know how to enable classloading verbosity. Help me! Thanks Judy Cai -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 2:26 PM To: [EMAIL PROTECTED] Subject: Re: embedding fop0.20.5 working on jdk1.3.1-linux? On 16.09.2003 19:47:03 Cai, Judy wrote: I tried to trace the exception stack. But I still don't know where is going wrong. Is the problem is batik.jar or something else. Could you give me some hint? Here is the output: root cause java.lang.NoSuchMethodError: org.apache.batik.dom.AbstractAttr: method isReadonly()Z not found at org.apache.batik.dom.GenericAttr.(GenericAttr.java:42) at org.apache.batik.dom.AbstractAttr.setValue(AbstractAttr.java:177) Obviously, this has something to do with Batik, right? Have you checked that you're using the right batik.jar (the one that comes with the FOP version you're using) and that no other batik.jar is somewhere in the classpath. You could enable classloading verbosity (-verbos:class) to find out where the classes are loaded from. Have you tried running the same document on the command line on the linux machine? AbstractElement.setUnspecifiedAttribute This method may (!) indicate that you have an unsupported attribute somewhere in your SVG code. I'm not sure. Try commenting out all SVG elements and see if that changes anything. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding fop0.20.5 working on jdk1.3.1-linux?
On 16.09.2003 21:12:12 Cai, Judy wrote: Thanks, Maerki. Well, Maerki is my lastname, you know. :-) I use batik.jar that comes with the FOP. I tried running the Sample doucment on the command line on the linux machine? The result is the same: snip/ You get the same result so it must be something with your input document, not with the Tomcat environment (Error-finding by exclusion). I am a new graduate from school and programming experience is kind of poor. I don't know how to enable classloading verbosity. Help me! I meant calling java.exe with the -verbose:class option. When you call java -? on the command line you see all its available options. When -verbose:class is set, you should receive lots of lines, one for each loaded class with information where the class was loaded from. This can help identify classloading problems (duplicate jars in the classpath, for example). But this step is now mostly superfluous because you saw that the same result happens on the command line. As the next step I suggest commenting out portions of your input document or stylesheet to further narrow down the problem point. That's a tedious job but it is a technique I often use with success. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: embedding fop0.20.5 working on jdk1.3.1-linux?
Thank you so much, Jeremias. I narrow down the problem to the input image file from xsl file. If I add fo:blockfo:external-graphic src=file:nsf_logo.svg / /fo:block to my xsl file, it will cause java.lang.NoSuchMethodError. If I comment it out, it did generate PDF file. But I am wondering I put image files, xml file, xsl file, pdf file and fop.sh in the same folder fop-0.20.5. There is no reason FOP can not find the image file. Could you explain the reason? Thanks Judy Cai -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:48 PM To: [EMAIL PROTECTED] Subject: Re: embedding fop0.20.5 working on jdk1.3.1-linux? On 16.09.2003 21:12:12 Cai, Judy wrote: Thanks, Maerki. Well, Maerki is my lastname, you know. :-) I use batik.jar that comes with the FOP. I tried running the Sample doucment on the command line on the linux machine? The result is the same: snip/ You get the same result so it must be something with your input document, not with the Tomcat environment (Error-finding by exclusion). I am a new graduate from school and programming experience is kind of poor. I don't know how to enable classloading verbosity. Help me! I meant calling java.exe with the -verbose:class option. When you call java -? on the command line you see all its available options. When -verbose:class is set, you should receive lots of lines, one for each loaded class with information where the class was loaded from. This can help identify classloading problems (duplicate jars in the classpath, for example). But this step is now mostly superfluous because you saw that the same result happens on the command line. As the next step I suggest commenting out portions of your input document or stylesheet to further narrow down the problem point. That's a tedious job but it is a technique I often use with success. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
embedding fop0.20.5 working on jdk1.3.1-linux?
Title: embedding fop0.20.5 working on jdk1.3.1-linux? I have a java servlet to generate a PDF page using fop0.20.5. It works fine in the windows XP ( jdk1.4.1 on tomcat-4.1.24 server). But when I moved to Open BSD with jdk1.3.1-linux on tomcat-4.1.24, there was nothing to display, no any error or exception, just blank page. I was exhausted to figure it out. Will anybody tell me some experience working fop on jdk1.3.1-linux? Thanks Judy Cai