Experience running Apache FOP on Apache Harmony
Project website:
Apache FOP
2006-11-12, with Harmony snapshot r468731 on Windows
The "readme.fo" example from the FOP distribution ran just fine which is a very good sign. Problems started when running the same file with replaced default fonts which caused caused a problem because the TrueType loading code uses the "UnicodeBig" encoding. Changing that to "UTF-16BE" solved this particular problem. There's another use of "UnicodeBig" in the PDF library, where I cannot just replace the encoding with "UTF-16BE" because the FEFF marker needs to be generated.
Running "images.fo" showed that ImageIO will probably need a closer look. Furthermore, I got a "Can't open color profile" that I'll have to investigate more closely when I have time.
Anyway, this was just a quick test with a couple of test files and it shows that from now on I definitely have to keep on eye on FOP's compatibility with Harmony.
Keep up the great work, guys!
2008-02-22, with Harmony r618795 on Windows XP
We've recently refactored the whole image loading part of FOP and the new framework now makes heavy use of ImageIO (as we've dropped support for JDK 1.3). I can build FOP using Harmony JDK but the unit tests fail because javax.imageio.ImageIO.getReaderMIMETypes is not implemented, yet. Maybe I'll find some time to look into the missing pieces.
BTW, while building FOP from scratch there's the following crash which doesn't occur when you run the build a second time. It is reproducible and always at the same location.
[xslt] Processing C:\Dev\FOP\main\xml-fop-temp\src\codegen\fonts\TimesItalic.xml to C:\Dev\FOP\main\xml-fop-temp\build\gensrc\org\apache\fop\fonts\base14\T
imesItalic.java
[xslt] Loading stylesheet C:\Dev\FOP\main\xml-fop-temp\src\codegen\fonts\font-file.xsl
Windows reported exception: 0xc0000005
Registers:
EAX: 0x87010101, EBX: 0x13fb5f90, ECX: 0x00000000, EDX: 0x0048ca68
ESI: 0x0048ca68, EDI: 0x13ed5b88, ESP: 0x01acf764, EBP: 0x0048ca68
EIP: 0x0064af40
Crashed module:
Memory region 0x0064a000:0x00728000
Working directory:
C:\Dev\FOP\main\xml-fop-temp
Command line:
"C:\Dev\J2SE\harmony-jdk-618795\jre\bin\java.exe" "-classpath" "C:\Dev\apache.org\releases\apache-ant-1.7.0\lib\ant-launcher.jar" "-Dant.home=C:\Dev\apache.org\
releases\apache-ant-1.7.0" "org.apache.tools.ant.launch.Launcher" "-cp" ".;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip"
Environment variables:
<snip/>
JAVA_HOME=C:\Dev\J2SE\harmony-jdk-618795
<snip/>
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
<snip/>
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f06
<snip/>
_JAVACMD=C:\Dev\J2SE\harmony-jdk-618795\bin\java.exe
_USE_CLASSPATH=yes
Loaded modules:
VM attached threads:
[000004EC] 'ref handler'
[000004F4] 'finalizer'
[000004F8] 'finalizer'
--->[00000508] 'profiler thread'
[000007CC] 'main'
Stack trace:
0: method_get_return_type_class (??:-1)
1: java/lang/EMThreadSupport.onTimeout()V (EMThreadSupport.java:-2)
2: java/lang/EMThreadSupport.run()V (EMThreadSupport.java:68)
3: java/lang/EMThreadSupport$1.run()V (EMThreadSupport.java:44)
4: java/lang/Thread.run()V (Thread.java:657)
5: java/lang/Thread.runImpl()V (Thread.java:668)
<end of stack trace>