Tuesday, 28 April 2026

AOP Installation &Configuration

Content of the zip file: aop_linux_v22.2.zip

Under the Apex version folder  like apex_version_5.x, apex_version_18.x_19.x_20.x_21.x_22.x

- /db: sql files to install the back-end database objects for the Oracle APEX plug-ins (run install.sql)

- /plugin: the APEX plug-ins for APEX Office Print (AOP)

- /app: the five sample applications

v22.2

- /server: the server side component (** for on-premises packages only **)

Pre-requisites:

- Oracle Database 12.2 or above

- Oracle Application Express (APEX) 19.2 or above

(** for on-premises packages only **)

- Windows or Linux (Red Hat / Oracle 8 and higher and Ubuntu 18.04 and higher)

- Java 8 or higher installed 

Quick start: using AOP in your application:

- Go to SQL Workshop > SQL Scripts and upload (and run) the files aop_db_pkg.sql and aop_modal_pkg.sql from the /db directory

  This will create the database objects used by the Oracle APEX plug-ins

- Go to App Builder > Your application > Shared Components > Plug-ins > Import

 Select the file process_type_plugin_be_apexrnd_aop.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the AOP Process type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_da.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the AOP Dynamic Action type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_convert_da.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the Convert Dynamic Action type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_modal.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the Modal Dynamic Action type plug-in)

- On your Page, create a dynamic action; on click of a button for example and select the True Action: APEX Office Print (AOP) [Plug-in]

$ mkdir -p /apps/AOPServer/aop22.2

Install/Upgrade the AOP Server (** only for on-premises version **):

- Copy the server folder to your server(Use WinSCP/Putty etc.)

- Stop the previous version of AOP (in case of upgrade)

  Note: you can run the old and new AOP simultaneously but on different ports

- Start the AOP executable

=====================If Rquired Upgrade plug-ins========================

Upgrading the plug-in:

- Go to SQL Workshop > SQL Scripts and upload (and run) the files aop_db_pkg.sql and aop_modal_pkg.sql from the /db directory

  This will create the database objects used by the APEX plug-ins

- Go to App Builder > Your application > Shared Components > Plug-ins > Import

 Select the file process_type_plugin_be_apexrnd_aop.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the AOP Process type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_da.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version>directory (for the AOP Dynamic Action type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_convert_da.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the Convert Dynamic Action type plug-in)

 Select the file dynamic_action_plugin_be_apexrnd_aop_modal.sql from the /apex_version_<your_version>/plugin or aop_linux_v<your_version>\v<your_version> directory (for the Modal Dynamic Action type plug-in)

[applmgr@proderpappl ~]$ cd /apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096

[applmgr@proderpappl APEXOfficePrintLinux64_4096]$ ll

total 304768

-rwxrwxrwx 1 applmgr dba 312077953 Dec 30  2022 APEXOfficePrintLinux64

drwxr-xr-x 8 applmgr dba      4096 Feb 19 15:07 assets

[applmgr@proderpappl APEXOfficePrintLinux64_4096]$ ./APEXOfficePrintLinux64 --version

APEX Office Print version 22.2

Using node version v14.21.1

Memory Limit 4096

[applmgr@proderpappl APEXOfficePrintLinux64_4096]$ ./APEXOfficePrintLinux64 --For Trial Running

Setting number of pdf retries to 3

Setting 120 seconds for idle request processing

Setting max size for request 200mb

No configuration found. Creating...

Could not find the license file. Expecting it to be in /apps/aop20.2/server/aop.license.

If your license file is somewhere else please give in the location with --license argument.

Trial has been enabled. Activate the software with '--activate' or '-a' option

[ConverterHandler]: Configuration file found. Adding custom converters.

[ConverterHandler]: Converter added: abiword

[ConverterHandler]: Number of parallel conversions for openofficeconverter 16

[ConverterHandler]: Number of parallel conversions for officetopdfconverter 1

[ConverterHandler]: Number of parallel conversions for abiword 1

Local resources (using local templates, images, ...) are disabled. Use --enable_local_resources to enable

Starting HTTP on port 8010

AOP 1 (HTTP) running

[applmgr@proderpappl APEXOfficePrintLinux64_4096]$ ./APEXOfficePrintLinux64 -a -------With License Running

prompt: email:  Your_email_address

We are now contacting the server....

Sending license request for email: Your_email_address and mid: 461F549AE4690981CFFB3AA6D348143826E5FF2130F50747E62978572FFDEEA0

License successfully activated.

Starting HTTP on port 8010

email:Your_email_address

MID:461F549AE4690981CFFB3AA6D348143826E5FF2130F50747E62978572FFDEEA0

Generating license request file to upload on https://www.apexofficeprint.com/

Request file /apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096/aop_license.request generated, please use the file to generate the license file through the dashboard of https://www.apexofficeprint.com/.

--------------------------What This Means------------------------------

-a option = Activate AOP

The tool is sending a license activation request to the AOP license server.

mid = Machine ID (unique hardware fingerprint of your server)

It is waiting for license validation response

===================Offline Activation Steps===================

Use the generated request file

Already created: /apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096/aop_license.request

Go to: 👉 https://www.apexofficeprint.com/

Upload: aop_license.request

It will generate: aop_license.lic

Download it and Upload License File Back to Server

Place it in: /apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096/

Example: scp aop_license.lic applmgr@IP:/apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096/

Start AOP Server

[applmgr@proderpappl ~]$ cd /apps/AOPServer/aop22.2/server/APEXOfficePrintLinux64_4096

[applmgr@proderpappl APEXOfficePrintLinux64_4096]$ ./APEXOfficePrintLinux64

You should see: License activated

Server running on port 8010--Default Port

==========================================================================

Steps to Resolve the ACL Configuration:

Identify your APEX schema version: (e.g., APEX_240200).

Execute the following script as SYS or SYSTEM to grant the necessary privileges to your AOP server (replace 'print.apexofficeprint.com' with your actual AOP server/cloud URL)

BEGIN
dbms_network_acl_admin.Append_host_ace(host => 'proderpappl.nicsi.in', --AOP Cloud or Local URL
ace => Xs$ace_type(privilege_list => Xs$name_list('connect'),
principal_name => 'APEX_240200', -- Change to your APEX version
principal_type => xs_acl.ptype_db));
END;
/

Oracle Application Express (APEX) Post Upgrade - Remove Old Installations

This article demonstrates how to remove old installations after an Oracle Application Express (APEX) upgrade.

Oracle Application Express (APEX) Installation

Connections

There are three ways you can install APEX, and the database connection you use will vary depending on which you are dealing with. 

The rest of the article assumes you are making the appropriate connection for your installation type.

-- APEX installed in Non-CDB Architecture.

CONN / AS SYSDBA

-- APEX installed in a CDB root container.

CONN / AS SYSDBA

-- APEX installed in a PDB.

CONN / AS SYSDBA

ALTER SESSION SET CONTAINER = {pdb-name};

-- Or

CONN sys@{pdb-name} AS SYSDBA

Check For Old Installations

The following query lists all APEX installations that are not the currently running installation.

SELECT username

FROM   dba_users 

WHERE  (username LIKE 'FLOWS\_______' ESCAPE '\'

OR      username LIKE 'APEX\_______' ESCAPE '\')

AND    username NOT IN (SELECT schema

                        FROM dba_registry

                        WHERE comp_id = 'APEX');

USERNAME

------------------------------

APEX_200200

SQL>

Drop Old Installations (Non-CDB or PDB)

For every old release we need to drop the APEX_XXXXXX user and the SYS.WWV_DBMS_SQL_APEX_XXXXXX package. For non-CDB instances and installations in a PDB we can run these commands directly.

-- 12.2 onward.

ALTER SESSION SET "_oracle_script"=true;

DROP USER APEX_200200 CASCADE;

DROP PACKAGE SYS.WWV_DBMS_SQL_APEX_200200;

From 12.2 onward, if you don't issue the ALTER SESSION command, you may receive the following error.

ERROR at line 1:

ORA-28014: cannot drop administrative users

Drop Old Installations (CDB)

For every old release we need to drop the APEX_XXXXXX user and the SYS.WWV_DBMS_SQL_APEX_XXXXXX package in all containers. We do this with the "catcon.pl" script. 

Here is an example of dropping an old 19.2 (190200) installation from a CDB root container.

# Drop the user.

$ORACLE_HOME/perl/bin/perl -I \

                           $ORACLE_HOME/rdbms/admin \

                           $ORACLE_HOME/rdbms/admin/catcon.pl \

                           -b drop_apex200200 -- --x'drop user APEX_200200 cascade'

# Drop the package.

$ORACLE_HOME/perl/bin/perl -I \

             $ORACLE_HOME/rdbms/admin \

             $ORACLE_HOME/rdbms/admin/catcon.pl \

            -b drop_wwv_dbms_sql -- --x'drop package SYS.WWV_DBMS_SQL_APEX_200200 cascade'

Network ACLs

The documentation suggests cleaning up any old network ACLs.

BEGIN

  DBMS_NETWORK_ACL_ADMIN.delete_privilege('my_acl.xml', 'APEX_200200');

  COMMIT;

END;

/

Dropping the database user means the network ACL principal is no longer available, so there is no risk associated with them, and they don't show up in the ACL views anymore. 

You may want to amend any ACL scripts you have in version control.

------------------For below 12.2 DB------------

$SQLPLUS / AS SYSDBA

SQL>SELECT username

FROM   dba_users 

WHERE  (username LIKE 'FLOWS\_______' ESCAPE '\'

OR      username LIKE 'APEX\_______' ESCAPE '\')

AND    username NOT IN (SELECT schema

                        FROM dba_registry

                        WHERE comp_id = 'APEX');

USERNAME

------------------------------

APEX_040200

SQL>DROP PACKAGE SYS.WWV_DBMS_SQL_APEX_040200;