Sunday 31 May 2015

OAF: Import/Export Page/Personalization/Substitution using XMLImporter/JPXImporter in Oracle Application Framework

In this post, I will give the syntax for importing/exporting page/personalization/substitution in OA Framework from unix/windows machines.

Import Page/Personalization.
We will use the class XMLIMporter for importing the page or personalization into the database.

From Unix:
 java oracle.jrad.tools.xml.importer.XMLImporter <dir_path>/<file_name>.xml 
 -username <user_name> -password <password> 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host_name>)(PORT= <port_number>)) (CONNECT_DATA=(SID=<database_sid>)))" 
 -rootdir <dir_path> -rootPackage <package>  
Example:
 java oracle.jrad.tools.xml.importer.XMLImporter $PWD/TestPG.xml 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129) (PORT=1522))(CONNECT_DATA=(SID=VIS121)))" 
 -rootdir $PWD -rootPackage /ajtest/oracle/apps/fnd/test/webui/  
 java oracle.jrad.tools.xml.importer.XMLImporter $PWD/TestPG.xml 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129) (PORT=1522))(CONNECT_DATA=(SID=VIS121)))" 
 -rootdir $PWD -rootPackage /ajtest/oracle/apps/fnd/test/webui/customizations/site/0/  
From Windows:
The import.bat file will be available under the Jdev installation under jdevbin/oaext/bin
 import <dir_path>/<file_name>.xml 
 -username <user_name> -password <password> 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host_name>)(PORT=<port_number>))(CONNECT_DATA=(SID=<database_sid>)))" 
 -rootDir <dir_path> -rootPackage <package>  
Example:
 C:\oracle\JdevR12.1.3\jdevbin\oaext\bin\import C:\oracle/JdevR12.1.3/jdevbin/jdev/myprojects/ajtest/oracle/apps/fnd/test/webui/TestPG.xml 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129)(PORT=1522))(CONNECT_DATA=(SID=VIS121)))" -rootDir C:\oracle/JdevR12.1.3/jdevbin/jdev/myprojects/ 
 -rootPackage /ajtest/oracle/apps/fnd/test/webui/  
Import EO/VO/AM Substitution.
We will use the class JPXIMporter for importing the substitution into the database.
 java oracle.jrad.tools.xml.importer.JPXImporter <dir_path>/<file_name>.jpx 
 -username <user_name> -password <password> 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host_name>)(PORT= <port_number>)) (CONNECT_DATA=(SID=<database_sid>)))"  
Example:
 java oracle.jrad.tools.xml.importer.JPXImporter $PWD/AJProject.jpx 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129) (PORT=1522))(CONNECT_DATA=(SID=VIS121)))"  
Export Page/Personalization.
We will use the class XMLExporter for exporting the page or personalization from the database. When you execute these commands don't give the extension for the file name. 

From Unix:
 java oracle.jrad.tools.xml.exporter.XMLExporter <dir_path>/<file_name> -rootdir <dir_path> 
 -username <user_name> -password <password> 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host_name>)(PORT=<port_number>))(CONNECT_DATA=(SID=<database_sid>)))"  
Example:
 java oracle.jrad.tools.xml.exporter.XMLExporter /ajtest/oracle/apps/fnd/test/webui/TestPG 
 -rootdir $PWD 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129)(PORT=1522))(CONNECT_DATA=(SID=VIS121)))"  
From Windows:
The export.bat file will be available under the Jdev installation under jdevbin/oaext/bin
 export <dir_path>/<file_name> 
 -rootdir <dir_path> 
 -username <user_name> -password <password> 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host_name>)(PORT=<port_number>))(CONNECT_DATA=(SID=<database_sid>)))"  
Example:
 C:\oracle\JdevR12.1.3\jdevbin\oaext\bin\export /ajtest/oracle/apps/fnd/test/webui/TestPG 
 -rootdir C:\test\ 
 -username apps -password apps 
 -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.160.129)(PORT=1522))(CONNECT_DATA=(SID=VIS121)))"  

You can also export the files from database using jdr_utils package, which is explained in my other blog JDR_UTILS.

Related Links: OAF: Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

Feel free to point out if anything is missing/wrong in this blog.

1 comment: