Portal Development Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Obtaining Debug Information

This chapter explains how to obtain debug information from public WLP classes and add debugging calls to your own code. This chapter includes the following sections:

For details on how to use Oracle Enterprise Pack for Eclipse to debug your web application project, see "Deploying or Debugging the Application" in Oracle Fusion Middleware Quick Start Guide for Oracle WebLogic Portal.



The class com.bea.p13n.util.debug.Debug is used throughout WLP classes to print information that can be useful in debugging. You can use the Debug class in your own code. By default, debugging is turned off. For information on turning debug output on and off, see Turning Debug Output On and Off on page 11-3.


Configuring and Enabling Debug

The com.bea.p13n.util.debug.Debug class provides methods for printing and information messages from WLP code. This section explains how to use Debug in your own code and to turn Debug output on and off. This section includes these topics:

Using Debug in Your WLP Code

Use the com.bea.p13n.util.debug.Debug class to add debugging information calls to your WLP code. The Debug class lets you:

Listing 11-1 illustrates the basic pattern for using Debug in your classes. For detailed information on Debug methods, refer to the Javadoc (Oracle Fusion Middleware Java API Reference for Oracle WebLogic Portal).

Listing 11-1 Using Debug in a Class
   package com.bea.example;
import com.bea.p13n.util.debug.Debug;
class MyClass
// Instance of debug object for debugging (if turned on)
// Using this pattern makes it easy to know the debug "switch"
// for any class
private static final Debug debug = Debug.getInstance( MyClass.class );

// debug class creation event
void myMethod()
// output a debugging message along with class, method & line number
debug.out("This is some message");

// output a debugging message followed by object value
// use this rather than ("message" + val) to avoid
// expression evaluation (string concatenation) when debug is off
debug.out("The value is:", val);

// Avoid expression evaluations by using debug.ON or debug.isOn()
if (debug.ON)
Object thing = doSomeCalculations();
debug.out( "The thing " + thing + " is the calculation result." );

The output includes class, method, line number, and variable information. When debugging is turned on, the debug output for the above example looks something like this.

*** com.bea.example.MyClass.(MyClass.java:<13>) ***
[com.bea.example.MyClass.myMmethod():18] This is some message
[com.bea.example.MyClass.myMmethod():23] The value is 42
[com.bea.example.MyClass.myMmethod():29] The thing kryten is the calculation result.

By default, output is sent to System.err. For information on directing the output to a file, see Directing Output to a File on page 11-5.

Turning Debug Output On and Off

Debug messages are turned off by default. To switch debugging on, create a file named debug.properties in the directory where your domain’s startup scripts reside. For an example debug.properties file, see Example debug.properties File on page 11-6.

Alternately, you can set the Java system property debug.properties to the name of your debug properties file. For example:

java -Ddebug.properties=/home/me/mydebug.properties ...
com.bea.example.MyClass: on
Tip: Technically, you can set the debug property to any value except false, off, no or 0 (these are values that can be used to turn logging off). For clarity and consistency, Oracle suggests that you use the values on and off in the debug.properties file.

Package-Level Debugging

To turn on debugging for all of the classes in a package, set the debug property usePackageNames to on. Then, you can turn on debugging for an entire package (and its child packages). For example, to turn on debugging for all classes in the com.bea.example.* package, add the following to debug.properties:

# turn on debugging by package names
usePackageNames: on

# turn on debugging for everything under com.bea.example package
# Note that you do not use wildcards, just mention the package
com.bea.example: on

Using package names enables you to have finer control because more specific names take precedence over less specific names. For example, if you want to turn on debugging for the entire com.bea.example.* package except for MyClass and the com.bea.example.internal package (with the exception of one class), add the following to debug.properties:

# turn on package names for debugging
usePackageNames: on

# turn on debugging for everyting under com.bea.example package
com.bea.example: on

# turn off debugging for MyClass
com.bea.example.MyClass: off

# turn off debugging in the entire internal package
com.bea.example.internal: off

# Except turn debugging back on for internal.DebugThisClass
com.bea.example.internal.DebugThisClass: on

For an example debug.properties file, see Example debug.properties File on page 11-6

Directing Output to a File

By default, Debug output is sent to System.err. To redirect debug output to a file, set the debug property out.file to the name of an output file. The debug output will be appended to the end of that file unless you also set out.file.append=off, in which case the file is deleted first. For example:

# append output to mydebug.log file rather than System.err
out.file = mydebug.log

# send this debugging to mydebug.log
com.bea.example.DebugMeToFile: on

If you want to direct output by using system properties instead of the debug.properties file, you can do so by adding a debug prefix to the property name. For example:

 java -Ddebug.out.file=mydebug.log -Ddebug.com.bea.example.MyClass=on  ... 

Reloading Debug Properties

For performance reasons, Debug is by default not reloadable. The debug properties settings are in effect for the life of the JVM. To change the debugging configuration (for example, to change which classes or packages are turned on or off), you normally have to restart the JVM with different debug properties.

You can change the default reloading behavior with the debug property reloadable set to on in debug.properties or with -Ddebug.reloadable=on on the Java command line. If reloadable is set when the JVM is initially started, then debugging properties that are loaded from debug.properties (or system properties) can be changed at runtime without restarting the JVM. The reloadable property itself can not be changed at runtime; it must be set at JVM startup to take effect.

To change debug properties at runtime, edit the debug.properties file and call Debug.reload() from a JSP page or other runtime component.

Note that reloadable debug can be convenient for development, but even when it is not outputting any messages it does come at some cost, and thus should not be used in production or other performance-sensitive systems, such as load or performance tests.

Example debug.properties File

You enable output of WLP class debug information by either creating a debug.properties file or by using a system variable, as described in Configuring and Enabling Debug on page 11-1.

Following is an example of a debug.properties file, including enabled Level 1 and Level 2 debugging for WLP Virtual Content Repository classes.

# Example properties file for WebLogicPortal debug output

# Place this file in the directory where you start the server
# (the domain directory) or set -Ddebug.properties=debugFileName.
# The presence of this file turns debug on overall, and the
# properties in here control what debug is output.

# Most properties are booleans, and convention is to use "on" or "off" for the values

# Debug can be reloadable - use debug.jsp to change things at runtime
# The default is off.
reloadable: off

# append output to mydebug.log file rather than System.err
#out.file = D:/debugOutput
#out.file.append= off

# Turn on debug for entire packages (recursively) rather than only naming
# desired classes. This is normally desired as it allows for debugging
# whole sets of things, without having to name individual classes
# The default is off.
usePackageNames: off

# Example debug configurations

# Debugging for an individual class
#com.bea.netuix.servlets.manager.PortalServlet: on

com.bea.content.federated.internal.CapabilityManagerImpl: on
com.bea.content.federated.internal.NodeManagerImpl: on
com.bea.content.federated.internal.SearchManagerImpl: on
com.bea.content.federated.internal.TypeManagerImpl: on
com.bea.content.federated.internal.VersionManagerImpl: on
com.bea.content.federated.internal.VirtualRepositoryManagerImpl: on
com.bea.content.federated.internal.WorkflowManagerImpl: on
com.bea.content.federated.internal.delegate.NodeLogic: on
com.bea.content.federated.internal.delegate.ObjectClassLogic: on
com.bea.content.federated.internal.delegate.RepositoryLogic: on
com.bea.content.federated.internal.delegate.SearchLogic: on
com.bea.content.federated.internal.delegate.VersionLogic: on
com.bea.content.federated.internal.delegate.WorkflowLogic: on

spi.com.bea.content.federated.internal.filter.logging.NOPSLoggingFilter: on
spi.com.bea.content.federated.internal.filter.logging.OCOPSLoggingFilter: on
spi.com.bea.content.federated.internal.filter.logging.RCOPSLoggingFilter: on
spi.com.bea.content.federated.internal.filter.logging.SOPSLoggingFilter: on
spi.com.bea.content.federated.internal.filter.logging.WOPSLoggingFilter: on

# Debug an entire package
#com.bea.qa.apps.controls: on

# This setup turns on debug for the entire com.bea.netuix.servlets package,
# but excludes com.bea.netuix.servlets.l10n (and its subpackages).
#com.bea.netuix.servlets: on
#com.bea.netuix.servlets.l10n: off


Public WLP Class Debug Reference

Many of the public WLP classes use Debug methods to produce information that might be helpful when debugging an application. You enable WLP class debug information by editing a debug.properties file (or by using a System variable), as described in Configuring and Enabling Debug on page 11-1.

This section lists the public WLP classes that use Debug methods to output informational messages. The classes are grouped by feature/functional area.

This section contains the following sections:

WLP Framework Classes with Debug Support

The following table lists the WLP Framework classes that support debugging and their associated features.

Note: The WLP classes listed in the table below include only debug Level 1 output.

Table 11-1  WLP Framework Classes That Support Debug
WSRP - Transport
WSRP - URL Rewriting
  • com.bea.wsrp.producer.adapter
  • com.bea.wsrp.producer.adapter.context
Portlet Containers - Beehive
  • com.bea.portlet.adapter.scopedcontent
  • com.bea.netuix.servlets.controls.content.PageFlowContent
Portlet Containers - Struts
  • com.bea.struts.adapter
  • com.bea.netuix.servlets.controls.content.StrutsContent
Portlet Containers - JSF
  • com.bea.portlet.adapter.faces
  • com.bea.netuix.servlets.controls.content.FacesContent
Portlet Containers - JSP
Portlet Containers - Clipper
  • com.bea.netuix.servlets.controls.content.JspContent
  • com.bea.netuix.clipper.ClipperBacking
  • com.bea.netuix.clipper.Clipper
Portlet Containers - Browser
Note: There is no debug for the Portlet Containers - Browser feature. However, the control is rendered using a DirectFeature with the name ASYNC_CONTENT_FEATURE = "portleturicontent". You can add debug statements to framework/features/portleturicontent.jspx to troubleshoot this feature.
Portlet Containers - Java (168/286)
Framework - Caching
  • com.bea.netuix.nf.ControlTreeWalker
  • com.bea.netuix.nf.container.jsp.BufferedJspContext
Framework - Threading
  • com.bea.netuix.nf.ControlTreeWalker
  • com.bea.netuix.nf.container.jsp.BufferedJspContext
  • com.bea.netuix.nf.concurrency
Framework - LAF
  • com.bea.netuix.servlets.controls.application.laf
  • com.bea.netuix.servlets.controls.application.laf.ConfigurationTools
  • com.bea.netuix.servlets.controls.application.laf.StructureTools
  • com.bea.netuix.servlets.controls.application.laf.DependenciesConfiguration
  • com.bea.netuix.servlets.controls.application.laf.SkeletonConfiguration
Framework - Customization
Note: Supporting database query properties files are under netuix/copysrc com.bea.netuix.application.manager.persistence.jdbc.sql.
Framework - Async
  • ajax – Enable the ajax debug using the following code: ajax: on. The ajax debug is used by:
    • om.bea.netuix.nf.UIContext
    • com.bea.netuix.nf.container.jsp.BufferedJspContext
    • com.bea.netuix.nf.container.jsp.ServletOutputStreamImpl
    • com.bea.netuix.servlets.controls.window.Window
  • com.bea.netuix.servlets.controls.ajax.AjaxHelper
  • ajaxRequest – Enable the ajaxRequest debug using the following code: ajaxRequest: on. The ajaxRequest debug is used by com.bea.netuix.servlets.manager.UIServlet
Note: Because debug output is highly verbose, you should use the ajax and ajaxRequest debug switches judiciously, enabling these switches only when told to do so by the users who will be interpreting the debug output. To gain a better understanding of the debug output, we recommend that you view the debug output along with the source code for the debug statements.
Framework - Control Tree, Lifecycle
  • com.bea.netuix.servlets.manager.UIServlet.dumpControlTree
  • com.bea.netuix.servlets.manager.UIServletInternal
Note: The com.bea.netuix.servlets.manager.UIServlet.dumpControlTree switch is used in com.bea.netuix.servlets.manager.UIServletInternal, which does not have its own debug. Because debug output is highly verbose, you should use this switch judiciously, enabling this switch only when told to do so by the users who will be interpreting the debug output. To gain a better understanding of the debug output, we recommend that you view the debug output along with the source code of the debug statements.
  • com.bea.netuix.servlets.manager.PortalServlet
  • com.bea.netuix.servlets.manager.SingleFileServlet
  • com.bea.netuix.servlets.manager.UIServlet
  • com.bea.netuix.nf.Lifecycle
  • com.bea.netuix.nf.ControlTreeWalker
  • com.bea.netuix.nf.ControlLifecycle
  • com.bea.netuix.state (and the classes in this package)
  • com.bea.netuix.nf.state.StateManagementFactory
  • com.bea.netuix.nf.ControlLifecycle
The class com.bea.netuix.nf.ControlLifecycle uses the following debug switches to dump the control tree during a given render phase:
    • ControlLifecycle.init
    • ControlLifecycle.loadState
    • ControlLifecycle.saveState
    • ControlLifecycle.preRender
    • ControlLifecycle.render
    • CControlLifecycle.resource
    • ControlLifecycle.dispose
Framework - File Poller
  • com.bea.netuix.servlets.util.IFilesystemChangeDetector
  • com.bea.netuix.servlets.services.P13nFilesystemChangeDetector
  • com.bea.netuix.servlets.services.SimpleFilesystemChangeDetector
Framework - Timing
Framework - Events
  • com.bea.netuix.events.internal
  • com.bea.netuix.events.manager.EventManager
  • com.bea.netuix.events.manager.PortletBasedSubscription
Framework - Preferences
  • com.bea.portlet.prefs
  • com.bea.portlet.prefs.spi

The following table lists WLP Framework features and the command line environmental JVM switches that you can use to debug them. Note that the WSRP security debugging feature uses a Oracle WebLogic Server pattern of accessing debug information with system properties.

Table 11-2  WLP Framework Command Line Environmental Switches That Support Debug
Command Line Switch
WSRP - Security
  • -Dweblogic.debug.DebugSecuritySAMLCredMap=true
  • -Dweblogic.debug.DebugSecuritySAMLAtn=true
  • -Dweblogic.debug.DebugSecuritySAMLLib=true
  • -Dweblogic.log.StdoutSeverity=Debug
  • -Dweblogic.xml.crypto.dsig.verbose=true
  • -Dweblogic.wsee.verbose=*
  • -Dweblogic.debug.DebugSecurityCredMap=true
  • -Dweblogic.xml.crypto.wss.verbose=true

WLP Core Services Classes with Debug Support

The following table lists the WLP Core Services classes that support debugging, along with their associated features and debug levels.

Note: For WLP Core Services classes, Level 2 output includes additional information that is not included in Level 1 output. To view all debugging information, you must enable both Level 1 and Level 2 debugging.

Table 11-3  WLP Core Services Classes That Support Debug
Level 1
Level 2
  • com.bea.p13n.cache.CacheFactory
  • com.bea.p13n.cache.CacheManager
  • com.bea.p13n.cache.CacheImpl
  • com.bea.p13n.cache.CacheImpl.AsynchronousReloadRequest
  • com.bea.p13n.entitlements.management.RolePolicyManager
For the com.bea.p13n.entitlements.management.RolePolicyManager class, you can use the PolicyPredLocation to enable more detailed debug output. For example: PolicyPredLocation.com.bea.p13n.entitlements.management.RolePolicyManager.
  • com.bea.p13n.entitlements.management.RolePolicyManager
  • com.bea.p13n.delegation.management.DelegationPolicyManager
  • com.bea.p13n.entitlements.management.SecurityPolicyManager
  • com.bea.p13n.delegation.management.DelegationRoleManager
  • com.bea.p13n.entitlements.Authorization
For the com.bea.p13n.entitlements.Authorization class, you can use the following prefixes to choose the type of debug output:
    • Unprotected
    • Protected
    • PolicyTaxonomy
    • AnonDebug
For example: Unprotected.com.bea.p13n.entitlements.Authorization
  • com.bea.p13n.delegation.DelegationService
  • com.bea.p13n.entitlements.management.internal.RDBMSRolePolicyManager
You can use the following prefixes to choose the type of debug output:
    • PolicyPredLocation
    • PolicyCreateLocation
  • com.bea.p13n.entitlements.management.internal.RDBMSSecurityPolicyManager
You can use the following prefixes to choose the type of debug output:
    • PolicyPredLocation
    • PolicyCreateLocation
Rules Expression
  • com.bea.p13n.expression.internal.EvaluatorImpl
  • com.bea.p13n.expression.internal.ExecutorImpl
Job Manager
  • com.bea.p13n.jobmanager.internal.JobManagerImpl
  • com.bea.p13n.jobmanager.internal.JobContextImpl
  • com.bea.p13n.management.quiescence.QuiescenceRunt imeServiceImpl
  • com.bea.p13n.management.quiescence.QuiescenceState Impl
  • com.bea.p13n.rules.internal.ActionImpl
  • com.bea.p13n.rules.internal.RuleImpl
Credential Vault
Tracked Anonymous
  • com.bea.p13n.usermgmt.profile.internal.AnonymousProfileWrapperImpl
  • com.bea.p13n.usermgmt.profile.internal.TrackedAnonymousBean
  • com.bea.p13n.property.internal.PropertySetManagerImpl
  • com.bea.p13n.property.internal.PropertySetPersistenceManager
  • com.bea.p13n.property.internal.PropertySetRepositoryRegistry
  • com.bea.p13n.property.internal.PropertySetRepositoryImpl
Entity Property Manager
Property Set Web Service
Rules Manager
Realm Configuration
User Profile Manager
Group Profile Manager
Mixed Profile Manager
Custom Profile Manager
Event Service
  • com.bea.p13n.events.internal.EventServiceBean
  • com.bea.p13n.events.internal.EventHandler
  • com.bea.p13n.events.Event
  • com.bea.p13n.events.internal.EventServiceListenerConfig
Internal Data Refresh Proxy
  • com.bea.p13n.management.data.repository.internal.ejbproxy.RefreshProxyImpl
  • com.bea.p13n.management.data.repository.internal.ejbproxy.EjbProxyDataRepository
  • com.bea.p13n.management.data.repository.internal.RefreshFromClientSynchronizer
  • com.bea.p13n.management.data.repository.internal.RefreshFromServerSynchronizer
  • com.bea.analytics.AnalyticsFilter
  • com.bea.analytics.AnalyticsListener

WLP Virtual Content Repository Classes with Debug Support

The following table lists the WLP Virtual Content Repository classes that support debugging and their associated features.

Note: For WLP Virtual Content Repository classes, Level 2 output includes all of the information included in Level 1, but at a more verbose level. Additionally, Level 2 includes information that is not included in Level 1 output.

Table 11-4  WLP Virtual Content Repository Classes That Support Debug
Feature or Component
Level 1
Level 2
Repository Capabilities
Node Activities
Search Activities
Type Management Activities
Versioning Activities
Repository Management Activities
Workflow Activities
Node activities
Type Management Activities
Repository Management Activities
Search activities
Versioning Activities
Workflow Activities
SPI Node Operations
SPI Type Operations
SPI Repository Management Operations
SPI Search Operations
SPI Workflow Operations

WLP UCM Classes with Debug Support

The following table lists the UCM related classes that support debugging and their associated features.

Table 11-5  WLP UCM Related Classes That Support Debug
Feature or Component
Level 3
Shows UCM calls, including timing information
Shows stack traces when calls are made to UCM (would typically be used in conjunction with the other one)
Debug timing

WLP Administration Console Classes with Debug Support

The following table lists the WLP Administration Console classes that support debugging, along with their associated features and debug levels.

Table 11-6  WLP Administration Console Classes That Support Debug
Level 1
Level 2
General Navigation, Menus, and Componentization
  • com.bea.jsptools.common.EditorBookBacking
  • com.bea.jsptools.common.ToolsFrameworkUtilities
  • com.bea.jsptools.common.ToolsMenuTag
  • com.bea.jsptools.patterns.list.PagedResultServiceTag
  • com.bea.jsptools.patterns.tree.TreeBuilder
  • com.bea.jsptools.patterns.xmlhttp.PagedResultSearchHandler
  • com.bea.jsptools.patterns.xmlhttp.SessionAttributeHandler
  • com.bea.jsptools.util.GenerateResourceLinkTag
  • com.bea.jsptools.util.ToolsResourceLink
  • com.bea.jsptools.common.PatDesktopBacking
  • com.bea.jsptools.content.helpers.SharedActions
  • com.bea.jsptools.laf.SkinImageService
  • com.bea.jsptools.patterns.item.ItemService
  • com.bea.jsptools.patterns.xmlhttp.TextBoxValidationHandler
  • com.bea.jsptools.util.PagedResultUtility
  • com.bea.portal.tools.patterns.ajax.servlet.XMLHttpRequestServlet
  • com.bea.portal.tools.resource.ResourceIDBuilderCache
  • global.internal.PageFlowHelper
  • util.tree.TreeController
  • com.bea.jsptools.patterns.help.HelpLinkTag
  • com.bea.jsptools.patterns.help.HelpService
  • com.bea.jsptools.patterns.help.HelpTag
Portal Management
  • com.bea.jsptools.common.PagePositionHelper
  • com.bea.jsptools.portal.helpers.DotPortal
  • com.bea.visitortools.MenuContext
  • portalTools.definitions.portletProducers.wizard.AddProducerWizardController
  • portalTools.instances.communities.wizzy.AddCommunityWizardController
  • portalTools.instances.desktops.wizzy.AddDesktopWizardController
  • portalTools.instances.portlets.preferences.PreferencesController
  • portalTools.instances.templates.desktops.browse.BrowseTemplatesDesktopController
Content Management
Role Editor
Delegated Administration
  • com.bea.jsptools.deladmin.IsAccessAllowedTag
  • com.bea.jsptools.deladmin.SharedDaActions
  • com.bea.portal.tools.portal.util.SecurityPolicyCleanupHelper
  • daTools.common.DAController
  • daTools.details.DaRoleDetailsController
  • daTools.popupsAndButtons.DaPopupButtonController
  • com.bea.jsptools.vent.EnttitlementService
  • com.bea.jsptools.vent.helpers.VentSharedActions
  • com.bea.portal.tools.entitlements.controls.DelegatedRolePolicyManagerControlFacadeImpl
User/Group Management
  • com.bea.jsptools.usermgmt.AtnProviderListTag
  • com.bea.jsptools.usermgmt.GroupDescriptionTag
  • com.bea.jsptools.usermgmt.UserDescriptionTag
  • com.bea.jsptools.usermgmt.helpers.GroupHelper
  • com.bea.jsptools.usermgmt.helpers.SharedActions
  • com.bea.jsptools.usermgmt.UGMTreeBacking
  • com.bea.jsptools.usermgmt.validation.NRNWGroupNameValidator
  • com.bea.jsptools.usermgmt.validation.NRNWUserNameValidator
  • ugmTools.nrnwTree.NrnwTreeController
Service Administration
  • serverTools.serviceAdmin.ads.AdServiceBaseFlowController
  • serverTools.serviceAdmin.maintenanceMode.MaintenanceModeDetailsFlow.MaintenanceModeDetailsFlowController
Visitor Tools
  • com.bea.visitortools.helpers.CreateCommunityHelper
  • com.bea.visitortools.invitation.AbstractInviterInvoker
  • com.bea.visitortools.VisitorStateBean
  • com.bea.visitortools.backing.VisitorDesktopBacking
  • com.bea.visitortools.forms.CreateVisitorCommunityForm
  • com.bea.visitortools.helpers.BaseHelper
  • com.bea.visitortools.helpers.ColorsHelper
  • om.bea.visitortools.helpers.ManageCommunityHelper
  • com.bea.visitortools.tags.GeneratePlaceableViewDataTag
  • com.bea.visitortools.tags.IsAccessAllowedTag
  • visitorTools.communities.manage.ManageController
  • visitorTools.communities.manage.members.MembersController
  • visitorTools.communities.manage.properties.PropertiesController
  • visitorTools.contents.ContentsController
  • visitorTools.pages.PagesController

  Back to Top       Previous  Next