Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

In this article, I will explain seven different methods to debug OA Framework pages in Oracle eBusiness Suite.

Each of these methods are explained using working Audio-Video demo, hence you will need your headphones.

Some of these techniques are applicable when running the Framework pages from jDeveloper, whereas other debugging techniques apply when debugging OA Framework Pages from eBusiness Suite responsibility.

 

Each method of debugging OA Framework pages has its own merits, and hence you must apply one of the techniques that suites the most to your situation.



1. Use System.out.println

When running the OA Framework pages from jDeveloper itself, you can write debug messages using System.out.println.

These debug messages will be displayed in the console of jDeveloper.

Pro

    *      Ease of use, as you simply enter free text messages

    *      Debug messages simply appear without the need to set any profile options

Cons

    *      Too much typing, which can be avoided when using the debugger of jDeveloper.

    *      You can debug only those pieces of code that you suspect are causing the error. Unlike to this approach, using jDeveloper debugging, breakpoints can be set for exceptions/classes as well.

 

Click here to see a quick working demo for debuging OA Framework using System.out.println






2. Use jDeveloper inbuilt Debugger

This happens to be my favourite mechanism to debug OA Framework Pages, for the following reasons

Pro

    *       To get started just one breakpoint is required, as more and more breakpoints can be added in runtime itself.

    *       You can set generic breakpoints, for example, you can set breakpoint on exceptions, which will take you to the exact line of code from where the exception was being raised

    *       jDeveloper makes it possible to try different scenarios, for example, you can change the variable values at runtime

Cons

    *      Given that you do not have source code of base classes, debugger usually dives into those classes without giving many visible details. One may find this annoying.

    *      Some versions of OAFwk raise exceptions[caught internally by Oracle] like Classcast exception even before the page renders.

    Debugger often pauses when those exceptions are raised. This can be overcome by clicking on “resume button” of debugger.

 

Click here for demo of debugging via jdeveloper debugger

The demo in above link also shows how you can change the variable values at runtime.

 

Click here for demo of using debugger to trap classcast exceptions

The demo in above link shows how you can set breakpoints for specific Exceptions that can be raised from OA Framework Pages





3. Use jDeveloper debugging feature, by changing Java VM runtime option Djbo.debugoutput

Lets say, for this exercise, I wish to find the exact piece of SQL Statement that my screen fires, when doing an update.

In order to do so, we can append text -Djbo.debugoutput=console to runner property

As shown below, I can enter the following text in Runner property of jDeveloper

Have a look at this demo to visually see this debugging technique




4.    Use the FND Debug Logging feature, to see debug messages on the OA Framework Screen itself

The debug messages can either been seen on the same screen or those can be spooled into a table named FND_LOG_MESSAGES

In jDeveloper, you must include OADiagnostic in the “Run Options”.

This is effectively similar to setting profile option “FND Diagnostics” to Yes in eBusiness Suite.

Using this option, you will be able to click on Diagnostics to enable On-Screen display of debug messages.

Pro

    *    The debug messages seen using this technique are exactly the same as the debug messages seen in eBusiness Suite, once FND%Log% profile options are available.

    *    There is tremendous amount of debug messages in FND classes given by Oracle.

    *    This approach is the most useful when investigating red coloured error message “Please contact your system administrator”

Cons

    *    Prior to 11.5.10, this option might bring your application session down to its knee. But I notice from 11.5.10 onwards, these debug messages are captured very efficiently.

    *    The debugging is limited to the debug messages in place. To maximise the listing of debug messages, try to use statement level debugging.

 

Click here for the demo of doing on-screen debugging for OA Framework pages






5.    SQL Trace for Oracle Framework Sessions

We often use this technique for tracing the SQL statements executed by Oracle Forms or by concurrent programs.

The same technique can be applied to OA Framework too.

You can run the SQL*Trace either when running the application pages from “OA Framework” or when running OA Framework pages from within eBusiness Suite.

For jDev, ensure that OA Diagnostics has been included in jDeveloper Project property “Run Options”.

Alternately ensure that profile option “FND Diagnostics” has been setup against your username.

 

Click here for the demo of SQL*Trace on OA Framework Pages







6.   Use FND Logging profile options to capture debug messages into a table named FND_LOG_MESSAGES

Use the FND Debug Logging feature, to see debug messages.

The debug messages can either been seen on the same screen or those can be spooled into a table named FND_LOG_MESSAGES

 

Please click on this link to see an article on FND Logging






7.   Use raiseDeveloperException.

I had all but forgotten about this technique, until I discussed this paper with Mr Senthil prior to its publication.

He reminded of raiseDeveloperException. You can raise debug messages to be displayed in OA Framework pages using raiseDeveloperException.

By doing so, your debug messages will be visible onto the top portion of the screen.

This is very similar to System.out.println, however the key difference being that raiseDeveloperException displays the debug message on top portion of the page itself.

Pro

    *      Ease of use, as you simply enter free text messages

    *      Debug messages simply appear without the need to set any profile options

    *      Debug messages appear on the top portion of the page and hence the ease of visibility when testing your code in jDeveloper

Cons

    *      Too much typing, which can be avoided when using the debugger of jDev.

    *      You can debug only those pieces of code that you suspect are causing the error.

 

Click here for the working demo of this technique to debug OA Framework Page.


Anil Passi

Comments   

0 #1 Shakil Ahmed 2007-09-17 08:04
Hi Anil,

Amazing articles ! Thanks.
I have a doubt. Supposing I want to walkthrough the code (not debug), right from the screen to the EO's and VOs, in Jdeveloper. Is it possible to import the source code, viz, .jsp, .xml (using a patch from metalink) into jdeveloper ?

Regards,
Sam
Quote
0 #2 Anil Passi 2007-09-17 13:08
Hi Sam

If you wish to walk through the code, then do the following
1. FTP all the required sub-directories from $JAVA_TOP to myclasses.
This includes all .class files and all the .xml files
2. FTP the same sub-directories from $JAVA_TOP to myprojects.
3. Decompile the .class files in myprojects and name those decompiled files to .java
4. Delete the .class files from myprojects
5. FTP the xml files from $PRODUCT_TOP/md s to myprojects
6. Import the required BC4J files that you wish to debug
7. Set breakpoints in desired EO and VO
8. Run the mds page in debug mode, and that will take you straight to breakpoints in EO/VO/AM/CO etc.

Thanks,
A nil Passi
Quote
0 #3 kartikey 2007-09-19 11:25
Hi Anil ,
its really a g8 work which you r doing.many many thanks for that.
I hv a question sorry i did not get the right form so i m using this.I hv created a sqlplus based report and registered it in apps as a concurrent report which run for US,UK ,CANADA.althoug h i hv set org _id and it is running fine now i want to do a modification .I want to run this report through one geographic responsibility and it should collect all the data of all geographic
Ex if I m in PA US superuser i want to run this report for US and UK as i hv set the org_id :default:profil e it is only getting data of US not UK .I want that user can able to get data of UK and US through PA US superuser or UK and canada or US UK canada means to get data of other country user should change not responsibility he can get data of all country by one responsibility.

Plz help me asap by mail or .
I will be very thankful
bye
Quote
0 #4 Anil Passi 2007-09-19 11:42
Hi Kartik

Are you on R12, if so, please read www.google.com/search?q=site:apps2fusion.com+multi-org-r12-33 and also www.google.com/search?q=site:apps2fusion.com+mo-global-dive-into-r12-multi-org-design-2

In case you are on 11i, you will need to implement the logic yourself.
There are various options that you have:-
1. Create Org-Groups, say using FND_LOOKUP TYPES and pass the lookup type as parameter.
Look up codes will be the org-codes for each lookup type.
In the SQL query use _all tables and join to the fnd_lookup_type s for the lookup_type passed as parameter.
2. Pass a node of the org hierarchy as a parameter
Again , amend your SQL query with _all synonyms and join to org hierarchy
3. For the same executable , use various concurrent program and pass hidden parameters.

In case, you wish to report accross all org's then ignore above 3 options,and simply use _all synonyms in your SQL

Thanks,
An il Passi
Quote
0 #5 Super User 2007-09-20 18:03
Hi Anil,
very useful information. Appreciate your help.
I have a doubt - is there any way to stop developer exceptions all at once.
For example I have 10 places where i have raised this developer exceptions. Just before delivering my code I have to disable these lines, so is there any way to unset all at a time.
Thanks in advance.
Bhaska r
Quote
0 #6 nikhil kumar 2007-09-21 12:57
Hi Anil
Do have Apps Functional(manu facturing & distribution)in terview questions
Quote
0 #7 Anil Passi 2007-09-22 00:20
Hi Bhaskar

Please try setting profile option “FND Developer Mode” to No and see if debug messages disappear. raiseDeveloperE xception is primarily used internally by Oracle developers.

Ha ving said so, the best way to capture debug messages in OA Framework is FND Logging, as that facilitates on-screen logging, table based logging & file based logging. For this you can use pageContext.wri teDiagnostics in Controller or oadbtransaction .writeDiagnosti cs in BC4J. All your custom/extended class names will begin with xx, hence you can apply the filter for module = xx%. By doing so, only your custom debug messages will be displayed

Than ks,
Anil Passi
Quote
0 #8 Mohamed 2007-09-26 12:26
hi anil,
i want to know how to download a report from unix folder to local system through OAF. can we do this. can u tell me the solution
Quote
0 #9 Anil Passi 2007-09-26 19:27
Hi Vidhya

It isn’t clear from your post whether the file on unix box is in a secured area?
In case the file is in OA_HTML[non-sec ured], then simply create a hyperlink to that file in framework page. Users can then right-click the link to save file onto the PC.

If the file exists in secured area, then load that file into a blob into a table. Next, in your OA Framework page, create an attachment table bean that provides access to file in blob. Users can then click on attachment link to open the file.

I am afraid, there is no way you can FTP the file straight from server onto PC using OA Framework.

Tha nks,
Anil Passi
Quote
0 #10 bhaskar 2007-09-27 08:53
Hi,

I have to create a new employee number using person types.
There are three Employee types like Type1, Type2, Type3. All the three person types must have unique series of numbers(numeric or alphanumeric).

Regards
SS
Quote
0 #11 Mohamed 2007-09-27 11:50
Thanks Anil
Quote
0 #12 Manish Kumar 2007-09-29 07:54
Hey Anil,

First of all thanks for starting such a nice thread. Its really helpful.

I am facing a problem with OADefaultHideSh owBean. I have a page in which a shared region is embedded twice. That shared region contains a HideShow region by making use of OADefaultHideSh owBean.

But when i click on the show hide link of the region embedded second it hides/shows the region that was embedded first. When the hide/show link of first region is clicked change happens only for the first region.

Please guide how to proceed to solve this problem?

The page layout is as follows

Page1 (Main Page)--
-ShowHideRN (1st)

-Shared Region
-- ShowHideRN (2nd)

when show/hide link of 2nd instance is clicked change happens only in the first instance.
Quote
0 #13 siddarth sivakumar 2007-10-05 04:25
iam not able to compile the .fmb in linux machine it was telling invalid command
plz tell me wat is the problem
Quote
0 #14 siddarth sivakumar 2007-10-08 05:31
Hi anil


iam not able to compile the .fmb in linux machine it was telling invalid command
plz tell me wat is the problem


Thanks
Pavan P
Quote
0 #15 Anil Passi 2007-10-08 13:34
Hi Pravin,
Your apps environment on shell isn't setup correctly.
Henc e f60gen is not in the path.

Your dba's should be able to help you with this

Thanks,
A nil Passi
Quote
0 #16 silpa 2007-10-09 11:06
Hi anil

We have an OA page. We need to make some changes to this page. Could you tell me the steps to be followed to download the page and the entire project related to it?

Thanks
Silpa
Quote
0 #17 Anil Passi 2007-10-09 11:15
Shilpa

Oracle does not deliver .jpr files.
Hence you need to bring the objects yourself into jdev
You will need to FTP the page from $PRODUCT_TOP/md s/../....webui
And then put that page into myprojects

You can open that page to see the server components[VO/E O/AM] etc you need.
To run that page, all these dependent objects must be placed in myclasses, as myclasses folder is included in CLASSPATH for OA Framework runtime in jDev.

In case you need to extend BC4J, then open those BC4J objects using server.xml

You will also find my response to Sam [above dated September 17, 2007] useful.

Thanks ,
Anil Passi
Quote
0 #18 siddarth sivakumar 2007-10-16 04:43
Hi Anil

Can u plz tell me the forms log file location when we are compiling the .fmb(form) where should be log file will be created.

Thank s
Pavan P
Quote
0 #19 siva ram 2007-12-24 15:17
Hi Anil,

i want to debug one of the self service page to check which tables got updating or inserting behind the page.

i know that we can check in the oracle forms through HELP---DIAGONAS TICS--EXAMINE to check the column and table.

Same way how to check in the Oracle HTML page (OA).

Thanks,

Siva
Quote
0 #20 scott 2007-12-28 17:11
question. in oaframework (new to it) i need to add a item ( as message style text)
when the button is hit, i want the blank prompt to say Created on date (date is a variable) . how would i go about doing this. my page works but not sure how this would be done
thanks
sco tt
Quote
0 #21 sarathx1 2011-05-03 20:41
8) 8) 8) 8) 8) 8) 8) 8)
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner