To import the XML file in OAF use the XMLImporter command after running environment file
java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xxtop/oracle/apps/component_name/sub_component_name/webui/HelloWorldPG.xml -rootdir $JAVA_TOP -username apps -password welcome123 -dbconnection "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))"
In case you get driver issue while running this command use the SUDO command:
Enable DBMS_OUTPUT and run the below code to see if XML Importer has imported your document:
sudo -Eu applmgr LD_LIBRARY_PATH=$LD_LIBRARY_PATH $OA_JRE_TOP/bin/java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xxtop/oracle/apps/component_name/sub_component_name/webui/HelloWorldPG.xml -rootdir $JAVA_TOP -username apps -password welcome123 -dbconnection "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))"
BEGIN
jdr_utils.printDocument(
'/xxtop/oracle/apps/component_name/sub_component_name/webui/HelloWorldPG'
,1000
);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
After Import you can also verify in the database tables if document is loaded properly:
SELECT * FROM jdr_paths WHERE path_name = 'HelloWorldPG'; SELECT * FROM jdr_components WHERE comp_docid = ( SELECT path_docid FROM jdr_paths WHERE path_name = 'HelloWorldPG' ); SELECT * FROM jdr_attributes WHERE att_comp_docid = ( SELECT path_docid FROM jdr_paths WHERE path_name = 'HelloWorldPG' );
Comments
Post a Comment