Search Results push_internal




Overview

The CTXSYS.DRUE package is the Oracle Text (formerly interMedia Text) error-handling utility package shipped with the CTXSYS schema. In Oracle E-Business Suite releases 12.1.1 and 12.2.2, DRUE serves as the centralized stack-based error mechanism for the Oracle Text server and its trusted callout routines. The package name reflects its role: the "DR" prefix identifies Oracle Text's Document Retrieval subsystem, and "UE" denotes user error handling.

DRUE manages a per-session stack of error messages that Oracle Text components push as they execute. Errors are retrieved by message ID from the Oracle Text message repository using trusted callouts, formatted with substitution arguments, and placed onto the stack so that callers can inspect or propagate them. The package declares authid current_user, meaning it executes with the privileges of the invoking user rather than the definer, which is significant because EBS application schemas (APPS, and product schemas such as INV, PO, and GL) invoke Oracle Text services through synonyms and grants rather than as CTXSYS itself.

DRUE is a low-level infrastructure package. It is not a business API in the same sense as a workflow or order-management package; application code does not call it to perform a business transaction. Instead, it exists to produce consistent, localized error messages when text indexing, searching, or DDL operations fail, and it is referenced by 70 other packages in the environment, reflecting its foundational role across the Oracle Text codebase.

Key Procedures and Functions

  • PUSH — Pushes a message identified by a numeric message ID onto the error stack, accepting up to five substitution arguments. Substitution variables must follow the '%(number)s' format.
  • GET_ERROR_MESG — Returns the formatted text of an error message for a given message ID and optional arguments, without placing it on the stack.
  • PUSH_INTERNAL — Pushes an internal Oracle Text error onto the stack, formatting up to five arguments into a DRG-123 style internal error string.
  • GET_STACK — Retrieves the current contents of the error stack.
  • GET_STACK1 — A variant of GET_STACK, typically retrieving a single stack level or entry.
  • GET_STACK_NOCLEAR — Retrieves the stack without clearing it, allowing repeated inspection by multiple callers.
  • RAISE — Raises a PL/SQL exception based on the current error stack contents.
  • ERROR — Reports or signals an error condition through the package's standardized mechanism.
  • TEXT_ON_STACK — Tests whether any textual error content currently resides on the stack, useful for conditional handling.
  • GETMSG — Returns the message text associated with a given message identifier.
  • CLEAR_STACK — Empties the session error stack, discarding all pending messages.
  • POP — Removes and returns the top entry from the error stack, complementing PUSH.

Tables Accessed

The ETRM metadata for this object does not document any base tables or APPS synonyms read or written directly by DRUE. The package interacts with Oracle Text's internal message catalog and the session error stack, which are managed by the Oracle Text server rather than exposed as relational tables to application schemas. Message lookup is performed through the trusted callout drexrmessage, which resolves a message ID and language ID against the server-side message repository.

Usage Notes

In EBS 12.1.1 and 12.2.2, DRUE is invoked indirectly whenever Oracle Text operations encounter errors. Text index creation, synchronization, and optimization jobs — including concurrent programs such as "Synchronize Text Index" and "Optimize Text Index" — rely on this stack mechanism to accumulate diagnostic messages before returning them to the concurrent manager log. Forms and OAF pages that trigger contextual search or text query functionality may surface DRUE-derived messages when indexing fails.

Custom code should not generally call DRUE directly unless it is itself extending Oracle Text functionality. When diagnosing text-search failures, developers can query the stack behavior in a session after a failed operation, using GET_STACK_NOCLEAR to inspect messages before CLEAR_STACK resets the session state. Because the package runs with invoker's rights, execute privileges on CTXSYS.DRUE must be granted appropriately for any schema that must read the Oracle Text error stack.