Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Possible APEX Supporting Objects Import Bug with Large Package Bodies

kwangApr 6 2026 — edited Apr 13 2026

Dear APEX Team,

I would like to report what appears to be a bug in APEX Supporting Objects installation during application import.

We are importing an APEX application that includes PL/SQL packages as Supporting Objects. The package source code itself is valid and compiles successfully when executed directly in SQL Workshop, SQLcl, or the database. However, when the same package bodies are installed automatically through APEX Supporting Objects during application import, the package bodies become `INVALID`.

**Environment**
- Oracle APEX: `24.2.11`
- ORDS: `25.4.2.r0502119`
- Database: `Oracle AI Database 26ai Enterprise Edition 23.0.0.0.0`

**Expected Result**
Supporting Objects should install the PL/SQL packages exactly as exported, and both package specifications and package bodies should compile successfully.

**Actual Result**
- Package specifications compile successfully.
- Package bodies become `INVALID`.
- Errors include:

  • `PLS-00103: Encountered the symbol "end-of-file"...`
  • `PLS-00103: Encountered the symbol ";"...`

**Why this appears to be an APEX Supporting Objects issue**
- The exact same package source compiles successfully when executed directly in SQL Workshop / SQLcl / the database.
- After Supporting Objects installation, the installed package body source in the database appeared truncated or malformed.
- The failure was reproducible when the embedded Supporting Objects install script became relatively large.
- We also found that source files ending with the SQL client terminator `/` behave differently when executed through Supporting Objects versus direct SQL execution.

**What we found during investigation**
- When large package bodies were embedded directly into the Supporting Objects install script, the installed source could become corrupted during installation.
- The corruption point appeared near a similar script size threshold in our testing.
- Trailing SQL client delimiters such as `/` were accepted in direct SQL execution, but caused problems in the dynamic execution path.
- This suggests Supporting Objects may be mishandling either large script CLOB content, SQL client terminators, or both.

**Workaround**
We successfully worked around the issue by:
1. Storing the package source as Application Static Files
2. Using a small Supporting Objects loader script
3. Reading the source from `APEX_APPLICATION_STATIC_FILES`
4. Removing the trailing `/` delimiter before dynamic compilation
5. Compiling the source via `DBMS_SQL.parse`

With this workaround, both package bodies compiled successfully and `USER_ERRORS` returned zero rows.

**Request**
Could you please investigate whether APEX Supporting Objects installation may:
- truncate or corrupt large install script CLOB content, and/or
- incorrectly process SQL client delimiters such as `/` when executing stored install scripts?

**Attachments**
I have prepared the following supporting files:
- `minimal_repro.sql`
- `f100_supporting_objects_failure_notes.md`
- `f100_install_package_excerpt.sql`
- `f100_workaround_loader.sql`

These include:
- a minimal reproducible script
- environment and failure notes
- the original failing pattern
- the working workaround loader

If helpful, I can also provide a sample application export.

Best regards,
Kenny Wang

Comments
Post Details
Added on Apr 6 2026
3 comments
130 views