Null Pointer / hyphenations issues with FOP

Having trouble installing Oxygen? Got a bug to report? Post it all here.
andrewm
Posts: 1
Joined: Wed Jul 14, 2010 10:01 am

Null Pointer / hyphenations issues with FOP

Post by andrewm »

I tried outputting a sample Docbook format XML file from Open Office, and using oXygen 11.2 to generate a PDF. Initially I encountered a Java exception "couldn't find hyphenation pattern en". Research on here showed I should add the fop-hyph.jar file to the .\lib directory, which I did. But then the error message changed slightly to give a Null pointer Java exception.

Code: Select all


SystemID: C:\Temp\ProductIntroductionGuide.xml
Engine name: Apache FOP
Severity: error
Description: The process 'Apache FOP' ended with code: 1.
The error was:
Transformer is net.sf.saxon.IdentityTransformer@10bbf9e
ERROR - Exception
java.lang.NullPointerException
at org.apache.fop.cli.InputHandlerFOP.transformTo(Unknown Source)
at org.apache.fop.cli.InputHandlerFOP.renderTo(Unknown Source)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: java.lang.NullPointerException
at org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
.
.
.

The sample Docbook 4 file works fine with or without fop-hyph.jar, so I'm a little confused as to what's going on!
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Null Pointer / hyphenations issues with FOP

Post by adrian »

The hyphenation support is optional and also language dependent, that's why it's not included. It would have worked fine without it.

The NPE is a bug in Apache FOP which is triggered by an empty fo:inline element. Such an empty fo:inline is usually created during the DocBook to PDF transformation from a corresponding empty element in the Docbook document. Look for empty elements in the DocBook document(e.g. glossterm).

We are aware of this issue and are looking into patching Apache FOP to at least guard it. But even guarded this could have some side effects in the final PDF document.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply