Search Results print_stack
Overview
JAI_CMN_DEBUG_CONTEXTS_PKG is a diagnostic and logging utility package within the Oracle E-Business Suite logistics (JAI) module set. In Oracle EBS 12.1.1 and 12.2.2 it provides a controlled mechanism for registering named debug contexts during PL/SQL execution, accumulating call-stack information, and emitting trace output to log files. The package is registered as an API of classification OTHER in the ETRM repository, indicating that it is an internal infrastructure component rather than a public business API.
The package body exposes its state through package-level globals, including a call-stack table (t_call_stack), an internal stack-top counter (ln_stack_top), a context cache (t_context_cache) with an associated cache index, and configuration settings such as the stack maximum (ln_stack_max_cnt, defaulted to 200000), the file open mode, the default log-file prefix and suffix, the context-cache size, and switches governing exception propagation, internal debugging, and per-context printing. The implementation makes extensive use of UTL_FILE to persist trace output, and a documented change history records adjustments made for bugs 5631784, 5915101 and 6401388, including the decision to default internal debugging to "no".
Key Procedures and Functions
- REGISTER — Records a new debug context onto the active call stack and, when the per-context print flag is enabled, writes the context detail to the log. It is the entry point used by instrumented code to announce that a meaningful unit of work has begun.
- PRINT — Emits the current debug context information to the configured log destination, allowing the traced state to be captured at a chosen point in execution.
- PRINT_STACK — Outputs the accumulated contents of the call stack, providing a formatted trace of the nested contexts that were registered. This is the procedure associated with the user search term "print_stack".
- DEREGISTER — Removes the most recently registered context from the stack, pairing with REGISTER so that context depth remains accurate as execution unwinds.
- DEBUG — Controls and applies the package's internal debugging behaviour, governed by the internal debug switch that was modified for bug 6401388.
Tables Accessed
The package operates against the JAI_CMN_DEBUG_CONTEXTS table through its APPS synonym, which serves as the repository of debug context definitions and is referenced by the package's row-type declaration. FND_USER is used to resolve user identity into the ln_user_id variable that annotates log output. DUAL is referenced for trivial single-row evaluations. PLITBLM and V$PARAMETER are accessed in support of PL/SQL and database-level session information. UTL_FILE is the file-handling package used to open, write and manage the debug log files, and is a principal dependency of the logging mechanism.
Usage Notes
This package is not intended for direct end-user invocation. It is referenced by seven other packages within the JAI module set, all of which instrument their code with REGISTER, PRINT, PRINT_STACK and DEREGISTER calls to produce diagnostic traces. Typical use arises during troubleshooting of logistics processes, where a developer or support analyst enables logging and then reviews the generated debug files, the names of which follow the configured prefix and suffix conventions. Because the package writes through UTL_FILE, the database directory and file permissions must be correctly configured before trace output can be captured. Its configuration switches also allow exception propagation and context printing behaviour to be tuned per environment, making it suitable for temporary diagnostic deployment rather than permanent production tracing.
-
PACKAGE BODY: APPS.JAI_CMN_DEBUG_CONTEXTS_PKG
12.2.2
-
PACKAGE BODY: APPS.JAI_CMN_DEBUG_CONTEXTS_PKG
12.1.1
-
PACKAGE: APPS.JAI_CMN_DEBUG_CONTEXTS_PKG
12.2.2
-
PACKAGE: APPS.JAI_CMN_DEBUG_CONTEXTS_PKG
12.1.1
-
PACKAGE BODY: APPS.ECX_INBOUND_NEW
12.1.1
-
PACKAGE BODY: APPS.ECX_INBOUND_NEW
12.2.2
-
PACKAGE: APPS.ASN_DEBUG
12.1.1
-
PACKAGE: APPS.ASN_DEBUG
12.2.2
-
PACKAGE BODY: APPS.ECX_INBOUND
12.1.1
-
PACKAGE BODY: APPS.ECX_INBOUND
12.2.2
-
PACKAGE BODY: APPS.ECX_OUTBOUND
12.2.2
-
PACKAGE BODY: APPS.ECX_OUTBOUND
12.1.1
-
PACKAGE BODY: APPS.ASN_DEBUG
12.1.1
-
PACKAGE BODY: APPS.ASN_DEBUG
12.2.2
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS_PKG
12.1.1
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS_PKG
12.2.2
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CONSTANTS
12.2.2
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CONSTANTS
12.1.1
-
APPS.ASN_DEBUG dependencies on DBMS_UTILITY
12.2.2
-
APPS.ASN_DEBUG dependencies on DBMS_UTILITY
12.1.1
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS
12.2.2
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS
12.1.1
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS
12.1.1
-
APPS.JAI_CMN_DEBUG_CONTEXTS_PKG dependencies on JAI_CMN_DEBUG_CONTEXTS
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_DEBUG
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_DEBUG
12.1.1
-
APPS.ECX_INBOUND dependencies on ECX_DEBUG
12.1.1
-
APPS.ECX_INBOUND dependencies on ECX_DEBUG
12.2.2
-
APPS.ECX_OUTBOUND dependencies on ECX_DEBUG
12.1.1
-
APPS.ECX_OUTBOUND dependencies on ECX_DEBUG
12.2.2
-
APPS.ECX_OUTBOUND dependencies on ECX_OUTBOUND
12.1.1
-
APPS.ECX_OUTBOUND dependencies on ECX_OUTBOUND
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_UTILS
12.1.1
-
APPS.ECX_INBOUND_NEW dependencies on ECX_INBOUND_NEW
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_UTILS
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_INBOUND_NEW
12.1.1
-
APPS.ECX_INBOUND_NEW dependencies on ECX_INBOUND
12.2.2
-
APPS.ECX_INBOUND dependencies on ECX_INBOUND
12.1.1
-
APPS.ECX_INBOUND dependencies on ECX_INBOUND
12.2.2
-
APPS.ECX_INBOUND_NEW dependencies on ECX_INBOUND
12.1.1
-
APPS.ECX_INBOUND dependencies on ECX_UTILS
12.2.2
-
APPS.ECX_INBOUND dependencies on ECX_UTILS
12.1.1
-
APPS.ECX_OUTBOUND dependencies on ECX_UTILS
12.2.2
-
APPS.ECX_OUTBOUND dependencies on ECX_UTILS
12.1.1