Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
You're asking for something to work that was written before JDK 1.5 was out. 1.5 has some serious consequences. Not everything is guaranteed to continue working. BTW, are you sure you mean 1.5.1 or rather 1.5.0_01 which is the latest version? Just keep in mind that due to these bigger changes it will again take a long time until more people will migrate to the newer JDK. Just remember how long it took until 1.4 was wide-spread. I wonder why you persist in using an XSL-FO wrapper when all you want to do is convert SVG to PDF. In this case Batik's Transcoder API would be more appropriate. The additional content could easily be added in an all-SVG wrapper around the SVG image. Anyway, the new API isn't documented, yet, but examples can be found under the following URL: http://xml.apache.org/fop/embedding.html#examples (Click on the future 1.0dev links). If you continue to run into problems with 1.5 (or 5.0 or whatever Sun tries to name it) please let us know. Some problems have already been fixed (in CVS HEAD). On 03.02.2005 03:51:02 Richard Mixon (qwest) wrote: My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. The exception message below seems to indicate it is choking on the SmileyFace.gif file - but I am not sure why. I google the archives and could not really find a problem with Java 1.5 and FOP/Batik. I went and downloaded the latest CVS of FOP, but it looks like the Driver class my code depended on is now gone. I could not find any doc on how to use the new APIs. I found one Wiki page (http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEm bedding), but it expects a pure SVG file. I have been wrapping my svg graphic with FO markup (see below the exception for how it normally appears) Any ideas on how to either fix the current problem, or do an SVG to PDF transform with the new API? snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Jeremias, You are correct - java version 1.5.0_01. And yes I know it is still very new. I needed session replication with Tomcat 5.5.7 and Java 1.5 was recommended (there is a mode that works with Java 1.4 also). Thank you for the API reference I will take a look. - Richard -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 12:34 AM To: [EMAIL PROTECTED] Subject: Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built You're asking for something to work that was written before JDK 1.5 was out. 1.5 has some serious consequences. Not everything is guaranteed to continue working. BTW, are you sure you mean 1.5.1 or rather 1.5.0_01 which is the latest version? Just keep in mind that due to these bigger changes it will again take a long time until more people will migrate to the newer JDK. Just remember how long it took until 1.4 was wide-spread. I wonder why you persist in using an XSL-FO wrapper when all you want to do is convert SVG to PDF. In this case Batik's Transcoder API would be more appropriate. The additional content could easily be added in an all-SVG wrapper around the SVG image. Anyway, the new API isn't documented, yet, but examples can be found under the following URL: http://xml.apache.org/fop/embedding.html#examples (Click on the future 1.0dev links). If you continue to run into problems with 1.5 (or 5.0 or whatever Sun tries to name it) please let us know. Some problems have already been fixed (in CVS HEAD). On 03.02.2005 03:51:02 Richard Mixon (qwest) wrote: My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. The exception message below seems to indicate it is choking on the SmileyFace.gif file - but I am not sure why. I google the archives and could not really find a problem with Java 1.5 and FOP/Batik. I went and downloaded the latest CVS of FOP, but it looks like the Driver class my code depended on is now gone. I could not find any doc on how to use the new APIs. I found one Wiki page (http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEm bedding), but it expects a pure SVG file. I have been wrapping my svg graphic with FO markup (see below the exception for how it normally appears) Any ideas on how to either fix the current problem, or do an SVG to PDF transform with the new API? snip/ 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: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:482) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve .java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc essLogValve.java:481) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:534) -Original Message- From: James Shaw [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 6:53 AM To: Batik Users Subject: Re: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built Richard Mixon (qwest) wrote: My build of FOP from 2004/05/29 works fine on Sun Java 1.4.1_02 with Tomcat 5.0.19, but when I move toSun Java 1.5.1 and Tomcat 5.5.7 I get the URI I/O error listed below. This build included a Batik.jar with files dates 10/11/2003. Not sure this is particularly helpful, but I have come across similar IO problems running Eclipse with Java 1.5. I understand the problem is related to file locking and is an issue specific to the new version of Java. Unfortunately, my solution was to revert to 1.4. James Shaw - 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: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Thomas DeWeese wrote: Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. I have set the base directory as follows: String httpBaseDir = .; imageURLProtocol = getInitParameter(imageURLProtocol); String baseDir = this.getServletContext().getRealPath(httpBaseDir); userAgent = new FOUserAgent(); userAgent.setBaseURL(imageURLProtocol+baseDir); log.info(init - setting httpBaseDir='+httpBaseDir+', baseDir='+baseDir+'); Here is the output from the last log statement: 09:20:23,646 INFO [main] SVG2PDFServlet:112 - init - setting httpBaseDir='.', baseDir='c:\jakarta-tomcat-5.5.7\webapps\stars\.' I think I am setting this base directory correctly. Maybe not? I did some more tests before also posting this on the Tomcat list. The results were interesting: Works fine with: Tomcat 5.0.x and Java 1.4.1_02 Tomcat 5.5.7 and Java 1.4.1_02 Throws the exception (below) with: Tomcat 5.5.7 and Java 1.4.2_03 Tomcat 5.5.7 and Java 1.5.0_01 So I can get it to work with Tomcat 5.5.x with an earlier version of Java 1.4. Thank you - Richard Repeating part of the exception for those that might not have seen the earlier part of the thread: 09:20:56,146 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image org.apache.batik.bridge.BridgeException: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 An I/O error occured while processing the URI 'file://c/jakarta-tomcat-5.5.7/webapps/stars/images/allTimeBest/SmileyFa ce.gif' specified on the element image at org.apache.batik.bridge.SVGImageElementBridge.openStream(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Un known Source) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error FOP/BATIK ... PDFXMLHandler:253 - svg graphic could not be built
Bingo! That was it. I changed it from file:// to file:/// and all works now. You earlier mentioned that might be it - but I was so focused on the fact that it worked on Java 1.4.1 that I figured I had it correctly. That is weird though that moving past Java 1.4.1 breaks this. Thank you once again, very much - Richard Thomas DeWeese wrote: Hi Richard, What is 'imageURLProtocol' I'm guessing it's file:// I think it should be either file:/// or file:/. Richard Mixon (qwest) wrote: Thomas DeWeese wrote: Richard Mixon (qwest) wrote: I checked my SVG markup and am not sure how I would change this as I'm using an xlink:href. Here is an example: xlink:href=images/allTimeBest/c:out value=${cmSummary.allTimeBestIcon}/ This means that it is using the base URL for the document to resolve the image reference. The base URL for the document would be provided when you parse the document. I have set the base directory as follows: String httpBaseDir = .; imageURLProtocol = getInitParameter(imageURLProtocol); String baseDir = this.getServletContext().getRealPath(httpBaseDir); userAgent = new FOUserAgent(); userAgent.setBaseURL(imageURLProtocol+baseDir); log.info(init - setting httpBaseDir='+httpBaseDir+', baseDir='+baseDir+'); Here is the output from the last log statement: 09:20:23,646 INFO [main] SVG2PDFServlet:112 - init - setting httpBaseDir='.', baseDir='c:\jakarta-tomcat-5.5.7\webapps\stars\.' I think I am setting this base directory correctly. Maybe not? 09:20:56,146 ERROR [TP-Processor2] PDFXMLHandler:253 - svg graphic could not be built: file://c:/jakarta-tomcat-5.5.7/webapps/stars/.:-1 - 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]