It’s a Bank Holiday weekend here in the UK.
This is usually a time for doing odd-jobs as a distraction from watching the rain come down.
This time around, rather than subject you to another lament about the Great British Summer ( or lack thereof), I’m going to go through the steps needed to install APEX5 on Oracle 11gXE.
Now, I know that the documentation doesn’t mention Express Edition.
I also know that the instructions that Oracle do have for upgrading APEX on XE haven’t yet been updated to account for APEX5.
I know this because I’ve spent a wet Bank Holiday finding this stuff out the hard way so that (hopefully), you don’t have to.
What I’m going to cover here is :
- Pre-installation checks
- Getting APEX5
- Installation
- Configuration
I would say “let’s get cracking before the sun comes out”, but that would only give us until around the second week in July…
The environment
I’m dong this on Oracle Database Express Edition 11gR2.
As I’m doing this on a Linux machine, you may see the odd indication of this but the essential steps outlined here will apply for all Operating Systems
I’m starting with a clean installation of Oracle XE, so the current version of APEX is 4.0. However, these steps should still be valid when upgrading from any APEX4x version.
Incidentally, if you really want to hang on to the default XE Database Management Application, you’ll probably want to have a look at the steps required to back it up prior to upgrade.
Pre-Installation checks
The documentation details several checks. However, as we’re running on XE11g, we don’t have to worry too much about some of them.
If you really want to double-check….
Oracle Database Version
The minimum version required is 11.1.07. XE runs 11.2.0.2 as we can see with the following query in SQL*Plus :
select banner from v$version where banner like 'Oracle Database%'; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production SQL>
Oracle XML DB
That’s there as well, by default…
select comp_name, version, status from dba_registry where comp_id = 'XDB'; COMP_NAME VERSION STATUS -------------------------------------------------- ------------------------------ -------------------------------------------- Oracle XML Database 11.2.0.2.0 VALID
Web Listener Requirements
Oracle XE ships with the Embedded PL/SQL Gateway by default.
Provided you can hit the Database Home Page (e.g. by clicking on the Getting Started With Oracle Database 11g Express Edition desktop shortcut), you’re good to go.
There are some pre-requisites that you will need to verify.
Memory Target Setting
Once again, on a fresh XE11g install, you shouldn’t have any problems.
In memory terms, the smallest machine I’ve installed XE11g on had a total of 1GB RAM. Even in an environment as constrained as this, the MEMORY_TARGET should still meet the minimum requirement of 300MB.
To check, login to SQL*Plus and ….
SQL> show parameter memory_target NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ memory_target big integer 1G SQL>
Space Requirements
The easy bit first. If you’re planning to download the English Language Only version of APEX5, you’ll need 250MB of space on disk.
If you’re going for the full version, this goes up to 630 MB.
At this point, the installation instructions then start talking about the “Oracle Application Express tablespace”.
This is simply the default tablespace for the schema that will be the APEX owner. Once the installation happens this will be a schema called APEX_050000. It will be created with SYSAUX as it’s default tablespace. This is exactly the same as for the existing APEX04000 user that shipped with XE11g. Incidentally, we’ll also need to know the user’s temporary tablespace for the installation, so we may as well verify both of them now…
SQL> select default_tablespace, temporary_tablespace 2 from dba_users 3 where username = 'APEX_040000'; DEFAULT_TABLESPACE TEMPORARY_TABLESPACE ------------------------------ ------------------------------ SYSAUX TEMP SQL>
The amount of space required in SYSAUX is 220MB plus 60MB per additional language installed.
There is also a requirement for 100MB in the SYSTEM tablespace.
Working out how much space is available isn’t entirely straightforward. However, we can get most of the way with the following query :
select tablespace_name, file_name, (maxbytes - bytes) / 1024/1024 as "Available Space MB", autoextensible from dba_data_files where tablespace_name in ('SYSAUX', 'SYSTEM') / TABLESPACE_NAME FILE_NAME Available Space MB AUT ------------------------------ -------------------------------------------------- ------------------ --- SYSAUX /u01/app/oracle/oradata/XE/sysaux.dbf 31677.9844 YES SYSTEM /u01/app/oracle/oradata/XE/system.dbf 150 YES SQL>
If you’re query returns an Available Space MB figure less than the requirements, don’t worry too much.
Provided the tablespace is Autoextensible and there is enough space on disk, it will automatically grow as it needs more space.
Browser Version
The minimum requirements for Web browsers are :
- Firefox version 35
- Chrome version 40
- Safari version 7
- IE version 9
Getting APEX5
Right, once you’re happy with the pre-requisite steps, head over to the OTN APEX5 download page and download you’re required version.
This will be one of :
- Oracle Application Express 5.0 – All languages
- Oracle Application Express 5.0 – English language only
I’ve gone for the English language only version.
As mentioned previously, the Download Page does state that :
“Application Express 5.0 can also be used with Oracle Database 11g Express Edition (XE), but is supported only through the OTN discussion forum, and not through Oracle Support Services.”
However, the installation instructions page it links to has yet to be updated for APEX5 at the time of writing.
Anyway, I now have a file called apex_5.0_en.zip in my Downloads directory.
As I’m on Linux, I’m going to unzip and deploy this to the ORACLE_BASE directory (/u01/app/oracle).
To avoid any issues with file permissions, I’ll do this as the oracle OS user.
I should point out that it doesn’t really matter where you deploy the files to. Also, you don’t have to be oracle to do this.
I’ve just done it this way to keep things simple.
cd $HOME/Downloads sudo su oracle unzip -d /u01/app/oracle apex_5.0_en.zip
You’ll then see something like …
... inflating: /u01/app/oracle/apex/core/template.plb inflating: /u01/app/oracle/apex/core/dev_grants.sql inflating: /u01/app/oracle/apex/apxsqler.sql inflating: /u01/app/oracle/apex/apxprereq.sql inflating: /u01/app/oracle/apex/apxupgrd.sql inflating: /u01/app/oracle/apex/apxconf.sql inflating: /u01/app/oracle/apex/coreins5.sql inflating: /u01/app/oracle/apex/apxdvins.sql inflating: /u01/app/oracle/apex/apxchpwd.sql extracting: /u01/app/oracle/apex/apxexit.sql inflating: /u01/app/oracle/apex/catapx.sql inflating: /u01/app/oracle/apex/apxe102.sql
After that, you should have a sub-directory call apex where you’ve unzipped the file.
NOTE – you can stop being the oracle user now.
Installation
A bit of housekeeping to start with – we need to make sure that the APEX_PUBLIC_USER database account is unlocked :
select account_status from dba_users where username = 'APEX_PUBLIC_USER';
If the account_status is LOCKED then…
alter user apex_public_user account unlock; User altered. select account_status from dba_users where username = 'APEX_PUBLIC_USER'; ACCOUNT_STATUS -------------------------------- OPEN SQL>
NOTE – strictly speaking, you should also perform this check for the ANONYMOUS user. However, if Oracle XE is newly installed, or if you’re running the Embedded PL/SQL Gateway, it should be unlocked.
If you want to satisfy yourself that this is, in fact, the case :
select account_status from dba_users where username = 'ANONYMOUS';
Loading APEX5 into the database
As of APEX5, we now have the option of installing just the APEX runtime…but where’s the fun in that ?
We want the full-blown development environment…
The script we need to run to do the installation – apexins.sql – takes three parameters :
- the default tablespace of the APEX owner schema
- the default tablespace of the FLOWS_FILES schema
- a temporary tablespace in the database
- a virtual directory for APEX images
We already know that the default tablespace for the APEX owner is SYSAUX.
We also know that the temporary tablespace is called TEMP.
As for the FLOWS_FILES schema…
SQL> select default_tablespace 2 from dba_users 3 where username = 'FLOWS_FILES'; DEFAULT_TABLESPACE ------------------------------ SYSAUX SQL>
As for the virtual directory – “/i/” always seems to work.
Now, change directory to the apex directory you’ve created as part of the unzip step, and connect to the database as sys as sysdba.
cd /u01/app/oracle/apex sqlplus sys as sysdba
…and run the script…
@apexins.sql SYSAUX SYSAUX TEMP /i/
After several minutes worth of messages whizzing up your screen you’ll get :
PL/SQL procedure successfully completed. -- Now beginning upgrade. This will take several minutes.------- -- Ensuring template names are unique -------
…finally, you’ll get…
Thank you for installing Oracle Application Express 5.0.0.00.31 Oracle Application Express is installed in the APEX_050000 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) http://host:port/apex/apex_admin (Oracle REST Data Services) 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) http://host:port/apex (Oracle REST Data Services) PL/SQL procedure successfully completed. 1 row selected. Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production mike@mike-Aspire-E3-112 /u01/app/oracle/apex $
Configuration
Re-setting the ADMIN password
The next step is to set the APEX ADMIN password. Note that, even if you’ve already done this for the previously installed APEX version, you’ll need to do it again here, using the script that’s shipped with this version of APEX.
Also, despite any configuration changes you may have made to the APEX password complexity rules, the password you set will need to conform to the following :
- Password must contain at least 6 characters.
- Password must contain at least one numeric character (0123456789).
- Password must contain at least one punctuation character(!”#$%&()“*+,-/:;?_).
- Password must contain at least one upper-case alphabetic character.
- Password must not contain username.
Bearing this in mind, connect to the database again as SYS AS SYSDBA and you’ll be prompted as follows….
@apxchpwd.sql ================================================================================ This script can be used to change the password of an Application Express instance administrator. If the user does not yet exist, a user record will be created. ================================================================================ Enter the administrator's username [ADMIN] User "ADMIN" exists. Enter ADMIN's email [ADMIN] Enter ADMIN's password [] Changed password of instance administrator ADMIN.
Load Images
One final step – we need to load the images.
As we’re running the Embedded PL/SQL Gateway, we’ll need to use the apex_epg_config.sql script.
This script takes, as a parameter, the name of the directory that you’ve extracted the apex zip into – i.e. without the /apex directory itself. As you can see from the output below, it does take a while (8 minutes in this case) :
@apex_epg_config.sql /u01/app/oracle SQL> @apex_epg_config.sql /u01/app/oracle . Loading images directory: /u01/app/oracle/apex/images timing for: Load Images Elapsed: 00:08:00.92 SQL>
Post Installation Steps
Just before we can go and play with our shiny new APEX version, we need to do a little tidying.
First of all, confirm the port that the PL/SQL Gateway is listening on :
select dbms_xdb.gethttpport from dual;
Then, finally, shutdown and re-start the database.
Once it comes back up, point your browser to :
http://localhost:port/apex/apex_admin
…where port is the port number returned by the query above.
Login as user ADMIN with the password that you set for admin when you ran apxchpwd.sql. If all goes well, you should now see…
It may be raining outside, but at least you now have a cosy APEX5 installation to play with.
Thank you so much, finally found an article that says it all!
Just one note, please fix the query column of dba_users to query account_status instead of status.
LikeLike
Aktham,
Thanks for pointing out the typo. I’ve now corrected this in the post.
Glad you found it useful,
Mike
LikeLike
Hello,
am installed but it shows a notification when am open browser “static file support”please give step by step procedure to fix that problem.
LikeLike
Nani,
Assuming you’re using the default Embedded PL/SQL Gateway, this may be because the apex_epg_config.sql script has not been run or hit an unexpected error.
This post by Patrick Wolf may be of use.
HTH
Mike
LikeLike
Hi
I have followed your directions. The first time I ran Apex 5.0, it came up. Since then I have shutdown my pc and Apex 5.0 has not loaded. The database is XE and it is up. Are there listener steps that I need to implement?
LikeLike
Linda,
are you using the PL/SQL Gateway ?
If so, is that up ?
Mike
LikeLike
But if the base is installed on a separate server, then how proizvodtsya installation?
LikeLike
Aydar,
I’m not sure I understand your question.
If you are using the PL/SQL Gateway then this runs inside the database itself so all of the components are on a single server.
Are you using a different method for connecting to APEX ?
Mike
LikeLike
Running Glassfish? Need extra steps. You won’t have image, nothing will run Go to the glassfish directory where you originally created the i.war. (hint: search for i/war) create a new i.war, undeploy the old one, deploy the new one
(create)
java -jar apex.war static /u01/app/oracle/apex/images
(undeploy)
root@vps [/opt/glassfish4]# asadmin undeploy i.war
(Deploy)
root@vps [/opt/glassfish4]# asadmin deploy i.war
LikeLike
correction (undeploy)
undeploy i (not i .WAR)
LikeLike
Thank’s for guide!
It’s working.
LikeLike
I followed the same but receiving XDB login screen again and again. Changed credentials for user (ADMIN) as per the password standard
Oracle XE: Oracle Database 11g Express Edition Release 11.2.0.2.0 – 64bit
Apex: apex_5.0_en.zip
LikeLike
Vikram,
I assume that you are running the Embedded PL/SQL Gateway.
I think the starting point would be to check that the URL you are using to try to open the APEX Admin page is correct.
It should be in the format :
http://host:port/apex/apex_admin
…where host is the name of the host server ( in this case it should be localhost) and port is the port you specified when installing APEX originally.
If localhost doesn’t work, then try using the IP address as the hostname.
This is usually 127.0.0.1 (although sometimes it can be 127.0.1.1).
To verify the port number, use the dbms_xdb.gethttpport I mentioned in the post.
HTH,
Mike
LikeLike
Thanks Mike for your quick reply.
I have tried all these options:
I have tried http://localhost:8080/apex/apex_admin and http://127.0.0.1:8080/apex/apex_admin under IE-9 and Chrome browser but nothing works. From Oracle DB “select dbms_xdb.gethttpport from dual;” gives 8080.
FYI.. After pressing “OK” (many times) on the XDB user password screen, my browser URL changes to ‘http://127.0.0.1:8080/apex/f?p=4550:10:17317474698368::’ and the message box changed to
“There is a problem with your environment because the Application Express files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation guide. In addition, please verify that your image prefix path is correct. Your current path is /j/ (it should countain both starting and ending forward slashed, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it.”
My oracle installed under path “C:\oraclexe\app\oracle” and Apex unzipped files are at “C:\oraclexe\app\apex”. I have installed this on Windows7-64 bit
Can you please let me know if there are more info I can give which can help in finding the root cause.
Thanks,
-Vikram
LikeLike
Vikram,
Unless you have a specific reason for having the image path set to /j/ I’d suggest that you run the reset_image_prefix.sql script and set it back to /i/.
You can find the script in the apex/utilities directory.
From the comments in the script it would appear that it needs to be run as SYS.
Can you give that a try and let me know if it fixes your problem ?
HTH
Mike
LikeLike
Hi Mike,
This is what I ran
———————–
Connected to Oracle Database 11g Express Edition Release 11.2.0.2.0
Connected as SYSTEM@XE AS SYSDBA
SQL> @C:\oraclexe\app\apex\apex_epg_config.sql C:\oraclexe\app
PL/SQL procedure successfully completed
cdb
———
NO
cdb_root
———
NO
meta_link
———
LOCAL
cdb
———
NO
cdb_root
———
NO
meta_link
———
LOCAL
PL/SQL procedure successfully completed
script_name
———
apex_epg_config_nocdb.sql
script_name
———
apex_epg_config_nocdb.sql
PL/SQL procedure successfully completed
PL/SQL procedure successfully completed
. Loading images directory: C:\oraclexe\app/apex/images.
Directory created
PL/SQL procedure successfully completed
PL/SQL procedure successfully completed
PL/SQL procedure successfully completed
Commit complete
Directory dropped
PL/SQL procedure successfully completed
Commit complete
SQL>
SQL>
SQL> @C:\oraclexe\app\apex\utilities\reset_image_prefix.sql /i/
…Changing Application Express image prefix
NEW_IMAGE_PREFIX
—————-
/i/
PL/SQL procedure successfully completed
PL/SQL procedure successfully completed
Session altered
…Recreate APEX global
PL/SQL procedure successfully completed
…Purge all cached region and page entries
PL/SQL procedure successfully completed
…Recompiling the Application Express schemas
PL/SQL procedure successfully completed
Image Prefix update complete
SQL>
—————————————–
Above is the complete screenprint of the steps I performed under database. But when I went to the browser the same XDB crentials it ask, and it keep on asking several times and my URL changes to “http://127.0.0.1:8080/apex/f?p=4550:1026764992622543::::::”
now if I keep on pressing the OK without giving any user login info it ends up with the same message ” There is a problem with your environment………..Use the SQL script reset_image_prefix.sql…….. ” This time it shows “Your current path is /i/ ”
Regards,
-Vikram
LikeLike
Vikram,
there are a couple of things I can think of, but I’m a bit stumped otherwise. So, please forgive me if some of what follows seems
trivial or obvious.
When you go to the browser, do you physically type in the URL or do you use the desktop shortcut ?
The shortcut won’t work immediately after the upgrade because it won’t be able to find the APEX application it’s pointing to ( p4950).
If you are using the shortcut then try typing the URL into your browser instead.
As for the output you’ve posted…
When you get the following message :
it looks like the slashes on the input are the other way around from those that the script appends.
It’s almost certainly not significant, but you might try re-running with the slashes the other way round – i.e.
Finally, I’ve checked in my apex/images directory and I have 865 items ( including several sub-directories).
It looks like you should have the same in your directory C:\oraclexe\app\apex\images.
If this is the case then the only other thing I can suggest is that you check the permissions on this directory to make sure that oracle has read permissions.
HTH,
Mike
LikeLike
Ok Mike
Let’s go step by step
1. I am always typing the URL in the browser and it takes sometime to bring the XDB user/password screen
2. I ran the apex_epg_config with other way slash (As you asked for). It ran fine as expected
3. I ran reset_image_prefix.sql again
4. Checked the path “C:\oraclexe\app\apex\images” and it shows 865 total items (12,047 Files, 798 Folders by checking its properties)
5. Given permission ‘Full Control’ to ‘Everyone’ on directory “C:\oraclexe\app\apex”
6. Restarted the Database (wait for few minutes)
7. Open browser and typed URL “http://127.0.0.1:8080/apex/apex_admin”
This time the URL changes quickly to “http://127.0.0.1:8080/apex/f?p=4550:10:1190396902192:::::”
Again the XDB user/login wiindow appear
8. I entered the user: ADMIN and the password (I set through @apxchpwd.sql)
It didn’t work and repeating the login screen
9. Then I tried entering the User as ‘XDB’ (schema) and its password
To my surprise the new screen appear in the browser and it shows “Administration Services”, Username, Password, Sign In to Administration
10. Then I entered the credentials set through @apxchpwd.sql (User: ADMIN and its password)
****It finally Worked**** 🙂 I got the screen which you have shown above ”
I remember I tried to enter XDB schema user and password earlier and it didn’t worked, perhaps the steps you have told is essential to get through successfully.
Thank you so much for your Help Mike. Your help is greatly appreciated. 🙂
-Vikram
LikeLike
Vikram,
Glad you got it sorted. Thanks for posting the steps you used. This should help someone facing a similar problem.
Mike
LikeLike
hi i am trying to do configuration but for reseting the admin password bu after connecting to database as SYS AS SYSDBA …. I am not getting prompt as @apxchpwd.sql
LikeLike
it did work after entering the complete path.
however the @apex_epg_config.sql is asking for
“enter the value of 1: ”
what is to be entered here??
LikeLike
i am always getting this error
SP2-0310: UNABLE TO OPEN FILE “apex_epg_config_nocdb.sql”
even though i am not making any reference to this particular file
LikeLike
Ashish,
I would suggest that you cd to the directory that holds that file and then connect to the database via SQL*Plus from there. That should solve this particular issue.
Have you managed to overcome the other issues you’ve posted ?
HTH,
Mike
LikeLike
This was very helpful. I am stuck on the images. I started with a clean install, but am on windows 7 32bit. i extracted to c:\apex\apex. below is the error I am encountering. Any insight or help is appreciated.
SQL> @apex_epg_config.sql
. Loading images directory: c:/apex/apex/apex/images
declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
The system cannot find the path specified.
ORA-06512: at “SYS.XMLTYPE”, line 296
ORA-06512: at line 16
timing for: Load Images
Elapsed: 00:00:13.01
SQL> @reset_image_prefix.sql c:\apex\apex\utilities
SP2-0310: unable to open file “reset_image_prefix.sql”
SQL>
LikeLike
David,
looking at this, I notice that the script appears to be looking for files in c:/apex/apex/apex/images.
I think this may be the issue.
When you execute the apex_epg_config.sql script, you can pass in the location of the directory you extracted into i.e. WITHOUT specifying the apex sub-directory.
From looking at your code listing, I’d suggest that the following should work …
Please let me know if this helps.
Mike
LikeLike
I ended up copying the contents of the second /apex directory into the first and ran the command against the copy. It still tried to create a second directory, but this time it existed and everything ran.
I ran:
SQL> @apxldimg.sql c:/apex
SQLPLUS executed:
PL/SQL procedure successfully completed.
. Loading images directory: c:/apex/apex/images
Directory created.
I am very new to all this and your help has been greatly appreciated. Thanks
LikeLike
David,
congratulations on getting it working and thanks for posting your solution. I’m sure it’ll help someone else out 🙂
Mike
LikeLike
Hi,
I am getting the same error again and again. Please need help.
@apex_epg_config
The apex folder is in /Oracle/apex/images
SQL> @apex_epg_config /Oracle
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
. Loading images directory: /Oracle/apex/images
Directory created.
declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at “SYS.XMLTYPE”, line 296
ORA-06512: at line 16
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Commit complete.
Directory dropped.
timing for: Load Images
Elapsed: 00:00:07.38
PL/SQL procedure successfully completed.
Commit complete.
SQL>
LikeLike
Ammar,
apologies for the late reply, I’ve just returned from a vacation.
It looks like your issue may be related to the problems encountered by Vikram and David.
Have a look at those comments and see if you can solve your issue by repeating the steps they tried.
Let us know if that solves your issue.
HTH,
Mike
LikeLike
The problem is the Oracle engine (oracle.exe) is running as an other user as you can see it the user name column of Windows task manager.
Share the apex directory by right click properties of the folder, tab sharing, button Share… , and add the Oracle engine user
LikeLike
Thanks for the instructions. I had to uninstall APEX 4 and then the instructions worked great and I was able to open APEX…!
LikeLike
hey, Mike
Just finished my third upgrade to APEX5. For every effort, your blog is my touchstone for the effort.
LikeLike
Christina,
glad you found it useful.
Thanks for the “thank you” 🙂
Mike
LikeLike
Thank’s for guide!
Clear and simple
It’s working.
LikeLike
Thank’s for super guide!
It’s working
Das erste Upgrade-Guide, dass für die Oracle 11g Express Version funktioniert.
🙂
LikeLike
Danke schoen.
Gut zu wissen, dass es für Sie gearbeitet.
With apologies for my bad German,
Mike
LikeLike
Hi Mike
I have Apex 5.0.0.00.31 installed and would like to upgrade to the latest version 5.0.3.00.03. I have done some research but couldn’t find any conclusive documentation. Do you have any idea of how it can be done. The only option I am aware of is to remove the existing Apex schema and install the latest version.
Thanks
Pavan
LikeLike
Pavan,
It looks like there is a patch for this.
Have a look at this note on Oracle Technet.
HTH,
Mike
LikeLike
I did all but I keep getting this error :
SQL> @apex_epg_config.sql /opt
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
. Loading images directory: /opt/apex/images
Directory created.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
from path_view
*
ERROR at line 17:
ORA-06550: line 17, column 14:
PL/SQL: ORA-04045: errors during recompilation/revalidation of XDB.PATH_VIEW
ORA-00600: internal error code, arguments: [qctchr : bfl], [4000], [1024], [1],
[560], [2], [175], [], [], [], [], []
ORA-06550: line 16, column 7:
PL/SQL: SQL Statement ignored
ORA-06550: line 28, column 31:
PLS-00364: loop index variable ‘RES’ use is invalid
ORA-06550: line 28, column 31:
PL/SQL: ORA-00904: “RES”.”PATH”: invalid identifier
ORA-06550: line 26, column 8:
PL/SQL: SQL Statement ignored
Commit complete.
Directory dropped.
timing for: Load Images
Elapsed: 00:01:18.79
PL/SQL procedure successfully completed.
Commit complete.
SQL> exit
LikeLike
Joe,
that ORA-00600 error looks a bit scary ! However, before I just say “it’s a bug, contact Oracle”, I think it’s probably worth going through some checks, simply because this would appear to be rather unusual.
Just as a sanity check…
– are you using the PL/SQL Embedded Gateway for APEX
– have you extracted the apex zip file into /opt – i.e. can you see the /opt/apex/images directory on the OS
– are you running apex_epg_config.sql while connected as SYS as SYSDBA
A number of people seem to have issues with this script and it may be worth checking out this post from Patrick Wolf.
The other thing you may want to try is to manually recompile XDB.PATH_VIEW and see what errors, if any, you get back.
If none of this resolves the issue then can you confirm :
– what is the database version and edition you are running this on
– what OS are you doing this on.
– what is the version of APEX you are trying to upgrade to.
– what is the version of APEX (if any) that was installed previously
HTH
Mike
LikeLike
Thank you very much for your prompt response.
– are you using the PL/SQL Embedded Gateway for APEX
YES
– have you extracted the apex zip file into /opt – i.e. can you see the /opt/apex/images directory on the OS
YES
– are you running apex_epg_config.sql while connected as SYS as SYSDBA
YES
– recompile XDB.PATH_VIEW and see what errors,
I get the same ORA-00600 Error
If none of this resolves the issue then can you confirm :
– what is the database version and edition you are running this on
I am on 11g 11.2.0 Express.. that is why I can get Oracle support
– what OS are you doing this on.
Linux centos 7
– what is the version of APEX you are trying to upgrade to.
5.0.3.00.0
– what is the version of APEX (if any) that was installed previously
11g express comes with Apex 4.2.6.00.03.
It is also worth mentioning that with that error and if I run APEX http://server:8080/apex/apex_admin
I get XDB requesting for username and password.
LikeLike
Joe,
I’m now a bit stumped.
I’ve done some searching on ORA-00600 in conjunction with XDB.PATH_VIEW and also with “qctchr : bfl” in the error message.
The only thing I’ve come up with is that this may be a bug related to the NLS_LENGTH_SEMANTICS setting.
So, it’s a long shot but, you could try the following :
– connect to SQL*Plus as SYS as SYSDBA
…and then run the script with this setting.
Let me know if this works.
Thanks,
Mike
LikeLike
Maybe you changed AL32UTF8 to UTF8 for Developer6i, you have to undo that
sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown immediate
SQL> startup restrict
SQL> alter database character set internal_use AL32UTF8;
SQL> shutdown immediate
SQL> startup
Luis
LikeLike
Unfortunately still not working 😦
but here is something I find it very strange and might ring a bell.
with that error still unsolved.. I managed to access apex page from Safari on OS X as I entered the Database System and password when prompted to enter username and password for XDB and it is still working and I don’t get the XDB username and password dialog box anymore. However, I couldn’t do the same on Internet Explorer on windows as it keep repeating the dialog box and it does not accept the System/passwd of the Database as I have done on Safari.
LikeLike
Joe,
just out of interest, what version of IE are you running ?
I know for the initial APEX5 release, the minimum supported version was IE9.
I’m not sure how, or even if, this is related to the error message.
I suppose it’s worth checking though.
Mike
LikeLike
Thank you very much for the exhaustive guide. It worked without a hitch..
LikeLike
I have successfully upgraded to apex 5….3 on 11G XE but now I cannot get to the database home page … it seems it has been wiped out??? http://127.0.0.1:8080/apex/f?p=4950 has the get started url changed?
LikeLike
Ken,
I presume you’ve upgraded from APEX 4.0 ( which is the version that XE 11G ships with).
Upgrading this to any version from 4.1 onwards will “remove” the Database Management Application.
At this point ( i.e. after the upgrade), I think you have a couple of options.
As I said in The environment section of the post, you could get a backup of the Database Management Application from another copy of Oracle XE ( see Fred’s comment on that post ).
You could simply write an improved version of the Application, an example of which can be found here.
The other alternative is that you could use SQLDeveloper (or another IDE) for your database management requirements.
HTH,
Mike
LikeLike
Hi Mike,
I am a complete newbie BUT thanks to your expertise. I sailed through the installation. I had a minor hiccup @ the point of loading the images but it turned out I had not followed the steps precisely. Good job and thanks again…
LikeLike
Neogy,
well done for getting it working and thanks for the comment.
Mike
LikeLike
hi mike – i too am a newbie on the apex side and have profited greatly from your blog; thanks for all you do it is appreciated
i am having wonderful experience on a pure 32 bit MS stack: win 7 pro 32b,oraxe 32,apex 5.03 … making a workspace, a developer, an app with no authentication using apex_public_user – works perfect; sending the url ‘machine_name_32b:8080/apex/f?p=xxx:1’ to colleagues and hearing ‘Neat!’ from the other end
i have another machine, a pure 64 bit stack, with almost the same wonderful experience … browsers (ms ie 11, and chrome) time out on ‘machine_name_64b:8080/apex/f?p=xxx:1’; this same url works fine on the 64bit machine itself. sql developer and sqlplus both work without issue on this machine also
i am positioning apex as an ms sharepoint substitute for end user data consumption
thoughts? and ‘thanks’ doesn’t even begin to express our gratitude
meh3
LikeLike
re: browsers timing out
I found the solution: somehow the listenerlocalaccess was set to ‘true’
lsnrct status showed me that the port 8080 endpoint was set to 127.0.0.1 (explaining why http://my_machine_name:8080/apex/f?p=app_id:1 failed but http://127.0.0.1 or localhost:8080/apex/f?p=app_id:1 worked
dbms_xdb.setlistenerlocalhost = ‘false’ solved the problem
thanks again for what you do and many others via community.oracle.com where I found clues to this issue … I need all the help I can get!
meh3
LikeLike
Hello Sir,
Is it possible to revert back oracle apex 5.0.4 to apex 4.0.2 ???
Please tell me and send related documents.
LikeLike
Great tutorial.
I’m an Oracle starter (<3 months) and managed to install this version on my Oracle XE.
Thank you!
LikeLike
Very helpful with step by step installation procecss.
Cheers dude!!!!
LikeLike
Many many thanks you just explained what Oracle failed to do properly!
LikeLike
Just followed these instructions to upgrade my 11.2XE apex to v5 and it went smooth as could be! Thanks. Now following Oracle’s Apex 5 basic demo
LikeLike
Hi, while I am try to execute @apex_epg_config.sql it gets me an error:
declare
*
ERROR at line 1:
ORA-31024: Parser initialization failed with LPX-266 error
while parsing a stream to XOB
ORA-06512: at “SYS.XMLTYPE”, line 296
ORA-06512: at line 16
PL/SQL procedure successfully completed.
declare
*
ERROR at line 1:
ORA-31067: XML nodes must be updated with valid nodes and of the same type
ORA-06512: at line 20
ORA-06512: at line 59
Commit complete.
Directory dropped.
timing for: Load Images
Elapsed: 00:00:02.79
begin
*
ERROR at line 1:
ORA-31024: Parser initialization failed with LPX-266 error
while parsing a stream to XOB
ORA-06512: at “SYS.XMLTYPE”, line 310
ORA-06512: at “SYS.DBMS_EPG”, line 240
ORA-06512: at line 2
Is there any solution,please?!
trying to upgrade to 5.03 apex
Thanks
LikeLike
Please see this link: http://swiftsight.tech/installing-oracle-application-express-apex-5-x-in-a-pluggable-database-12c/
Thanks 😉
LikeLike
Hamza,
thanks for the link.
Certainly looks like a comprehensive guide to upgrading Apex on PDBs.
Mike
LikeLike
Does what it says on the tin – Thanks Mike 🙂
LikeLike
Me sirvio de Ayuda, muchas gracias por el aporte!! Saludos
LikeLike
Hi, I’m from Panama. My English is bad. But, I want to tell you, I loved your tutorial. And I was able to configure my apex thanks to you. Hahaha. Greetings.
LikeLike
Dear,
I found it is one of the greatest efforts that you have put in.
Thanks,
Umair Ansari
LikeLike
Just used your guide to update from 5.0 to 5.1 on Oracle Express database and linux 64 OS worked prefectly. Thank you very much.
I would just add that once it is installed and reunning the $ORACLE_BASE/apex directory where we unzipped can be deleted to save space on the server.
Also removing previous apex version from database again to keep thinkgs tidy.
Thanks again
LikeLike
Scalpa,
thanks for the tip. I’ll try both of those things next time.
Mike
LikeLike
The confusion about the images directory is explained properly (as being a virtual directory pointer) here http://joelkallman.blogspot.ca/2013/05/image-prefix-changes-in-oracle.html
LikeLike
Tammy,
thanks for clearing that up.
MIke
LikeLike
Is it true that as of APEX5, we now have the option of installing just the APEX run-time and not the full-blown development environment? Is this also true of the APEX4 that comes bundled with Oracle Database 11g XE?
LikeLike
AbeGarcia,
you are correct on both counts. Here’s the Apex 5.0 documentation for the APEX runtime.
The current version of Oracle XE ( 11g), does indeed come with APEX 4.0.
HTH,
Mike
LikeLike
Congratulations on your excellent work. I did everything as you asked, but in the end to run the script Apex_epg_config. sql
SQL > @apex_epg_config. SQL C:\oraclexe\app\oracle\product\11.2.0\server\apex
PL/SQL procedure completed successfully.
PL/SQL procedure completed successfully.
PL/SQL procedure completed successfully.
PL/SQL procedure completed successfully.
. Loading Images directory: C: \ oraclexe \ app \ oracle \ 11.2.0 \ server \ Apex/apex/images
Directory created.
Declare
*
Error on line 1:
ORA-22288: File or operation failed LOBFILEOPEN
The system cannot find the specified path.
ORA-06512: In “SYS. XmlType “, line 296
ORA-06512: In line 16
PL/SQL procedure completed successfully.
Commit completed.
I go in the navigator and I put the addresses
http://localhost:8080/apex/apex_admin or http://127.0.0.1:8080/apex/f?p=4950
Gives the same message page not found 404
I have already tried two paths to the APEX folder, 1 C:\apex and 2) C:\oraclexe\app\oracle\product\11.2.0\server\apex None of these folders worked.
Thank you so much for your help!
LikeLike
Francesco,
The script you are running is expecting the name of the directory that you’ve extracted the apex zip into – i.e. without the /apex directory itself.
So, from what you’ve posted, I’d expect this to work :
HTH
Mike
LikeLike
I tested several things, and nothing worked. Only with your tips I went farther. But now I don’t know where else to go
LikeLike
Francesco,
did you try the command I suggested ?
What was the output ?
Mike
LikeLike
Francisco,
you didn’t show the command you actually ran, so I may be mistaken but it looks as if you have specified the Apex directory in the command. Please make sure that you are running the exact command that I posted previously, connected to the database as sys as sysdba, and from the directory where the script you are running is located.
If you stillget an error then please post the entire output ( including the command).
Thanks,
Mike
LikeLike
Mike
As I solved, uninstalled Oracle, installed Oracle.
But only then I saw what the problem was, door 8080.
When I installed new Oracle the new port was 8081, then the path was like this: http://127.0.0.1:8081/apex/f?p=4550.
Before I was using port 8080 this was already for Microsoft IIS when I put: http://127.0.0.1:8080 opened the IIS page, but if I put the Apex page it would not open.
But now it worked.
Just a doubt, I still need to run those commands in the Sqlpus?
Thank you so much for your help.
Francisco
LikeLike
Francisco,
if you can access the home page then you do not need to re-run the scripts.
Congratulations for getting it to work 🙂
Mike
LikeLike
Sorry, I forgot to translate
Copyright (c) 1982, 2014, Oracle. ALL rights reserved.
SQL > CONNECT/AS SYSDBA
Connected.
SQL > @apex_epg_config. SQL C:\oraclexe\app\oracle\product\11.2.0\server
SP2-0310: It was not possible open the file “apex_epg_config. sql”
LikeLike
Francisco,
you need to navigate to the directory where apex_epg_config.sql is located. Then login to SQL*Plus before you run the command.
Hopefully you will at least get a different message then.
Mike
LikeLike
Mike
Now the command has executed, but they have made mistakes
PL/SQL procedure successfully concluded.
PL/SQL procedure successfully concluded.
Loading Images directory: c: \ oraclexe \ app \ oracle \ 11.2.0 \ server \ Apex/apex/images
The director’s created.
Declare*
Error on line 1:
ORA-22288: File or operation failed LOBFILEOPEN
The system cannot find the specified path.
ORA-06512: In “SYS. XmlType “, line 296
ORA-06512: In line 16
PL/SQL procedure successfully concluded.
Commit concluded.
Director eliminated.
Syncing to: Load images
Elapsed: 00:00:56.43
PL/SQL procedure successfully concluded.
Commit concluded.
SQL > exit;
Error:
ORA-03113: End of file in the communication channel
Process ID: 0
Session ID: 50 serial Number: 139
Disconnected from Oracle database 11g Express Edition Release 11.2.0.2.0-
64bit Production (with complications)
I stopped the database/started the database
I went to Mozila and Chrome gave error 404 pag. Not found
Francisco
LikeLike
Mike
I’m thinking of uninstalling Oracle 11g XE, clearing all Windows records, deleting all the Oracle folders, and then installing it all again.
What do you think?
LikeLike
Mike
Thank you very much for your help, you are an excellent professional
Francis
LikeLike
when open application url found this issue
There is a problem with your environment because the Application Express files are not up-to-date! The files for version 5.0.0.00.31 have been loaded, but 5.1.3.00.05 is expected. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide.
LikeLike
Still works fine even with Apex 18 🙂
LikeLike