this is just for reference, i have the installation running and working again.
Tried to apply patch 5.0.4 from Support over a 5.0.2 installation on 11.2.0.4.
...Installing Theme 42
API Last Extended:20130101
Your Current Version:20130101
This import is compatible with version: 20130101
COMPATIBLE (You should be able to run this import without issues.)
--application/set_environment
APPLICATION 8940 - Universal Theme Sample Application***
--application/delete_application
--application/ui_types
--application/create_application
--application/shared_components/navigation/lists
--application/shared_components/files
--application/plugin_settings
--application/shared_components/security/authorizations
--application/shared_components/navigation/navigation_bar
--application/shared_components/logic/application_processes
--application/shared_components/logic/application_items
--application/shared_components/logic/application_computations
--application/shared_components/navigation/tabs/standard
--application/shared_components/navigation/tabs/parent
--application/shared_components/user_interface/lovs
--application/shared_components/navigation/trees
--application/pages/page_groups
--application/comments
--application/shared_components/navigation/breadcrumbs/universal_theme_breadcrumb
--application/shared_components/navigation/breadcrumbs/legacy_breadcrumb
--application/shared_components/user_interface/templates/page
--application/shared_components/user_interface/templates/button
--application/shared_components/user_interface/templates/region
--application/shared_components/user_interface/templates/list
--application/shared_components/user_interface/templates/report
--application/shared_components/user_interface/templates/label
--application/shared_components/user_interface/templates/breadcrumb
--application/shared_components/user_interface/templates/popuplov
--application/shared_components/user_interface/templates/calendar
--application/shared_components/user_interface/themes
--application/shared_components/user_interface/theme_style
--application/shared_components/user_interface/theme_files
--application/shared_components/user_interface/theme_display_points
--application/shared_components/user_interface/template_opt_groups
--application/shared_components/user_interface/template_options
--application/shared_components/logic/build_options
--application/shared_components/globalization/language
--application/shared_components/globalization/translations
--application/shared_components/globalization/messages
--application/shared_components/globalization/dyntranslations
--application/shared_components/user_interface/shortcuts
--application/shared_components/security/authentications
--application/ui_types
--application/shared_components/plugins/region_type/com_oracle_apex_how_to_instructions
--application/user_interfaces
--application/user_interfaces/combined_files
--application/pages/page_00000
--application/pages/page_00100
--application/pages/page_01000
--application/pages/page_01100
--application/pages/page_01101
--application/pages/page_01102
--application/pages/page_01103
--application/pages/page_01104
--application/pages/page_01105
--application/pages/page_01106
--application/pages/page_01107
--application/pages/page_01108
--application/pages/page_01109
--application/pages/page_01110
--application/pages/page_01111
--application/pages/page_01112
--application/pages/page_01113
--application/pages/page_01114
--application/pages/page_01200
--application/pages/page_01300
--application/pages/page_01400
begin
*
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of has been invalidated
ORA-04061: existing state of package body "APEX_050000.WWV_FLOW" has been
invalidated
ORA-04065: not executed, altered or dropped package body "APEX_050000.WWV_FLOW"
ORA-04061: existing state of package body "APEX_050000.WWV_FLOW" has been
invalidated
ORA-04065: not executed, altered or dropped package body "APEX_050000.WWV_FLOW"
ORA-04061: existing state of package body "APEX_050000.WWV_FLOW" has been
invalidated
ORA-04065: not executed, altered or dropped package body "APEX_050000.WWV_FLOW"
ORA-04061: existing state of package body "APEX_050000.WWV_FLOW" has been
invalidated
ORA-04065: not executed, altered or dropped package body "APEX_050000.WWV_FLOW"
ORA-04061: existing state of package body "APEX_050000.WWV_FLOW" has been
invalidated
ORA-04065: not executed, altered or dropped package body "APEX_050000.WWV_FLOW"
ORA-06508: PL/SQL: could not find program unit being called:
"APEX_050000.WWV_FLOW"
ORA-06512: at "APEX_050000.WWV_FLOW_WS_RPTS_T1", line 61
ORA-04088: error during execution of trigger 'APEX_050000.WWV_FLOW_WS_RPTS_T1'
ORA-06512: at "APEX_050000.WWV_FLOW_API", line 18318
ORA-06512: at line 985
after that, i tried to rerun the patch - this time without any error, but when trying to open the login page i got:
Error during rendering of region "Application Express - Sign In". ORA-06508: PL/SQL: could not find program unit being called.
Last try - stopped any other access to the db including glassfish3 and rerun the patch - again with no error.
This time i was able to login and the installation looks fine now.
If anyone wants to look at the patch logfile please let me know.
thanks.