Page 1 of 1
FOP error in oXygen 8.2
Posted: Wed May 16, 2007 6:21 pm
Since upgrading to oXygen 8.2 I get an error when trying to transform an XML/XSL-FO combo to PDF using the built-in FOP transformation. I have tested the same transformation on another machine still running 8.1 and it executes with no problems at all.
The error I am getting is as follows:
The process 'FOP' ended with code : 1 The error was : at org.apache.fop.cli.Main.main(Main.java:191)
Any ideas what's causing this rather unhelpful error? I can't even reinstall 8.1 as a temporary fix as the install file has been removed from your website!
Posted: Thu May 17, 2007 9:42 am
The cause is the new version of the built-in FO processor which requires the new default scenario for transforming to PDF, that is Docbook PDF v8.2. When a default scenario is changed in a new version of oXygen the installation of the new version adds a new default scenario to the list of scenarios having the version number in the name. For example for Docbook PDF the name of the new scenario is Docbook PDF v8.2. So you should use the new scenario for transforming to PDF using the built-in FO processor.
Other option is to execute the action Options -> Restore Default Transformation Scenarios which resets the default scenarios to the latest form.
Posted: Thu May 17, 2007 11:08 am
I have restored the default transformation scenarios as you suggest but I am getting the same error.
If it helps, I managed to get a very basic example working on oXygen 8.2 but my (more complicated) transformation still does not work. I guess there is a problem with the FO but it is definitely ok on the older version.
Any other ideas?
Posted: Thu May 17, 2007 11:29 am
I just checked that the default transformation scenarios work as I said above when a new version of oXygen is installed and that restoring them works correctly. Do you use a default scenario? What scenario do you use? Can you send us
a sample file for reproducing the problem?
Posted: Thu May 17, 2007 3:47 pm
I've managed to identify the cause through trial and error...
It was caused by an empty <fo:table-cell> that did not contain an <fo:block>
Clearly the FOP in 8.2 is stricter than previous versions, but it also leaves a lot to be desired with the quality of its error messages.
Posted: Thu May 17, 2007 5:27 pm
The output of the FOP error messages is disabled by default as there are many warnings which should be ignored in most transformations. You can enable FOP output from Options -> Preferences -> XML -> XSLT/FO/XQuery -> FO Processors -> Enable the output of the built-in FOP.
Posted: Thu May 17, 2007 5:43 pm
If I'd have known that I would have saved myself hours of messing about... oh well
Perhaps if a FOP transformation fails, oXygen should offer to display the FOP output for the user, rather than hiding the option away in preferences.
Posted: Thu May 17, 2007 6:03 pm
Try to enable the following option:
Options->Preferences -- XML -- XSLT-FO-XQuery -- FO Processors ---- Enable the output of the built-in FOP.
That should give you more details on what happens in case of errors.
Posted: Thu May 17, 2007 6:09 pm
Yes sorin's already told me that - unfortunately I have already wasted my time working out what was wrong with my huge XSL-FO document as this option is disabled by default and I wasn't aware it was available!
Either it should be enabled by default, or you should at least alert the user to its presence if it contains an error message.