Forum Stats

  • 3,815,599 Users
  • 2,259,057 Discussions
  • 7,893,183 Comments

Discussions

Create PDF Document using Oracle XML Publisher APIs

3358898
3358898 Member Posts: 1
edited Nov 12, 2019 11:29AM in Social Groups

Hi All,

I am trying to generate a PDF document using Rest API. BI Publisher libraries used:

   · xdocore.jar

   · xmlparserv2-904.jar

   · collections.jar

   · i18nAPI_v3.jar

   · versioninfo.jar

Exception:{    "timestamp": 1573476521580,    "status": 500,    "error": "Internal Server Error",    "exception": "java.lang.IllegalAccessError",    "message": "tried to access method oracle.apps.fnd.i18n.common.util.DateFormatMaskConverter.getJavaDateFormatFromOracle(Ljava/lang/String;Ljava/util/Locale;Z)Ljava/lang/String; from class oracle.apps.fnd.i18n.common.util.FormatMaskUtil",    "path": "/runXMLPub/runXML"}

Code:

try{     DataProcessor dataProcessor = new DataProcessor();     dataProcessor.setDataTemplate("/tmp/XXONT_SO_ACK.xml");     Hashtable parameters = new Hashtable();     parameters.put("P_ORDER_NUMBER","2000010477");     parameters.put("P_ORDER_LINE_ID","");     dataProcessor.setParameters(parameters);     dataProcessor.setConnection(jdbcConnection);     dataProcessor.setOutput("/tmp/XXONT_SO_ACK_OUT.xml");     dataProcessor.processData();     RTFProcessor rtfProcessor = new RTFProcessor("/tmp/XXONT_SO_ACK.rtf");      rtfProcessor.setOutput("/tmp/XXONT_SO_ACK.xsl");     rtfProcessor.process();     FOProcessor processor = new FOProcessor();     processor.setData("/tmp/XXONT_SO_ACK_OUT.xml");     processor.setTemplate("/tmp/XXONT_SO_ACK.xsl");     processor.setOutput("/tmp/XXONT_SO_ACK.pdf");       processor.setOutputFormat(FOProcessor.FORMAT_PDF);     processor.generate();     fProcessor.process();} catch (Exception e)   {       System.out.println("Exception..." );       e.printStackTrace();}

Any help to resolve this exception will be appreciated. Thanks.