0% found this document useful (0 votes)
133 views9 pages

Apps - Debugging OA Framework - 7 Different Techniques

This document describes 7 different techniques for debugging Oracle Application Framework (OA Framework) pages: 1. Using System.out.println to print debug messages in the jDeveloper console. 2. Using the jDeveloper debugger to set breakpoints and inspect variables at runtime. 3. Changing a Java VM runtime option to output SQL statements to the console. 4. Using FND Debug Logging to display messages onscreen or log them to a table. 5. Performing SQL tracing to log SQL statements. 6. Using FND logging profile options to capture debug messages in a table. 7. Using raiseDeveloperException to display messages at the top of pages.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views9 pages

Apps - Debugging OA Framework - 7 Different Techniques

This document describes 7 different techniques for debugging Oracle Application Framework (OA Framework) pages: 1. Using System.out.println to print debug messages in the jDeveloper console. 2. Using the jDeveloper debugger to set breakpoints and inspect variables at runtime. 3. Changing a Java VM runtime option to output SQL statements to the console. 4. Using FND Debug Logging to display messages onscreen or log them to a table. 5. Performing SQL tracing to log SQL statements. 6. Using FND logging profile options to capture debug messages in a table. 7. Using raiseDeveloperException to display messages at the top of pages.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

DebuggingOAFramework7DifferentTechniques

|Print|

WrittenbyAnilPassi
Saturday,15September2007
Inthisarticle,IwillexplainsevendifferentmethodstodebugOAFrameworkpagesinOracleeBusinessSuite.
EachofthesemethodsareexplainedusingworkingAudioVideodemo,henceyouwillneedyourheadphones.
SomeofthesetechniquesareapplicablewhenrunningtheFrameworkpagesfromjDeveloper,whereasotherdebugging
techniquesapplywhendebuggingOAFrameworkPagesfromeBusinessSuiteresponsibility.
EachmethodofdebuggingOAFrameworkpageshasitsownmerits,andhenceyoumustapplyoneofthetechniquesthat
suitesthemosttoyoursituation.

1.UseSystem.out.println
WhenrunningtheOAFrameworkpagesfromjDeveloperitself,youcanwritedebugmessagesusingSystem.out.println.
ThesedebugmessageswillbedisplayedintheconsoleofjDeveloper.
Pro
*Easeofuse,asyousimplyenterfreetextmessages
*Debugmessagessimplyappearwithouttheneedtosetanyprofileoptions
Cons
*Toomuchtyping,whichcanbeavoidedwhenusingthedebuggerofjDeveloper.
*Youcandebugonlythosepiecesofcodethatyoususpectarecausingtheerror.Unliketothisapproach,using
jDeveloperdebugging,breakpointscanbesetforexceptions/classesaswell.
ClickheretoseeaquickworkingdemofordebugingOAFrameworkusingSystem.out.println

2.UsejDeveloperinbuiltDebugger
ThishappenstobemyfavouritemechanismtodebugOAFrameworkPages,forthefollowingreasons
Pro
*Togetstartedjustonebreakpointisrequired,asmoreandmorebreakpointscanbeaddedinruntimeitself.
*Youcansetgenericbreakpoints,forexample,youcansetbreakpointonexceptions,whichwilltakeyoutotheexact
lineofcodefromwheretheexceptionwasbeingraised
*jDevelopermakesitpossibletotrydifferentscenarios,forexample,youcanchangethevariablevaluesatruntime
Cons
*Giventhatyoudonothavesourcecodeofbaseclasses,debuggerusuallydivesintothoseclasseswithoutgiving
manyvisibledetails.Onemayfindthisannoying.
*SomeversionsofOAFwkraiseexceptions[caughtinternallybyOracle]likeClasscastexceptionevenbeforethe
pagerenders.
Debuggeroftenpauseswhenthoseexceptionsareraised.Thiscanbeovercomebyclickingonresumebuttonof
debugger.
Clickherefordemoofdebuggingviajdeveloperdebugger
Thedemoinabovelinkalsoshowshowyoucanchangethevariablevaluesatruntime.
Clickherefordemoofusingdebuggertotrapclasscastexceptions
ThedemoinabovelinkshowshowyoucansetbreakpointsforspecificExceptionsthatcanberaisedfromOAFramework
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

1/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

Pages

3.UsejDeveloperdebuggingfeature,bychangingJavaVMruntimeoptionDjbo.debugoutput
Letssay,forthisexercise,IwishtofindtheexactpieceofSQLStatementthatmyscreenfires,whendoinganupdate.
Inordertodoso,wecanappendtextDjbo.debugoutput=consoletorunnerproperty
Asshownbelow,IcanenterthefollowingtextinRunnerpropertyofjDeveloper

Havealookatthisdemotovisuallyseethisdebuggingtechnique

4.UsetheFNDDebugLoggingfeature,toseedebugmessagesontheOAFrameworkScreenitself
Thedebugmessagescaneitherbeenseenonthesamescreenorthosecanbespooledintoatablenamed
FND_LOG_MESSAGES
InjDeveloper,youmustincludeOADiagnosticintheRunOptions.
ThisiseffectivelysimilartosettingprofileoptionFNDDiagnosticstoYesineBusinessSuite.
Usingthisoption,youwillbeabletoclickonDiagnosticstoenableOnScreendisplayofdebugmessages.

Pro
*ThedebugmessagesseenusingthistechniqueareexactlythesameasthedebugmessagesseenineBusiness
Suite,onceFND%Log%profileoptionsareavailable.
*ThereistremendousamountofdebugmessagesinFNDclassesgivenbyOracle.
*ThisapproachisthemostusefulwheninvestigatingredcolourederrormessagePleasecontactyoursystem
administrator
Cons
*Priorto11.5.10,thisoptionmightbringyourapplicationsessiondowntoitsknee.ButInoticefrom11.5.10onwards,
thesedebugmessagesarecapturedveryefficiently.
*Thedebuggingislimitedtothedebugmessagesinplace.Tomaximisethelistingofdebugmessages,trytouse
statementleveldebugging.
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

2/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

ClickhereforthedemoofdoingonscreendebuggingforOAFrameworkpages

5.SQLTraceforOracleFrameworkSessions
WeoftenusethistechniquefortracingtheSQLstatementsexecutedbyOracleFormsorbyconcurrentprograms.
ThesametechniquecanbeappliedtoOAFrameworktoo.
YoucanruntheSQL*TraceeitherwhenrunningtheapplicationpagesfromOAFrameworkorwhenrunningOA
FrameworkpagesfromwithineBusinessSuite.
ForjDev,ensurethatOADiagnosticshasbeenincludedinjDeveloperProjectpropertyRunOptions.
AlternatelyensurethatprofileoptionFNDDiagnosticshasbeensetupagainstyourusername.
ClickhereforthedemoofSQL*TraceonOAFrameworkPages

6.UseFNDLoggingprofileoptionstocapturedebugmessagesintoatablenamedFND_LOG_MESSAGES
UsetheFNDDebugLoggingfeature,toseedebugmessages.
Thedebugmessagescaneitherbeenseenonthesamescreenorthosecanbespooledintoatablenamed
FND_LOG_MESSAGES
PleaseclickonthislinktoseeanarticleonFNDLogging

7.UseraiseDeveloperException.
Ihadallbutforgottenaboutthistechnique,untilIdiscussedthispaperwithMrSenthilpriortoitspublication.
HeremindedofraiseDeveloperException.YoucanraisedebugmessagestobedisplayedinOAFrameworkpagesusing
raiseDeveloperException.
Bydoingso,yourdebugmessageswillbevisibleontothetopportionofthescreen.
ThisisverysimilartoSystem.out.println,howeverthekeydifferencebeingthatraiseDeveloperExceptiondisplaysthedebug
messageontopportionofthepageitself.
Pro
*Easeofuse,asyousimplyenterfreetextmessages
*Debugmessagessimplyappearwithouttheneedtosetanyprofileoptions
*Debugmessagesappearonthetopportionofthepageandhencetheeaseofvisibilitywhentestingyourcodein
jDeveloper
Cons
*Toomuchtyping,whichcanbeavoidedwhenusingthedebuggerofjDev.
*Youcandebugonlythosepiecesofcodethatyoususpectarecausingtheerror.
ClickherefortheworkingdemoofthistechniquetodebugOAFrameworkPage.
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

3/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

Comments(20)
Subscribetothiscomment'sfeed

...
writtenbySamuelSchwartz,September17,2007
HiAnil,
Amazingarticles!Thanks.
Ihaveadoubt.SupposingIwanttowalkthroughthecode(notdebug),rightfromthescreentotheEO'sandVOs,in
Jdeveloper.Isitpossibletoimportthesourcecode,viz,.jsp,.xml(usingapatchfrommetalink)intojdeveloper?
Regards,
Sam

...
writtenbyAnilPassi,September17,2007
HiSam
Ifyouwishtowalkthroughthecode,thendothefollowing
1.FTPalltherequiredsubdirectoriesfrom$JAVA_TOPtomyclasses.
Thisincludesall.classfilesandallthe.xmlfiles
2.FTPthesamesubdirectoriesfrom$JAVA_TOPtomyprojects.
3.Decompilethe.classfilesinmyprojectsandnamethosedecompiledfilesto.java
4.Deletethe.classfilesfrommyprojects
5.FTPthexmlfilesfrom$PRODUCT_TOP/mdstomyprojects
6.ImporttherequiredBC4Jfilesthatyouwishtodebug
7.SetbreakpointsindesiredEOandVO
8.Runthemdspageindebugmode,andthatwilltakeyoustraighttobreakpointsinEO/VO/AM/COetc.
Thanks,
AnilPassi

...
writtenbykartikey,September19,2007
HiAnil,
itsreallyag8workwhichyourdoing.manymanythanksforthat.
Ihvaquestionsorryididnotgettherightformsoimusingthis.Ihvcreatedasqlplusbasedreportandregisteredit
inappsasaconcurrentreportwhichrunforUS,UK,CANADA.althoughihvsetorg_idanditisrunningfinenowi
wanttodoamodification.Iwanttorunthisreportthroughonegeographicresponsibilityanditshouldcollectallthe
dataofallgeographic
ExifIminPAUSsuperuseriwanttorunthisreportforUSandUKasihvsettheorg_id:default:profileitisonly
gettingdataofUSnotUK.IwantthatusercanabletogetdataofUKandUSthroughPAUSsuperuserorUKand
canadaorUSUKcanadameanstogetdataofothercountryusershouldchangenotresponsibilityhecangetdata
ofallcountrybyoneresponsibility.
Plzhelpmeasapbymailor.
Iwillbeverythankful
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

4/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

bye

...
writtenbyAnilPassi,September19,2007
HiKartik
AreyouonR12,ifso,pleasereadhttp://oracle.anilpassi.com/multiorgr1233.htmlandalso
http://oracle.anilpassi.com/mo...ign2.html
Incaseyouareon11i,youwillneedtoimplementthelogicyourself.
Therearevariousoptionsthatyouhave:
1.CreateOrgGroups,sayusingFND_LOOKUPTYPESandpassthelookuptypeasparameter.
Lookupcodeswillbetheorgcodesforeachlookuptype.
IntheSQLqueryuse_alltablesandjointothefnd_lookup_typesforthelookup_typepassedasparameter.
2.Passanodeoftheorghierarchyasaparameter
Again,amendyourSQLquerywith_allsynonymsandjointoorghierarchy
3.Forthesameexecutable,usevariousconcurrentprogramandpasshiddenparameters.
Incase,youwishtoreportaccrossallorg'sthenignoreabove3options,andsimplyuse_allsynonymsinyourSQL
Thanks,
AnilPassi

...
writtenbybompada,September20,2007
HiAnil,
veryusefulinformation.Appreciateyourhelp.
Ihaveadoubtisthereanywaytostopdeveloperexceptionsallatonce.
ForexampleIhave10placeswhereihaveraisedthisdeveloperexceptions.JustbeforedeliveringmycodeIhave
todisabletheselines,soisthereanywaytounsetallatatime.
Thanksinadvance.
Bhaskar

...
writtenbymadhusudhan,September21,2007
HiAnil
DohaveAppsFunctional(manufacturing&distribution)interviewquestions

...
writtenbyAnilPassi,September22,2007
HiBhaskar
PleasetrysettingprofileoptionFNDDeveloperModetoNoandseeifdebugmessagesdisappear.
raiseDeveloperExceptionisprimarilyusedinternallybyOracledevelopers.
Havingsaidso,thebestwaytocapturedebugmessagesinOAFrameworkisFNDLogging,asthatfacilitateson
screenlogging,tablebasedlogging&filebasedlogging.ForthisyoucanusepageContext.writeDiagnosticsin
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

5/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

Controlleroroadbtransaction.writeDiagnosticsinBC4J.Allyourcustom/extendedclassnameswillbeginwithxx,
henceyoucanapplythefilterformodule=xx%.Bydoingso,onlyyourcustomdebugmessageswillbedisplayed
Thanks,
AnilPassi

...
writtenbyvidhya,September26,2007
hianil,
iwanttoknowhowtodownloadareportfromunixfoldertolocalsystemthroughOAF.canwedothis.canutellme
thesolution

...
writtenbyAnilPassi,September26,2007
HiVidhya
Itisntclearfromyourpostwhetherthefileonunixboxisinasecuredarea?
IncasethefileisinOA_HTML[nonsecured],thensimplycreateahyperlinktothatfileinframeworkpage.Userscan
thenrightclickthelinktosavefileontothePC.
Ifthefileexistsinsecuredarea,thenloadthatfileintoablobintoatable.Next,inyourOAFrameworkpage,create
anattachmenttablebeanthatprovidesaccesstofileinblob.Userscanthenclickonattachmentlinktoopenthefile.
Iamafraid,thereisnowayyoucanFTPthefilestraightfromserverontoPCusingOAFramework.
Thanks,
AnilPassi

...
writtenbySS,September27,2007
Hi,
Ihavetocreateanewemployeenumberusingpersontypes.
TherearethreeEmployeetypeslikeType1,Type2,Type3.Allthethreepersontypesmusthaveuniqueseriesof
numbers(numericoralphanumeric).
Regards
SS

...
writtenbyvidhya,September27,2007
ThanksAnil

...
writtenbyManishKumar,September29,2007
HeyAnil,
http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

6/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

Firstofallthanksforstartingsuchanicethread.Itsreallyhelpful.
IamfacingaproblemwithOADefaultHideShowBean.Ihaveapageinwhichasharedregionisembeddedtwice.
ThatsharedregioncontainsaHideShowregionbymakinguseofOADefaultHideShowBean.
Butwheniclickontheshowhidelinkoftheregionembeddedsecondithides/showstheregionthatwasembedded
first.Whenthehide/showlinkoffirstregionisclickedchangehappensonlyforthefirstregion.
Pleaseguidehowtoproceedtosolvethisproblem?
Thepagelayoutisasfollows
Page1(MainPage)
ShowHideRN(1st)
SharedRegion
ShowHideRN(2nd)
whenshow/hidelinkof2ndinstanceisclickedchangehappensonlyinthefirstinstance.

Howtocompile.fmbinlinuxmachine
writtenbypavankumar,October05,2007
iamnotabletocompilethe.fmbinlinuxmachineitwastellinginvalidcommand
plztellmewatistheproblem

...
writtenbypavankumar,October08,2007
Hianil

iamnotabletocompilethe.fmbinlinuxmachineitwastellinginvalidcommand
plztellmewatistheproblem

Thanks
PavanP

...
writtenbyAnilPassi,October08,2007
HiPravin,
Yourappsenvironmentonshellisn'tsetupcorrectly.
Hencef60genisnotinthepath.
Yourdba'sshouldbeabletohelpyouwiththis
Thanks,
AnilPassi

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

7/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

OApagedebugging
writtenbysilpa,October09,2007
Hianil
WehaveanOApage.Weneedtomakesomechangestothispage.Couldyoutellmethestepstobefollowedto
downloadthepageandtheentireprojectrelatedtoit?
Thanks
Silpa

...
writtenbyAnilPassi,October09,2007
Shilpa
Oracledoesnotdeliver.jprfiles.
Henceyouneedtobringtheobjectsyourselfintojdev
YouwillneedtoFTPthepagefrom$PRODUCT_TOP/mds/../....webui
Andthenputthatpageintomyprojects
Youcanopenthatpagetoseetheservercomponents[VO/EO/AM]etcyouneed.
Torunthatpage,allthesedependentobjectsmustbeplacedinmyclasses,asmyclassesfolderisincludedin
CLASSPATHforOAFrameworkruntimeinjDev.
IncaseyouneedtoextendBC4J,thenopenthoseBC4Jobjectsusingserver.xml
YouwillalsofindmyresponsetoSam[abovedatedSeptember17,2007]useful.
Thanks,
AnilPassi

...
writtenbypavankumar,October16,2007
HiAnil
Canuplztellmetheformslogfilelocationwhenwearecompilingthe.fmb(form)whereshouldbelogfilewillbe
created.
Thanks
PavanP

Selfservicepagetables
writtenbysivaram,December24,2007
HiAnil,
iwanttodebugoneoftheselfservicepagetocheckwhichtablesgotupdatingorinsertingbehindthepage.

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

8/9

7/21/2015

AppsDebuggingOAFramework7DifferentTechniques

iknowthatwecancheckintheoracleformsthroughHELPDIAGONASTICSEXAMINEtocheckthecolumnand
table.
SamewayhowtocheckintheOracleHTMLpage(OA).
Thanks,
Siva

addingalabeltext
writtenbyscott,December28,2007
question.inoaframework(newtoit)ineedtoaddaitem(asmessagestyletext)
whenthebuttonishit,iwanttheblankprompttosayCreatedondate(dateisavariable).howwouldigoabout
doingthis.mypageworksbutnotsurehowthiswouldbedone
thanks
scott

Youmustbeloggedintoacomment.Pleaseregisterifyoudonothaveanaccountyet.

CloseWindow

http://oracle.anilpassi.com/index2.php?option=com_content&task=view&id=187&pop=1&page=0&Itemid=27

9/9

You might also like