【问题】
折腾:
期间,遇到一个警告:
fop --execdebug -c E:/Dev_Root/docbook/dev/config/fop/conf/fop.xconf ../output/fo/docbook_dev_note.fo -pdf ../output/pdf/docbook_dev_note.pdf exec "/cygdrive/c/Program Files/Java/jdk1.7.0_25/bin/java" -Djava.awt.headless=true -classpath "E:/Dev_Root/docbook/tools/fop-1.1/lib/xmlgraphics-commons-1.5.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/xml-apis-ext-1.3.04.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/xml-apis-1.3.04.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/xercesImpl-2.7.1.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/xalan-2.7.0.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/serializer-2.7.0.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/commons-logging-1.0.4.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/commons-io-1.3.1.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/batik-all-1.7.jar;E:/Dev_Root/docbook/tools/fop-1.1/lib/avalon-framework-4.2.0.jar;E:/Dev_Root/docbook/tools/fop-1.1/build/fop.jar;E:/Dev_Root/docbook/tools/fop-1.1/build/fop-sandbox.jar;E:/Dev_Root/docbook/tools/fop-1.1/build/fop-hyph.jar;.;C;E:/Program Files/Java/jdk1.7.0_25/jre/lib/rt.jar" org.apache.fop.cli.Main "-c" "E:/Dev_Root/docbook/dev/config/fop/conf/fop.xconf" "../output/fo/docbook_dev_note.fo" "-pdf" "../output/pdf/docbook_dev_note.pdf" 十月 06, 2013 12:01:24 上午 org.apache.fop.apps.FopFactoryConfigurator configure INFO: Default page-height set to: 11in 十月 06, 2013 12:01:24 上午 org.apache.fop.apps.FopFactoryConfigurator configure INFO: Default page-width set to: 8.26in 十月 06, 2013 12:01:24 上午 org.apache.fop.fonts.FontCache loadFrom WARNING: I/O exception while reading font cache (org.apache.fop.fonts.EmbedFontInfo; local class incompatible: stream classdesc serialVersionUID = 8755432068669997368, local class serialVersionUID = 8755432068669997369). Discarding font cache file. 十月 06, 2013 12:01:26 上午 org.apache.fop.fonts.truetype.TTFFile getTTCnames INFO: This is a TrueType collection file with 4 fonts
即:
WARNING: I/O exception while reading font cache (org.apache.fop.fonts.EmbedFontInfo; local class incompatible: stream classdesc serialVersionUID = 8755432068669997368, local class serialVersionUID = 8755432068669997369). Discarding font cache file. |
【解决过程】
1.后来去官网中看到解释:
http://xmlgraphics.apache.org/fop/faq.html#faq-N1026C
This message is a warning that FOP failed to read from the Font cache. Which means any Font auto detection or Font directories will be re-scanned. So this failure doesn’t break anything. To avoid the warning you can simply delete the old Font Cache file, which lives in ${base}\conf\font.cache (see font-base configuration). |
所以去看看其所谓的font的cache。
结果发现我的:
E:\Dev_Root\docbook\tools\fop-1.1\conf
中,根本没有所谓的
font.cache
【总结】
算了,看在不影响编译fo为pdf的情况下,暂且不理会这个警告了。
转载请注明:在路上 » 【已解决】docbook用fop编译生成fo时出现警告:WARNING: I/O exception while reading font cache (org.apache.fop.fonts.EmbedFontInfo; local class incompatible: stream classdesc serialVersionUID = 8755432068669997368, local class serialVersionUID = 8755432068669997369). Discarding font cache file.