18 January 2011

Enable Diagnostic Messages on your ADF Application

Last Upate: 1/4/2011
 
In order to troubleshoot the problem of your Fusion Web Application, you can enable the diagnostic messages on the WLS (WebLogic Server) that you application is running.

Enable Diagnostic messages in BC
To enable diagnostic message in BC check Turn on Diagnostic to Debug Oracle ADF BC Applications

Reposting:
  1. Select the project (e.g., "Model").
  2. Do right mouse click and select "Project Properties"
  3. On the property dialog, select "Run/Debug/Profile".
  4. Edit your Run Configuration (e.g., "Default")
  5. On the right pane, you should see "Java Options" input text field. Add the following Java system parameter: -Djbo.debugoutput=console



Enable Diagnostic messages in View
You can enable both on the embedded or standalone WLS.

  • The embedded WLS is the one that is running when you run your application from JDeveloper (during development)


  • A standalone WLS is when you run wls from the start script (usually in production systems). You can run the embedded as a standalone too.

(cmd for windows , sh for Unix)

In the following examples will be enabling only 2 diagnostic options:
  • -Djbo.debugoutput=file  
  • -Djbo.logging.show.function=true
You can find more on diagnostic messages related post.

Enabling diagnostic messages in embedded WLS 
You can enable diagnostic messages
  • Open your ViewController Project Properties
  •  run/debug/profile
  • Edit
  • In "Java Options" add the parameters for enabling dagnostic messages. e.g. -Djbo.debugoutput=file  -Djbo.logging.show.function=true



Moreover, you can perform this steps to a Model problem in case you want to have diagnotic messages when running Bussiness Components Tester.

Enabling diagnostic messages in standalone WLS
In the following example will be using the WLS that is shipped with JDeveloper as a standalone in a Windows machine.  
Go to WLS bin directory. In our case  %JDEV_SYSTEM_DIR%\DefaultDomain\bin\ 
eg
C:\JDeveloper\mywork\system11.1.1.3.37.56.60\DefaultDomain\bin\ 
(Note: Check related post to find out the JDEV_SYSTEM_DIR from log of the running WLS.)

Open file setDomainEnv.cmd On the top of the file after the comments enter the following line Then modify the following line (in the same line.)
to (in the same line.)



The is also an alternative way. You do not need to set -D params but edit the Diagnostic.properties file. Just take a look on the following quoted text:

Business Component diagnostics can be controlled by setting various jbo.xxx system properties. By default, the system property definitions reside in the file Diagnostic.properties in the .\oracle\jbo\common path on theCLASSPATH.
A default version of this file is supplied in the .\lib\jbomt.zip library. You can permanently change the default settings by extracting this file from the .zip archive, changing the values of the properties in the file, and making it available earlier in your project's library path. The file must appear before the library named "JBO Runtime" in the appropriate .\oracle\jbo\common subdirectory.
(I ll try to find time to give a more detailed and ready to  use example)


dig more:

No comments:

Post a Comment

You might also like:

Related Posts Plugin for WordPress, Blogger...