使用Oracle XML Publisher API创建PDF文档

时间:2019-11-11 14:26:13

标签: java oracle rest

我正在尝试使用Rest API生成PDF文档。使用的BI Publisher库:    fnd_i18n.jar    xdocore.jar    xmlparserv2-904.jar    collections.jar    i18nAPI_v3.jar    versioninfo.jar 例外:

{  
    "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"  
} 

代码:

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();  
}

任何解决此问题的帮助将不胜感激。谢谢。

0 个答案:

没有答案