How to Deploy OA framework in the Instance
Deployment of OA framework consists of 5 steps.- Deploying Class files and VO/EO/AM xml files
- Deploying PG/RN xml files
- Deploying jpr files for Substitution
- Setup AOL to access the page
- Restart the server
Let's look at these one by one.
Deploying Class files
The files such as
- Controllers *CO.class
- Application modules *AM.class
- View Objects *VOImpl.class, *VORowImpl.class, *VO.xml
- Entity objects *EO.xml, *EOImpl.java
should be deployed in the $JAVA_TOP/<path of your file>.
For eg:
if your files path in jdeveloper is
$jdev_home/myprojects/oracle/apps/ap/setup/webui/setupCO.java
then place your class files in the following path in the instance
$JAVA_TOP/oracle/apps/ap/setup/webui/setupCO.class
Deploying Page and Region files
The Page xml files(*PG.xml) and region xml(*RN.xml) files resides in the database. So you have to import the file into the database to make it work in the instance. Oracle application provides XMLExporter/XMLImporter to export and import page files from and to the database.
Deploy the files to the Instance
java oracle.jrad.tools.xml.importer.XMLImporter /home/prasanna/pages/SetupPG.xml -username <data base user name> -password <data base password> -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =<hostname> ) (port = <port id>)))(connect_data = (sid = <sid>)))"This command will import the SetupPG.xml file into the database.
Extracting from instance
If you have done your personalizations in the developement instance and you want to deploy the personalizations into the production instance, then you can extract the personalization using XMLExporter command from the developement instance and Import the extracted xml file into the production instance in the same way you did for PG.xml files.java oracle.jrad.tools.xml.exporter.XMLExporter /oracle/apps/ap/setup/webui/customizations/site/0/SetupPG -rootdir <destination path> -username <data base user name> -password <data base password> -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =<hostname> ) (port = <port id>)))(connect_data = (sid = <sid>)))"
The above command will export the SetupPG from the data base to your file system at the destination path as XML file (SetupPG.xml)
Deploying jpr files for Substitutions, if any
If you have extended EO, VO or AM and created substitutions in your project. Then you have to deploy your .jpx file into the instance.
java oracle.jrad.tools.xml.importer.JPXImporter $AP_TOP/xxx/Setup.jpx -username <data base user name> -password <data base password> -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host =<hostname> (port = <port id>)))(connect_data = (sid = <sid>)))"
Setup AOL to access the page
In case your page is referred in existing pages of Oracle applications you can skip this step. But if you want to access the page as a new Function then follow these steps.
Create Function as
ID: XX_SETUP
Name: SETUP
Function type(HTML tab) : SSW
URL: OA.jsp?page=/oracle/apps/ap/XXX/SetupPG¶meter1=xx¶meter1=xx
Attach the function to a Menu
Attach the menu to a Responsibility
Restart the server
After deployement you cannot see the page immediately on the server instance. This is because your Pages and class files would be cached in the middle tier. So you have to bounce the apache.
$COMMON_TOP/admin/scripts/adapcctl.sh stop
$COMMON_TOP/admin/scripts/adapcctl.sh start
After this process, clear the cache from the functional administrator responsibility and this step is optional.
Some times we may need to restart the whole middle tier to see the depolyed pages in the instance.
To Restart the instance use following command
Stop the instance
cd $INST_TOP/admin/scripts
adstpall.sh apps/apps
Start the instance
adstrtal.sh apps/apps
Article By:
Prasanna Jayaraman
Please post your Ideas and Comments
50 comments :
Thanks for the article. it Helped me..
keep posting...
gud job
Hi prasana,
Well Drafted post.
However,we dont exctly need the xm exporter command for extracting the personlizations.We can do it through functional admin itself right.
And secondly,are you sure we need to bounce the middle tier,cos i have only used adapcctl.sh to bounce the apache server and it works just fine
Hi gettingmoneywise,
Thanks, for your comments.
Yes, Functional administrator responsibility itself is enough. But there is a difference b/w extracting personalization through XMLExporter and functional administrator. When you use XMLImporter it includes -root "path of document" element in the header of the XML file. Functional admin won't include this. This root element ensures that personalizations are applied at the rite path.
Since we used scripts for deployment of all the OAF files. Those personalizations which are extracted by functional administrator are not applied at all.
And while importing personalizations using functional administrator, you have to ensure that path of the extracted files are not changed while you manually transferred the files from the developement instance to production.
Bouncing Web server
-------------------
We have found that sometimes when you import the custom PG.xml files into the instance, the changes are not getting reflected until you bounce middle tier.
If its going to be just extensions and personalizations your deploying, then restarting middle tier itself will do the work.
Regards,
Prasanna
Hi Prasanna,
I seem to have a confusion.
While deploying OA framework custom form in R12, i never felt the need to bounce the apache.
The changes get reflected soon after you upload the pages to the server.
This was not so in R11.
IS this a change thats been brought into R12
Hi Prasanna,
You seem to know a lot about OAF.
I have just started in OAF.
You have also answered my queries in OTN forums.
COuld you give me some tips, as to how can i improve my knowledge in OAF. It would be really great if you could do so.
My Email ID is: pradeep200417@gmail.com
Hi Pradeep,
There is no difference between 11i oaf and R12 oaf. Both are almost same except the look and feel of UI.
Sometimes even I have found the custom pages getting rendered in the instance without bouncing the apache. But when i tried it again I am not able to reproduce phenomenon again. OAF goes crazy sometimes but it is always recommended to restart apache before opening the page.
You just try changing the same custom page and deploy it. And check if the changes are reflected in the instance without restarting the apache.
Regarding documentation
------------------------
The only documentation i refer is jdevDoc/ folder within the jdeveloper. It contains everything you need.
The best way to start learning OAF is do all the exercises of toolbox tutorial including core lessons and supplement lessons.
The reason for 30% of questions in the forum is that they wouldn't have gone through the toolbox tutorials. And most of the time I just copy&paste the code from tutorial into the forum.
--Prasanna
Hi Prasanna,
Thanks very much for your tip.
Is it necessary to read the developer guide first, before the tutorials.
I did read the developer guide first, but it was a bit complicated. So i then started with the Toolbox tutorials. I have done only till the delete part. It was like i had to start working on a OAF project so i had to learn things in the short time given.
But thanks a lot for your tip.
Hi Pradeep,
Its not a good option to start with developer guide. You need to use developer guide as reference guide. If you have any doubts or need detailed explanation, then you can see developer guide.
So the tutorial is the best way to start and it covers very important areas of page development. And it will take just 5-10 days to learn the whole thing.
--Prasanna
Hi Prasana,
Can you please help in solving the problem. The problem is that I have to rendered a page which consist of six checked box, while populating the lov values in the page i have to make some checked box checked at runtime.Please help me to provide the solution.What should be the code and where i should the write the code.should i write the logic in processRequest() or processFormRequest().please let me know
Hi Sanjeet,
Associate a VO attribute with every check box. Then create LOV mapping and return the values of the check box from the LOV. Include the Checkbox values logic in the Lov query itself.
--Prasanna
Prasanna
I have done a few customizations and extenstions by now and I never had the need to :
Stop the instance
cd $INST_TOP/admin/scripts
adstpall.sh apps/apps
Start the instance
adstrtal.sh apps/apps
----------------------
infact only bouncing the apache does the job.
Could there be some problems if I do not bounce the whole instance ?
Hi yo,
Bouncing the apache is enough. Very rarely you may need to bounce the instance in case of any cache problem in deploying pages. I'll also update the document.
--Prasanna
Hi Prasana,
I have following query related to my requirement.
1) I copied the xxx folder from the $JAVA_TOP....as specified above also its running properly on my local machine but I am not able to get descriptive flexfields displayed as shown in standard page.Is I am missing anything?
2) In the form there are address (descriptive flexfield)I want to pass these flexfield values to my custom pop up page as url pattern, but I am not able to find out the IDs of flexfield to pass.
3)Also we have to deploy custom pages to $JAVA_TOP or $CUSTOM_TOP/java ?If is it JAVA_TOP then we have to get permission for that??
Hi PC,
Sorry for late reply.
1. Try restarting the apache, clear the cache. check the path of the Class files.
2. Trying getting the descriptive flex values from the associated attributes of the View Object.
3. You have to deploy the class files only in $JAVA_TOP. There is no $CUSTOM_TOP/java
Thanks,
Prasanna
Hi Prasana,
Thanks for replying!
Actually for (case 1)here I am trying to run standard OA Framework page from Jdeveloper .I have copied all the class files and xml files corrosponding to that.The page also have descriptive flexfield Address field.Page is running properly but I am not able to see the flexfields.Also I am getting following validation error.
"The OA passivation framework coding standard has been violated. The view object with full name, ImcRootAM.region1879_region1_oracle_apps_ar_hz_components_composition_server_HzPuiCompositionAM.orgProfileRegion879_orgProfileRegion_oracle_apps_ar_hz_components_party_organization_server_HzPuiOrganizationProfileQuickAM.HzPuiOrganizationProfileQuickURLVO, is not properly prepared for row insertion. Either setMaxFetchSize(0) or executeQuery() (or any equivalent method that ends up executing the view object query) must be called on the view object before new rows are inserted. For a detail view object in a master - detail relationship, executeQuery() (or any equivalent method that ends up executing the view object query) must be called instead of setMaxFetchSize(0) on the detail view object before new rows are inserted into the detail view object. setMaxFetchSize(0) call on the detail view object could cause a number of adverse effects.
I found the same error here but its telling to add some code on standard AM but I am not clear how can we add code in standard AM as we have only class files.
http://kr.forums.oracle.com/forums/thread.jspa?threadID=623257
Hi Prasanna,
congratulations for your comments. They help us here and in other forums to understand a little more this complex OAF's world.
I'm beggining with my first OAF VO extension... I think extension is made in a correct way , but when I execute jpximport.bat from local to upload to the server the changes... it gives me the message:
Imported document: /oracle/apps/icx/por/reqmgmt/server/customizations/site/0/MyReqsGlanceVO
Import Completed succesfully
But.. when I log into the server.. it doesn't exist that path... so.. any step forgotten?
I've seen that after doing this impor, it created a new row on jdr_path table... and the path_name column value for the row is MyReqsGlanceVO, that is hte name of the object I extended... Is that correct? Do I need to do any else more?
Thanks.
Hi joselfmp,
You don't have to check the tables and all..
Its very simple, just check it in "About this Page" link at the bottom of the page. It will show the list of EOs/VOs and it's corresponding substitutions, if any.
or use jdr_untils.list_document(''); command from sqlplus.
--Prasanna
Hi Prassana,
Thanks for the help!
Finally I could run my first page :)
I would like to share how to get flexfields ID.
---Select view source of the page where flexfields are there,search for the 'flex' string u can get the ids.
In my case view soure contains data like
'HzAddressStyleFlex1':'Address1','HzAddressStyleFlex2':'Address2'
Here Address1 is prompt and 'HzAddressStyleFlex1' is ID.
Hi Sanjeet,
Sorry, i didn't get your problem. What do you mean my "give the link of our application in core login page".
Adding link to the Responsibility itself should be enough rite?
or Do you want to access it directly through any link?
--Prasanna
Hi Prasana,
thanks for providing so much usefull information to us.
Could you please tell me what is the diff btwn XML Page extracting from the Functional Admin and XMLExporter.
I heard that the customization page which we have developed can't be extracted by the Functiona l Admin thanks.
I have just started working on OAF.
could you please send me the doc you mentioned in the forum(Tutorial and User giude)
My Mail id is - sandeepjain_98@yahoo.com
-Thanks in advance
Hi Sanjeet,
Thanks for your comments,
First, I have given the difference b/w functional admins and XMLExporter for another question. Please refer the above comments
Second, all customizations can be downloaded through functional administrator.
Please go through following url for docs
http://prasanna-adf.blogspot.com/2008/11/new-to-oaf.html
--Prasanna
Hi Prasanna,
I am trying to add a new column into an LOV in the iProc pages in R12. There is no option of "Personalize this Page" in these external LOV's. How do I go about adding this new column, the documentation says to use "choose context" in the above page for Personalization of LOV's.
And one more question, do I have to extend the LOV Regions or can I just do Personalization to add the new column in R12.
I will really appreciate a quick response.
Balaji
Hi Prasana,
I have one problem regarding sub tab. The problem is that I have to hide or display a SubTab [i.e. a sub-menu] based on either the value of messagechoice in the screen or on the value passed by LOV. For example if i have region called Ingredients(messagechoice having value "Yes" or "No").If I click on Yes then only Two Tab i.e SubTab1 and SubTab2 should be visible otherwise SubTab3 and SubTab4 should be visible(in case of "No" option).
Hi Balaji,
You can personalize the LOV region in the functional administrator responsibility. Note down the path of the Lov region(eg /oracle/apps/ap/lov/webui/PoNumRN).Then goto Functional Administrator -> Personalization -> search for the region. Select the edit button to personalize the region.
If you want to add a column to a LOV region, you need to check whether the View Object that is associated with the LOV region has the column that you want to add.
if it exists, then just personalize the region and add the column.
Otherwise, you need extend the view object first before adding the column.
--Prasanna
Hi Sanjeet,
Enable PPR in the MessageChoice list. Create new transient attributes in your view object. Create each attribute for each subtab. Datatype of the transient attributes should be boolean.
Associate these attributes with rendered property of the subtab links like ${oa.xxViewObject.xxbooleanAttribute}. Change the value of this boolean attribute based on the value of the messageChoice in the processFormRequest() method.
I think this procedure is enough to hide or show the sub tabs.
--Prasanna
Hi Prasanna,
I have the following q wrt OAF. I have created a CO by extending the seeded one (XXCarARPrtySrchCO is extends ARPrtySrchCO). After that i could run the page from the Jdeveloper and it works fine. When I copied the extended CO to the server under $JAVA_TOP/mycompany/oracle/apps.... And then i did the personalization of the page to point to the extended controller. After that when I try to return to application from the personalization page, i am getting the following error.
oracle.apps.fnd.framework.OAException: Could not create Java class: (mycompany.oracle.apps.ar.cusstd.srch.webui.XXCarArPrtySrchCO) associated with region: (pageLayoutRN). This is probably because the class name is wrong or not included in project.
Note: I did bounce the apache.. its R12. Any help on resolving this would be great....
Thanks
Chidambaram
Hi Prasanna,
Thanks for the reply, I have one more question. Could you give me steps to load .jpx file into the server. If there are any coding steps involved, could you please provide me that too. I am using jDeveloper 10 and Apps-R12.
I was trying to use the following command in putty,
jpximport.bat C:\ARIAD\jdevhome\jdev\myclasses\ARIADProject10.jpx -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=sar26erp1-dev.ariad.corp)(Port=1522)) (CONNECT_DATA=(SID=techtest)))"
and it says 'jpximport.bat: command not found'. Could you help me with this. Thanks.
Regards,
Balaji
whatever you suggested ; I have already tried but the problm is the rendered property of the subtab links like i.e ${oa.xxViewObject.xxbooleanAttribute}. is not working. At front end it is not rendering on the SPEL value though the transient attribute value getting set to either false or true. But when I am attaching these SPEL value to other region it is working but it is not working for SubTab .....
Please give some solution.....
Hi balaji,
Please check the above the article for the command to deploy jpr file.
-Prasanna
Hi prasanna,
I'm a newbie to OAF. Tried to deploy the xxxx.jpx using the command below.
java oracle.jrad.tools.xml.importer.JPXImporter XxPersonQuery.jpx -username apps -password xxx -dbconnection "(description = (address_list = (address = (protocol = tcp)(host = idc.oracle.com)(port = XXX)))(connect_data = (sid = XXX)))"
1) When I ran from my desktop it shown the "Java Lang Error", I think because of the java version mismatch.
2) When I ran from server directly after copying the .jpx. I got a message as "No Documents imported".
Can you tell me what might be the causes. Appreciate your help.
Thanks,
Vara.
Hi Vara,
"No document imported" means your jpx file doesn't got any substitution entries.
Please open and check the dbc file.
--Prasnnna
Hi Prasana,
How do we move the whole code[class files] jar from dev to other instance like prod or vanilla.
Thanks,
Anil
Hi Prasanna,
I have requirement that in the notifcation i have to show some details in the table format. After click on the events in the table i have to navigate to some other page.
My doubt is that possible to attach the region in the Notification message. if so pls
help me how to do it.
Regards,
Uma.
Hi Uma,
If you want to use complex elements in the dialog page then I would recomend create a new OAF page and use it as dialog page.
Redirect to that page for confirmation and commit/cancel data from there... use retainAM=Y to maintain the transaction between pages.
--prasanna
Hi Prasanna,
I have exported from R11 instance using export command and
java oracle.jrad.tools.xml.exporter.XMLExporter
Now When needed to download from R12 server i get error as
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jrad/tools/xml
/exporter/XMLExporter
and
D:\JDev\jdevbin\jdev\bin>export
'export' is not recognized as an internal or external command,
operable program or batch file.
Thanks in Advance.
try the commands given in the article in R12/11i server.
If you try from local jdeveloper, go to (jdevhome)\jdevbin\oaext\bin and use export.bat, import.bat, jpximport.bat commands.
--Prasanna
Hello Prasanna,
I want to use a standard LOV (/oracle/apps/ar/cusstd/lov/webui/ArSudSalesPerRN) on my page. But it should return a different value. On standard page it returns name, our requirement is to have it return number. I do not know the coulumn of this LOV. What is the way to find that out.
Your help will be appreciated.
Thanks
you can see the details of the LOV in "about this Page" link.
or
download the LovRN and LOV vo from the server and view them in Jdeveloper.
--Prasanna
hi thanks for your good comments
hi Prasana,
I have one Standard OAF page and want to do some cutomizations,but the problem is that in Oracle Revenue management screens we can't see personalization link.So how to perform customizations to those pages(add buttons/tabs).And whats the best way of doing that.
Thanks
BChopra
enable the oa:diagnostics profile option to see the links
hi
Can you please suggest what needs to be done for the OAF pages customized in case of an upgrade from 11i to R12
Regards,
VIshnu
Simple.. Extract the pages from 11i and deploy them to R12. Also deploy the related class files.
Hi Prasanna,
we have a CO extension in 11i and now as we are upgrading to R12, after deploying the files to R12 instance, the page works fine using mozilla firefox but not IE,
can you help me on this
Hi Prasanna!
I've designed new project and succesfully tested it on my local PC.
When I'm trying to import PrintEmpPG.xml into MDS tables,
it completes succesfully, and I find new row in JDR_PATHS:
PrintEmpPG
but when I check the full path:
BEGIN
jdr_utils.printDocument('/xxtnh/oracle/apps/xxtnh/specodezhda/webui/PrintEmpPG');
END;
it shows: Error: Could not find document /xxtnh/oracle/apps/xxtnh/specodezhda/webui/PrintEmpPG
also, I've noticed that there is no row for PACKAGE xxtnh:
select * from jdr_paths t
WHERE T.PATH_NAME = 'xxtnh'
AND t.path_type = 'PACKAGE'
no rows selected.
Where am I wrong? How to import new package into MDS?
The given post explains how to deploy OA framework. This post includes 5 very simple steps. I tried those steps. I think you can easily implement this framework with the help of the given steps. I am able to deploy OA framework by following these steps.
sap pp tables
Hi Prasana,
When a XML Page is Imported, which Oracle Table store this information.
Thanks
Bhavesh
I have done a contoller extension how do i deploy it
Post a Comment