XML Publisher template Error: for-each@section:G_PO_HEADER while count(G_PO_HEADER) = 0:
Exception:
oracle.apps.xdo.batch.BurstingProcessorEngine][EXCEPTION] java.lang.NullPointerException
at oracle.apps.xdo.template.fo.area.PageNumber.formatString(PageNumber.java:104)at oracle.apps.xdo.template.fo.IDManager.registerId(IDManager.java:44)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageJoinSeq(AreaTree.java:1106)
at oracle.apps.xdo.template.fo.area.AreaTree.incrementJoinSequenceIndex(AreaTree.java:219)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageDocument(AreaTree.java:1089)
at oracle.apps.xdo.template.fo.area.AreaTree.forceOutput(AreaTree.java:471)
at oracle.apps.xdo.template.fo.elements.FORoot.end(FORoot.java:58)
at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:386)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:279)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1022)
Solution:
1. Add "@section" to your "if" statement, like this:
<?if@section:count(//G_PO_HEADER)=0?>
***** No Data Found *****
<?end if?>
2. Add a continuous section break right after <?end if?>. In MS Word 2010 you do it like this:
- from the menu choose Page Layout > Breaks > Section Breaks > Continuous
- in the window that appears choose "Continuous" and press OK button.
To see section break choose "Normal" view in Word (View > Normal).