Search Results dbms_java




Overview

SYS.DBMS_JAVA is a core Oracle Database PL/SQL package that exposes the server-side Java runtime to SQL and PL/SQL callers. In the Oracle E-Business Suite 12.1.1 and 12.2.2 environments, it is an Oracle-supplied SYS-owned object, classified in the ETRM repository under the API classification OTHER. It is not an EBS business API in the conventional sense — it does not post transactions, validate accounting, or drive concurrent processing — but it is nonetheless a critical infrastructure dependency, because several EBS components rely on the embedded Oracle JVM (OJVM) for class loading, Java stored procedure execution, and just-in-time compilation of Java methods.

The package acts as the administrative and operational control surface for the database's Java virtual machine. It allows administrators and application code to compile and uncompile Java classes and methods, manage native (platform-dependent) compiler behavior, control the Bytecode Translation Layer (BTL) used for native compilation, and inspect Java class naming and resolver metadata. In EBS deployments, this package is frequently invoked indirectly when Java stored procedures are deployed into the APPS or product schemas, and when the JVM must be primed or reset after patching, cloning, or upgrade operations.

Key Procedures and Functions

The documented interface contains 103 procedures and functions. The most operationally significant include:

  • START_BTL, STOP_BTL, TERMINATE_BTL, INIT_BTL — Control the lifecycle of the Bytecode Translation Layer, which converts Java bytecode into native machine code for improved execution performance.
  • COMPILE_CLASS, COMPILE_METHOD — Compile all methods of a named Java class, or a single method identified by class name, method name, and Java type signature, in the current schema. They return the number of methods successfully compiled. If the class does not exist, an ORA-29532 uncaught Java exception is raised.
  • UNCOMPILE_CLASS, UNCOMPILE_METHOD — Reverse compilation. The permanentp flag determines whether the methods are marked permanently dynamically uncompilable or remain eligible for future dynamic recompilation. These functions return the count of methods successfully uncompiled.
  • DUMP_NATIVE_MACHINE_CODE — Emits native machine code generated for a Java class, used for diagnostics and performance analysis.
  • NATIVE_COMPILER_OPTIONS, SET_NATIVE_COMPILER_OPTION, DECODE_NATIVE_COMPILER_OPTION, UNSET_NATIVE_COMPILER_OPTION — Manage the configuration of the native compiler, including enumeration and decoding of option records.
  • GET_COMPILER_OPTION, SET_COMPILER_OPTION, RESET_COMPILER_OPTION — Read, set, and reset the active Java compiler option set.
  • LONGNAME, SHORTNAME — Translate between fully qualified and abbreviated Java class names.
  • RESOLVER, DERIVEDFROM — Expose Java resolver metadata and inheritance relationships between classes.

Tables Accessed

The ETRM metadata records no referenced tables for this package via APPS synonyms. This is expected: DBMS_JAVA operates principally against the Oracle JVM's internal catalog and the Java class dictionary (for example, the SYS-owned Java$ tables) rather than against EBS application tables. Because these internal objects are owned by SYS and are not exposed as APPS synonyms, the package has no documented application-level table dependencies within the EBS data model.

Usage Notes

DBMS_JAVA is predominantly invoked as an administrative utility rather than from EBS forms. Typical invocations include:

  • Deploying or recompiling Java stored procedures as part of custom development or Oracle patch application.
  • Priming the Bytecode Translation Layer after database startup, cloning, or an EBS upgrade, so that Java-based functionality performs optimally.
  • Diagnosing JVM performance problems using native code dumps and compiler option inspection.
  • Managing native compilation settings through the compiler option procedures.

The package is referenced by nine other PL/SQL packages in the ETRM repository, confirming that it functions as a shared low-level dependency rather than a standalone utility. Because it is SYS-owned and authenticated as CURRENT_USER, direct execution from APPS requires the appropriate privileges. In 12.1.1 and 12.2.2 environments, DBA intervention with DBMS_JAVA is generally reserved for JVM configuration and troubleshooting; routine EBS transactional processing does not invoke it directly. Custom developers deploying Java stored procedures should review JVM privileges and compiler options before execution, since ORA-29532 errors arising from missing classes are a common failure mode.