Problem with javax.xml.transform.Transformer
I have two instances of Tomcat. One that has my development webapps and it is Tomcat 4.0.3. Another is empty and it is 4.0.4-b3. I put the FopServlet in the 4.0.4-b3 version and tested it out and it worked fine after some problems were resolved. Now, I've simply moved it into the webapps for my development server (4.0.3) and I start getting an error with a ClassNotFound exception on javax.xml.transform.Transformer. Anybody have any ideas? In both cases the xalan.jar is in my WEB-INF/lib directory. Thanks, Mike For futher information, here is the stack trace: javax.servlet.ServletException: javax.xml.transform.Transformer at FopServlet.renderXML(FopServlet.java:127) at FopServlet.doGet(FopServlet.java:68) 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:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1012) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 ) at java.lang.Thread.run(Thread.java:484) root cause org.apache.fop.apps.FOPException: javax.xml.transform.Transformer at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107) at FopServlet.renderXML(FopServlet.java:119) at FopServlet.doGet(FopServlet.java:68) 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:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at
SV: Embedded images - high resolution...
Okay... well im will be sure that I understand you right.. If I want a 144 dpi image- 10mm x 10 mm then I have to create a 20mm x 20mm 72 dpi image and scale it to 10x10 mm? Did I understand you right? mvh Johan -Oprindelig meddelelse-Fra: Sam Prokop [mailto:[EMAIL PROTECTED]Sendt: 20. juni 2002 11:03Til: [EMAIL PROTECTED]Emne: AW: Embedded images - high resolution... I found out, that if i use bitmaps, which are bigger, and scale them down with the attributes width and height of the fo:external-image-tag, the resolution in the output increases. i use fop 0.20.3. -Ursprüngliche Nachricht-Von: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 20. Juni 2002 10:49An: [EMAIL PROTECTED]Betreff: Embedded images - high resolution... Hi people... Is it possible to embedd a high resolution image into the PDF file, with FOP? (Thinking about 300 dpi...).. How do I do that? I can find any examples? Please help... Regards, Johan smime.p7s Description: S/MIME cryptographic signature
Re: Problem with javax.xml.transform.Transformer
i had that same error once, and the only thing i did is delete the jars and put them back and then restart the tomcat... seems strange but that worked for me... greetings Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.
Can FOP tell Acrobat Reader about wanted orientation?
Hi foppers! I'm using reports in the PDF format using an XSL-stylesheet on an XML-souce, using FOP-0.20.3. I will need to control the orientation of the output - for some reports I need portrait orientation, for others I need landscape. My current problem is with landscape. In my style sheet, I try to control this by setting page-width=297mm page-height=210mm. FOP runs fine from a command line and my Adobe Acrobat Reader 5.0 displays the result in landscape. The xsl:template match = / tag is include below. However, to get the thing printed right, I currently have to MANUALLY set Copies and Adjustment radio buttons in the Adobe Acrobat Reader 5.0 print pop-up as follows Shrink oversized pages to paper size CHECKED Expand small pages to paper size NOT CHECKED Auto-rotate and center pages NOT CHECKED Thsi is higly inconvenient for our end useres. (Also I must set paper orientation to landscape in the printer properties, but I recognize that this has nothing to do with FOP). My question: assuming, that Copies and Adjustment settings are part of the Acrobat Reader's settings for that document, is there any way to set these settings in the style sheet and getting FOP to tell Acrobat Reader about it? Or, more general, what are the possibilities with FOP to control page orientation in the resulting PDF? Any suggestions are warmly welcomed Kind regards Niels K. Henriksen. xsl:template match=/ fo:root fo:layout-master-set fo:simple-page-master master-name=A4 page-width=297mm page-height=210mm margin-top=20mm margin-bottom=15mm margin-left=15mm margin-right=15mm fo:region-before extent=20mm/ fo:region-body margin-top=20mm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=A4 fo:static-content flow-name=xsl-region-before xsl:apply-templates select=/TI025U/Bestilling/ /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates select=/TI025U/TilmeldingListe/ fo:block id=last-page-number/ !-- This block serves as a point-of-identification for something on the last page - it is needed for total number of pages. -- /fo:flow /fo:page-sequence /fo:root /xsl:template
FOP - SV: Embedded images - high resolution...
Johan Holst Nielsen wrote: Hi people... Is it possible to embedd a high resolution image into the PDF file, with FOP? (Thinking about 300 dpi...).. How do I do that? I can find any examples? Please help... Regards, Johan Hi, It does not differ from embedding low resolution pictures in any way. Just make a hi-res image and link it using : fo:external-graphic src=your-filename width=your-width/ You just supply image width in real-world length, like cm or in. You will get the resolution accoring to embedded image size in px by supplied size in inches (or cm). You can also supply height instead of width (the height/width proportions are kept ok). I have been embedding 300dpi and 1200dpi image with success. I sounds very good... thanks! Regards, Johan smime.p7s Description: S/MIME cryptographic signature
Re: Can FOP tell Acrobat Reader about wanted orientation?
Did you follow a similar discussion yesterday? http://marc.theaimsgroup.com/?t=10243211241r=1w=2 PDF does not provide what you ask. The only values you can enter in the PDF are the one you can set in File/Document Properties/Open Options... And none of them are implemented in FOP. I think that if you enable auto-rotate then the PDF should always come out correctly without having to set anything on the printer driver. For the moment you will have to stick with what you have. A possibility is to add a rotation similar the stuff I did for the PS renderer. But this would also need to be made configurable. There may be other solutions if there's no requirement that your users want to preview the PDF in Acrobat Reader before printing. But none of them is really simple. I'm using reports in the PDF format using an XSL-stylesheet on an XML-souce, using FOP-0.20.3. I will need to control the orientation of the output - for some reports I need portrait orientation, for others I need landscape. My current problem is with landscape. In my style sheet, I try to control this by setting page-width=297mm page-height=210mm. FOP runs fine from a command line and my Adobe Acrobat Reader 5.0 displays the result in landscape. The xsl:template match = / tag is include below. However, to get the thing printed right, I currently have to MANUALLY set Copies and Adjustment radio buttons in the Adobe Acrobat Reader 5.0 print pop-up as follows Shrink oversized pages to paper size CHECKED Expand small pages to paper size NOT CHECKED Auto-rotate and center pages NOT CHECKED Thsi is higly inconvenient for our end useres. (Also I must set paper orientation to landscape in the printer properties, but I recognize that this has nothing to do with FOP). My question: assuming, that Copies and Adjustment settings are part of the Acrobat Reader's settings for that document, is there any way to set these settings in the style sheet and getting FOP to tell Acrobat Reader about it? Or, more general, what are the possibilities with FOP to control page orientation in the resulting PDF? Any suggestions are warmly welcomed Cheers, Jeremias Märki
FOP build fails
Hi, I try to build FOP 0.20.3 via the build.bat script on win2k, jdk1.4.0_01 but the the build fails because some xml files can not be found. Z:\steppacher\Downloads\FOP\fop-0.20.3\build.xml:512: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File file:///Z:/steppacher/Downloads/FOP/fop-0.20.3/Z:/steppacher/Downloads/FOP/fop-0.20.3/build/src/codegen/Hel vetica-Oblique.xml not found. The file uri is incorrect but I can not find where this broken path is generated in build.xml. Everytime I build again the error moves on to the next font and linenumbers where the error occurs in build.xml change. Ralf
Re: FOP build fails
Ralf Steppacher wrote: I try to build FOP 0.20.3 via the build.bat script on win2k, jdk1.4.0_01 but the the build fails because some xml files can not be found. Try to build using jdk 1.3.X. -- Oleg Tkachenko Multiconn International Ltd, Israel
Problems upgrading to FOP 0.20.3
Hello, I am trying to upgrade from FOP 0.20.1 0.20.3. As per the release notes, changing master-name properties to master-reference eliminated some errors. However, after those simple errors were resolved, I get a NullPointerException, but little else. Here's what FOP dumps to the console: [ERROR]: Logger not set [INFO]: building formatting object tree [INFO]: [1] [WARN]: table-layout=auto is not supported, using fixed! [WARN]: table-layout=auto is not supported, using fixed! [INFO]: [2] java.lang.RuntimeException: java.lang.NullPointerException That's all it says -- it doesn't give any more help. I running FOP in a servlet environment on WebSphere 3.5.3, which I believe runs JDK 1.2.2. The same stylesheet and everything worked on 0.20.1. Does anybody know what the problem is? The stylesheet appears below. Thanks!!! ?xml version=1.0 encoding=UTF-8? !-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Shawn Lindstrom (St. Paul Fire and Marine) -- xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version= 1.0 xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:include href=coverPage.xsl/ !-- ** / template matches the document and is the starting point *-- xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; font-size=8pt font-family=sans-serif fo:layout-master-set fo:simple-page-master master-reference=simple margin-right= 0.5in margin-left=0.5in margin-bottom=0.5in margin-top=0.5in page-width=11in page-height=8.5in fo:region-before extent=1in/ fo:region-body margin-top=1in/ fo:region-after extent=1in/ /fo:simple-page-master /fo:layout-master-set !-- end: defines page layout -- xsl:apply-templates select=accountSummaryPage/ xsl:apply-templates select= accountSummaryPage/lossDataRows/majorSort/pageSequence/ /fo:root /xsl:template !--*** ** PAGE SEQUENCE -- xsl:template match=pageSequence fo:page-sequence master-reference=simple fo:static-content flow-name=xsl-region-before !-- TEMPORARY PAGE HEADER -- fo:block fo:table fo:table-column column-width=0.75in/ fo:table-column column-width=2in/ fo:table-column column-width=4.5in/ fo:table-column column-width=1.25in/ fo:table-column column-width=1.5in/ fo:table-body !-- ROW ONE -- fo:table-row display-align=center fo:table-cell fo:block fo:external-graphic src=images/StPaulLogoPDF.gif scaling=uniform/ /fo:block /fo:table-cell fo:table-cell fo:block/ /fo:table-cell fo:table-cell fo:block font-size=14pt font-weight=bold text-align=centerCoverage Detail/fo:block /fo:table-cell fo:table-cell padding-right=3pt fo:block text-align=end font-weight=boldFilter On:/fo:block /fo:table-cell fo:table-cell fo:block text-align=startPolicy Inception Date/ fo:block /fo:table-cell /fo:table-row !-- ROW TWO -- fo:table-row display-align=center fo:table-cell fo:block/ /fo:table-cell fo:table-cell fo:block/ /fo:table-cell fo:table-cell fo:block font-size=10pt font-weight=bold text-align=centerPrefered Insured, Inc/fo:block /fo:table-cell fo:table-cell padding-right=3pt fo:block font-weight=bold text-align=endOpen Claim Range:/fo:block /fo:table-cell fo:table-cell fo:block text-align=start00/00/-00/00// fo:block /fo:table-cell /fo:table-row !-- ROW THREE -- fo:table-row display-align=center fo:table-cell number-columns-spanned=3 fo:block font-weight=boldEveluation Date: 00/00//fo:block /fo:table-cell fo:table-cell padding-right=3pt fo:block font-weight=bold text-align=endClosed Claim Range:/fo:block /fo:table-cell fo:table-cell fo:block text-align=start00/00/-00/00// fo:block /fo:table-cell /fo:table-row
Re: FOP build fails
Ralf Steppacher wrote: I get prepare-xalan1: [echo] Xalan1 is present. Installing Xalan1 support [copy] Copying 2 files to Z:\steppacher\Downloads\FOP\fop-0.20.3\build\src I put xalan 2 into the classpath before compiling. Is this something to worry about? I believe not, that's usual fop 0.20.3 build messages. -- Oleg Tkachenko Multiconn International Ltd, Israel
RE: new fopper's question
I am running the bin version. when I run fop -d I got the same exception. -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] Sent: Thursday, June 20, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: new fopper's question Which version of fop (bin or src) are you talking about? Try -d option and show us the debug messages. Yu, Vanessa wrote: Hi! I just downloaded fop-0.20.4rc, and try to run the simple command: fop -fo readme.fo -pdf But I got this error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger at org.apache.fop.apps.Fop.main(Unknown Source) The fop command is like this: java -classpath build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib \xml-apis.jar;lib\avalon-framework-cvs-20020315.jar org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 All jars are in place. I wonder why it did not find org.apache.avalon.framework.logger.Logger, because it is in the jar. Thanks! Vanessa -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: new fopper's question
Sorry, but I cannot reproduce that, I have just downloaded fop0.20.4 bin, unpacked it and run fop.bat docs\examples\fo\table.fo -pdf table.pdf and it works ok on my NT4 box. Probably you have some classpath problem, but I'm not sure. Yu, Vanessa wrote: I am running the bin version. when I run fop -d I got the same exception. -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] Sent: Thursday, June 20, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: Re: new fopper's question Which version of fop (bin or src) are you talking about? Try -d option and show us the debug messages. Yu, Vanessa wrote: Hi! I just downloaded fop-0.20.4rc, and try to run the simple command: fop -fo readme.fo -pdf But I got this error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger at org.apache.fop.apps.Fop.main(Unknown Source) The fop command is like this: java -classpath build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib \xml-apis.jar;lib\avalon-framework-cvs-20020315.jar org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 All jars are in place. I wonder why it did not find org.apache.avalon.framework.logger.Logger, because it is in the jar. Thanks! Vanessa -- Oleg Tkachenko Multiconn International Ltd, Israel
Problem with servlet
I am having problem running the example servletFop. I have websphere3.5 and have the fop.jar, batik.jar, avalon-framework-4.0.jar, logkit-1.0.jar and xalan-2.0.0.jar in the lib directory. I am attaching the error. Thanks for help -Neeru (See attached file: err.rtf) err.rtf Description: RTF file
Re: Problems upgrading to FOP 0.20.3
[EMAIL PROTECTED] schrieb: Hello, I am trying to upgrade from FOP 0.20.1 0.20.3. As per the release notes, changing master-name properties to master-reference eliminated some errors. You did change to much .. read again ;-) (or see below) I running FOP in a servlet environment on WebSphere 3.5.3, which I believe runs JDK 1.2.2. The same stylesheet and everything worked on 0.20.1. Does anybody know what the problem is? The stylesheet appears below. This fo:simple-page-master master-reference=simple should be changed to fo:simple-page-master master-name=simple Christian
Re: FOP build fails
Ralf Steppacher wrote: I get prepare-xalan1: [echo] Xalan1 is present. Installing Xalan1 support [copy] Copying 2 files to Z:\steppacher\Downloads\FOP\fop-0.20.3\build\src I put xalan 2 into the classpath before compiling. Is this something to worry about? This happens if the Xalan1 compatibility library is found in the classpath. Just ignore it (you FOP jar will be a bit larger). J.Pietschmann
Re: Problem with servlet
Yes, I have xerces-1.2.3.jar. Thanks -Neeru Oleg TkachenkoTo: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: onn.com Subject: Re: Problem with servlet 06/20/2002 04:36 PM Please respond to fop-user [EMAIL PROTECTED] wrote: I am having problem running the example servletFop. I have websphere3.5 and have the fop.jar, batik.jar, avalon-framework-4.0.jar, logkit-1.0.jar and xalan-2.0.0.jar in the lib directory. I am attaching the error. Hey, what about xerces? -- Oleg Tkachenko Multiconn International Ltd
Re: Problem with servlet
And does it work? [EMAIL PROTECTED] wrote: Yes, I have xerces-1.2.3.jar. Thanks -Neeru Oleg TkachenkoTo: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: onn.com Subject: Re: Problem with servlet 06/20/2002 04:36 PM Please respond to fop-user [EMAIL PROTECTED] wrote: I am having problem running the example servletFop. I have websphere3.5 and have the fop.jar, batik.jar, avalon-framework-4.0.jar, logkit-1.0.jar and xalan-2.0.0.jar in the lib directory. I am attaching the error. Hey, what about xerces? -- Oleg Tkachenko Multiconn International Ltd -- Oleg Tkachenko Multiconn International Ltd