Tuesday 8 January 2019

BI Publisher : SubTemplates : Testing from Desktop [Issue Resolved: Disallowed access URL, oracle.xdo.XDOException: java.util.EmptyStackException ]

Locally Testing the Main RTF Template with SubTemplate

I had to invest lot of time to make it work!

Step:1 Create a directory in any drive, keep is short without space.

F:\MyTemplates

Here I will create two file: Main.rtf, and ST.rtf (subtemplate)

write in main template:


<?import:file:F:///MyTemplates\ST.rtf?>
<?call: header?>


write in subtemplate ST.rtf

<?template: header?>
 My Subtemplate Demo Text
<?end template?>


Now Most Important setting:

It just worked for me in Template Builder for Word, with below setting: [did not work with preview in rtf template,  we may need to create a cfg file for it]

(setting> key> xdk-secure-io-mode), and set its value to false



Ref:
https://docs.oracle.com/middleware/12211/bip/BIPRD/GUID-0315F704-222C-42B1-BAC9-79A75F9CC011.htm#BIPRD3051

or for an XSL subtemplate file:
<?import:file:C:///Template_Directory/subtemplate_file.xsl?>



This also worked:

<?import:file:C:///bipublisher32bit/TemplateViewer/ST.rtf?>

Errors: [when xdk-secure-io-mode is set to true]

[010919_130538494][][ERROR] Disallowed access URL 'file:F:///MyTemplates/ST.rtf?sid=1&eaf=3&rtf-checkbox-glyph='.
[010919_130538502][oracle.xdo.common.xml.XSLTWrapper][ERROR] XSL error:

<Line 3, Column 103>: XML-22002: (Fatal Error) Error while processing include XSL file (rtf2xsl://file_F:///MyTemplates\ST.rtf?sid=1&eaf=3&rtf-checkbox-glyph=).
<Line 227, Column 18>: XML-22000: (Error) Error while parsing XSL file (null).
@Line 3 ==> <xsl:import href="rtf2xsl://file_F:///MyTemplates\ST.rtf?sid=1&amp;eaf=3&amp;rtf-checkbox-glyph="/>
[010919_130538505][oracle.xdo.template.FOProcessor][EXCEPTION] oracle.xdo.XDOException: java.util.EmptyStackException

[010919_130538804][oracle.xdo.template.fo.xml2xsd.DocumentParser][PROCEDURE] Time parsing XML to XSD for optimization: 1 msecs
[010919_130538805][][ERROR] Disallowed access URL 'file:/F:/MyTemplates/F:///MyTemplates/ST.rtf?sid=1&eaf=3&rtf-checkbox-glyph='.
[010919_130538806][oracle.xdo.common.xml.ManualImport][ERROR] Failed to import sub-template 'rtf2xsl://file_F:///MyTemplates\ST.rtf?sid=1&eaf=3&rtf-checkbox-glyph=' caused by Disallowed access URL 'file:/F:/MyTemplates/F:///MyTemplates/ST.rtf?sid=1&eaf=3&rtf-checkbox-glyph='.
[010919_130538806][oracle.xdo.template.fo.util.FOPMemRequirement][STATEMENT] Subtemplate import count=-1




1 comment: