Apex 4.1 to 4.2.6 patch issues



This week we thought we'd a simple Apex patch to do but it didn't turn out that way...

So after some time spent fixing the issues after we did this in the dev/test environment (changes to session state protection caused a load of hassle) - something that was introduced in a minor patchset in 4.1 that we hit after upgrading, we then wanted to move forward and upgrade the real system.

So we told all the users to come off the system and began running the upgrade script - to start with all looked fine - this kind of stuff (that big text oracle really didn't paste well....)

.  ____   ____           ____        ____
. /    \ |    \   /\    /     |     /
.|      ||    /  /  \  |      |    |
.|      ||---    ----  |      |    |--
.|      ||   \  /    \ |      |    |
. \____/ |    \/      \ \____ |____ \____
.
. Application Express (APEX) Installation.
..........................................
.
... Checking prerequisites (MANUAL)
.

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

.And it chugged away from a while until we hit this...

create or replace package sys.wwv_dbms_sql authid current_user as
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object

But all the users were out and nothing else should be using this?

Anyway we let the script carry on and after a few more issues it got to this point and finally gave up

ERRORS EXIST!!!
...There are 558 errors in the log table!
...Select upgrade_error from WWV_FLOW_UPGRADE_PROGRESS to review errors.
-- Upgrade is complete -----------------------------------------
timing for: Upgrade
Elapsed: 01:31:14.52
VIII.   I N S T A L L    O R A C L E   A P E X   A P P L I C A T I O N S
define "^" (hex 5e)

FOO
------------
apxsqler.sql
...Internal messages
APPLICATION 4411 - Oracle APEX  System Messages and Native Types
Set Credentials...
begin
*
ERROR at line 1:
ORA-04063: package body "APEX_040200.WWV_FLOW_SECURITY" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"APEX_040200.WWV_FLOW_SECURITY"
ORA-06512: at "APEX_040200.WWV_FLOW_API", line 16952
ORA-06512: at line 4

So what to do now - did we have to restore everything? Could we run it again?

Well after a bit of checking it seemed the solution was easy - as the upgrade had left the original schema untouched (APEX_040100) we could simply drop the new one and try again - great! However whats blocking the package from being replaced?

We decided to just ran that package header in and see what was blocking it, we tracked down the Apex source file and ran it in - and sure enough again it hung. A bit of investigation then revealed that we had some old rogue connections as the ANONYMOUS account(we are using EPG) that seemed to be holding locks. So we killed these off and the package replaced fine.

So now we just had to re-run....and now it runs through fine and we see this kind of stuff in the end

timing for: Install Internal Applications
Elapsed: 00:13:20.62



Thank you for installing Oracle Application Express.

Oracle Application Express is installed in the APEX_040200 schema.

The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)



So we got there in the end, but a lesson in making usre everything is out of the system when you do any kind of patching.....

Comments