Installing APEX 4.0 and 3.2 on Oracle 10gR2 on Mac OS X Leopard (Intel)

Apr 16, 2009 / By Alex Gorbachev

Tags: ,

Update 24-06-2010: Peter de Vaal reported that these instructions work without changes for APEX 4.0 as well. Great news!

Few days ago, I have put together the Quick Install Guide for Oracle 10g Release 2 on Mac OS X Leopard (Intel). I did mention that it would be cool to get APEX working as well but, apparently, APEX isn’t supposed to be running on Oracle 10g Release 2 Database on OS X as few people pointed our on the blogs.

Well, the release notes says that Oracle Application Express is not supported and I would imagine that it’s because Oracle HTTP Server is not supported either. I’m not a frequent user of APEX but I know that APEX 3.2 is not supposed to be configured in Oracle 10g Database using Embedded PL/SQL Gateway. However, looks like few people did manage to run APEX on 10g using Embedded PL/SQL Gateway. For example, Jeff Kemp has some APEX on 10g hints that I perused.

Long story short, I was able to install APEX successfully using the native Mac OS X Oracle 10g Database and here is how…

Basically, you want to follow the standard documentation and skip one 11g step but include one trick that I took from comments to the Jeff Kemp blog I mentioned.

  1. Download APEX installation archive. Unzip it (Oracle database home seems to be a good location). All scripts are then run from that unzipped apex directory.
  2. Identify or create a tablespace for APEX (or two to separate the framework and applications). I created APEX tablespace.
  3. Install APEX framework schemas in the database — @apexins APEX APEX TEMP /i/.
  4. Reset ADMIN password — @apxchpwd
  5. Next is the trick — remove some security on XDB, which is not a good thing, by the way, but I can live with it on my development box that’s available on localhost only:
    Update 2-Jul-09: If you still have troubles, see this post from Scott Spendolini.
    Update 7-Jul-09: If you get an error “Maximum number (%s) of ‘%s’ XML node elements exceeded”, see this comment and say a good word about Tim Hall.

    DECLARE
    configxml XMLType;
    configxml2 XMLType;
    BEGIN
    -- Get the current configuration
    configxml := DBMS_XDB.cfg_get();
    
    -- Modify the configuration
    SELECT INSERTCHILDXML(
    configxml,
    '/xdbconfig/sysconfig/protocolconfig/httpconfig',
    'allow-repository-anonymous-access',
    XMLType('<allow-repository-anonymous-access xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">true</allow-repository-anonymous-access>'),
    'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"')
    INTO configxml2 FROM DUAL;
    -- Update the configuration to use the modified version
    DBMS_XDB.cfg_update(configxml2);
    END;
    /
  6. Now it’s time to configure the Embedded PL/SQL Gateway — @apex_epg_config.sql /Volumes/HD2/oracle/product/10.2.0/db_1. Note that it’s actually the location where you unzipped APEX with images (see comment #17 from hourus. If you follow my instructions in step 1 to the letter — it would be you Oracle database home.
  7. Enabling Oracle XML DB HTTP Server, shared servers and unlocking ANONYMOUS user :
    call dbms_xdb.setHttpPort(8080);
    alter system set shared_servers = 5;
    alter system register;
    alter user anonymous account unlock;

    Verify enabled Oracle XML DB HTTP Server by using lsnrctl status:

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=macbook)(PORT=8080))(Presentation=HTTP)(Session=RAW))
  8. (Optional) I think I ran the wrong script during the initial installation and installed only run-time environment so after hitting error “ERR-1014″ I had to run @apxdvins to fix it. That actually took 13+ minutes so I must have initially installed only the run-time environment by running @apxrtins APEX APEX TEMP /i/ instead of @apexins APEX APEX TEMP /i/

Now navigate your browser http://localhost:8080/apex and viola:

Oracle APEX on Mac OS X

Oracle APEX on Mac OS X

Obviously, you won’t host your production environment this way and I think it should be possible to hook APEX up via external Apache Server on OS X.

50 Responses to “Installing APEX 4.0 and 3.2 on Oracle 10gR2 on Mac OS X Leopard (Intel)”

  • Scott says:

    Alex,

    Thanks so much for this post! I didn’t realize that EPG was part of 10g on Mac OS X, as they seemed to have stripped most of the other stuff out.

    One question re: your steps:

    When I run step 6, I get the following error:

    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected ‘<’ instead of ‘t’
    Error at line 1
    ORA-06512: at “SYS.XMLTYPE”, line 301
    ORA-06512: at line 1
    ORA-06512: at line 6

    Any thoughts?

    Thanks!

    - Scott -

  • Alex Gorbachev says:

    My bad — I forgot to use HTML codes for < and < symbols and tags got stripped off.

    Step 5 has been fixed now. Can you try again and let me know?

  • Darko says:

    SQL>@apex_epg_config D:\download\Apex\Stage3.2

    (directory with apex images is:
    D:\download\Apex\Stage3.2\apex\images)
    Scott, please check directory that is submitted to apex_epg_config….

  • RSG_Shyam says:

    Hi..,
    I want to install oracle database 10.2 on mac os server 10.5.5.
    I tried it but not succeeded. some times, it give DYLD_Library path not found/image not found. While I configured well the oracle home.

    I took help from your documents as well as Reimonds’s installation documents published at oracle site.

    After login through root I found xclock command runs well but when I login through oracle xclock does not run.

    Can you suggest what is the problem ??

    For your reference, kindly visit this blog and see all the correspondence between me and Raimonds.
    http://blog.rayapps.com/2009/04/12/how-to-install-oracle-database-10g-on-mac-os-x-intel/

    Regards,
    Shyam

  • Alex Gorbachev says:

    RSG_Shyam, please see the another relevant thread on the blog where you posted this comment.

  • Lori Olson says:

    So, if this step fails:

    Verify enabled Oracle XML DB HTTP Server by using lsnrctl status:

    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=macbook)(PORT=8080))(Presentation=HTTP)(Session=RAW))

    How do you troubleshoot it? I see only this:

    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

  • Alex Gorbachev says:

    Hm… good question..
    1. Check if that port is not used already.
    2. Check listener log file.
    3. Try to enable listener trace.

    Actually, does listener dynamic registration work? Do you see services are registered with listener? Maybe you can set local_listener=localhost.

  • Lori Olson says:

    The port is not used… now. I sometimes run Tomcat there, so I changed the port to 8090 like this:

    call dbms_xdb.setHttpPort(8090);

    Listen log looks like:

    TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production on 14-MAY-2009 20:57:19

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    System parameter file is /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Log messages written to /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Trace information written to /Users/oracle/oracle/product/10.2.0/db_1/network/trace/listener.trc
    Trace level is currently 0

    Started with pid=17141
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    WARNING: Subscription for node down event still pending
    14-MAY-2009 20:57:19 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=draco.local)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSI
    ON=169870336)) * status * 0

    Trace level is 0. Looking at how to enable tracing now.

  • Alex Gorbachev says:

    Lori,

    lsnrct trace [user|admin|support]

    “user: is probably enough. Even without trace, I don’t see dynamic registration in your log file – ALTER SYSTEM REGISTER should produce an entry there as I recall. If not, you need to set local_listener.

    Paste full output from “lsnrctl status” – you could see there is services are registered or have only static registration (if any).

  • Carlos says:

    Keep asking for XDB username and password…

  • Carlos says:

    After a reboot works, for now…
    Thx

  • Alex Gorbachev says:

    @Carlos: I recall step #5 is the one fixing this issue if I understood your problem correctly.

  • hourus says:

    Hi Alex, i´m having several issues while running @apexins.

    one of the errors is:
    declare
    *
    ERROR at line 1:
    ORA-04063: package body “APEX_030200.WWV_FLOW_API” has errors
    ORA-06508: PL/SQL: could not find program unit being called:
    “APEX_030200.WWV_FLOW_API”
    ORA-06512: at line 5

  • hourus says:

    ok managed to get that error corrected but on step 6 i get this

    SQL> @apex_epg_config.sql /Users/oracle/product/10.2.0/db_1/

    PL/SQL procedure successfully completed.

    PL/SQL procedure successfully completed.

    Directory created.

    declare
    *
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at “SYS.DBMS_LOB”, line 523
    ORA-06512: at “SYS.XMLTYPE”, line 287
    ORA-06512: at line 18

    Commit complete.

    PL/SQL procedure successfully completed.

    PL/SQL procedure successfully completed.

    timing for: Load Images
    Elapsed: 00:00:00.06

    Session altered.

    PL/SQL procedure successfully completed.

    Commit complete.

    Session altered.

    Directory dropped.

  • hourus says:

    apex doesn´t start listener doesn´t register http server

  • hourus says:

    ok got it working all right, had to change some stuff didn´t exactly work out of the box with the steps here, so for me this worked:

    step 5:
    http://spendolini.blogspot.com/2009/04/apex-on-mac-os-x-update.html
    but i fired up nano on the terminal and put the xml line with the true attribute in one line had to remove whitespaces though

    step 6:
    didn´t pass $ORACLE_HOME into it, as per documentation passed images dir where i unzipped apex that should be my oracle user home directory where i also unzipped oracle db

  • Alex Gorbachev says:

    Thanks mate. Updated steps 5 & 6.

  • Hourus says:

    Just a side note when you issue lsntcrl status IT doesn’t show xdb pointer straight away give IT a few seconds but IT will show up then you can access apex

  • Alex Gorbachev says:

    @Hourus: I thought ALETER SYSTEM REGISTER; is what speeds it up otherwise might take a minute or so.

  • fons says:

    Hi,
    On step 5 I keep getting this error:
    What can I do to solve this?

    Error report:
    ORA-30936: Maximum aantal (1) allow-repository-anonymous-access XML-node-elementen overschreden
    ORA-06512: in regel 8
    30936. 00000 – “Maximum number (%s) of ‘%s’ XML node elements exceeded”
    *Cause: An attempt was made to insert more than the allowed number
    of elements (specified by the maxoccurs facet) into an XML
    document.
    *Action: Do not attempt to add more than the maximum number of elements
    to XML documents.

  • Alex Gorbachev says:

    @fons: I think that it’s either enabled already and you can skip it or it’s disabled implicitly so you need to change this element instead of disabling it. Thanks for my good friend Tim Hall for this post that contains this code you can use:

    CONN sys/password AS SYSDBA
    
    SET SERVEROUTPUT ON
    DECLARE
      l_configxml XMLTYPE;
      l_value     VARCHAR2(5) := 'true'; -- (true/false)
    BEGIN
      l_configxml := DBMS_XDB.cfg_get();
    
      IF l_configxml.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') = 0 THEN
        -- Add missing element.
        SELECT insertChildXML
               (
                 l_configxml,
           	     '/xdbconfig/sysconfig/protocolconfig/httpconfig',
           	     'allow-repository-anonymous-access',
           	     XMLType('' ||
           	              l_value ||
           	             ''),
           	     'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"'
           	   )
        INTO   l_configxml
        FROM   dual;
    
        DBMS_OUTPUT.put_line('Element inserted.');
      ELSE
        -- Update existing element.
        SELECT updateXML
               (
                 DBMS_XDB.cfg_get(),
                 '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()',
                 l_value,
                 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"'
               )
        INTO   l_configxml
        FROM   dual;
    
        DBMS_OUTPUT.put_line('Element updated.');
      END IF;
    
      DBMS_XDB.cfg_update(l_configxml);
      DBMS_XDB.cfg_refresh;
    END;
    /
  • fons says:

    @Alex: Great, I can use apex now.
    Thanks a lot for this wonderfull blog

  • Vedran says:

    Hi,
    I’ve tried this procedure with 10.2.0.4 database on Linux/Intel and APEX 3.2. Upon logging on the “Application Express Administration Services” page the login mask just keeps reappearing again and again asking for APEX administrator username and password ?
    Best regards

  • Alex Gorbachev says:

    @Vedran: I think I had the same and I recall it was because I only installed the run-time component. See step 8.

  • Vedran says:

    @Alex: I’ve installed the full development environment using apexins.sql. One prior additional step was installing PL/SQL Web Toolkit (10.1.2.0.6) delivered with APEX 3.2, since the toolkit which comes with the 10.2.0.4 database is too old (10.1.2.0.5).

  • Vedran says:

    @all: sorry for the fuss – turns out to be my browser. During APEX login the IE7 shows this strange behaviour, Firefox2 works OK. Thanx again

  • Graham B says:

    Awesome! Worked first time. I know that I would never have figured out step 5 and would have given up!
    Thanks Alex, you’re a star!

  • achilles says:

    Hi Alex,

    I am new to Oracle database. I have installed Oracle by your earlier post. Can you please, explain steps 2-4 in details please with exact commands. Much appreciated.

  • Alex Gorbachev says:

    @achilles:

    step 2 – RTFM at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7003.htm

    step 3&4 – those are commands you are running from SQL*Plus. You need to go into apex directory that you unzipped after download and call sqlplus using sqlplus "/ as sysdba". For details, RTFM – http://download.oracle.com/docs/cd/E14373_01/install.32/e13366/otn_install.htm#BEHGEFDI

  • Ryan says:

    Hi Alex,

    I’ve followed your steps all the way but I’m unable to access apex via ‘http://localhost:8080/apex’. I tried setting the port to ’8090′ (call dbms_xdb.setHttpPort(8090);)per another users issue but that has not helped.

    Here is the output from `lsnrctl status`:

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 19-SEP-2009 18:15:00

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    STATUS of the LISTENER
    ————————
    Alias LISTENER
    Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    Start Date 19-SEP-2009 18:01:45
    Uptime 0 days 0 hr. 13 min. 14 sec
    Trace Level user
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /Users/oracle/oracle/product/ora10g/network/admin/listener.ora
    Listener Log File /Users/oracle/oracle/product/ora10g/network/log/listener.log
    Listener Trace File /Users/oracle/oracle/product/ora10g/network/trace/listener.trc
    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “mac10g” has 1 instance(s).
    Instance “mac10g”, status UNKNOWN, has 1 handler(s) for this service…
    The command completed successfully

    Any help would be appreciated. Thanks in advance.

  • MT says:

    Guys,

    How did you managed to fix the error in step 6:

    ..
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at “SYS.DBMS_LOB”, line 523
    ORA-06512: at “SYS.XMLTYPE”, line 287
    ORA-06512: at line 18

    Thanks.

  • Alex Gorbachev says:

    @MT: I didn’t have this error. Check your path and troubleshoot.

  • MT says:

    Hi Alex,

    You’re right. It has something to do with the path.
    I have ran it successfully.

    However, when I tried to access apex screen via http://localhost:8080/apex_admin

    It prompted me to change the admin password. After entering details and clicking the ‘Apply Changes’ button, nothing happens.

    Also, APEX images in the logon page is not displaying. (like in step 8).

    What am I missing?

    Thanks.

  • Cory says:

    Thanks Alex for another excellent set of instructions.

    I did have a problem with the XML DB HTTP Server but it appears to be a default setting in Snow Leopard – running “sudo ipfw list” and “sudo ipfw flush” as per http://discussions.apple.com/thread.jspa?threadID=1561149
    resolved the issue.

    Also, I initially needed to log onto http://localhost:8080/apex/apex_admin but everything else was cut and paste. Thanks again.

  • Alex Gorbachev says:

    Thanks for update Cory.

  • Hari says:

    Steps 1 through 6 worked perfectly fine without any errors. In Step 7, I used call dbms_xdb.setHttpPort(8090); and observed the following entry in the listener.ora file:

    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8090))). The PRESENTATION and SESSION tags are not present in the entry.

    When I started the listener (lsnctl start), it complained that the port is already being used. So I used

    call dbms_xdb.setHttpPort(65530); and
    alter system register;
    with a different port address. Unfortunately the listener.ora file is not updated. I tried manually changing this file by updating the port address, and adding the PRESENTATION and SESSION tags, but there was no luck.

    I want to know is there any way to change the DBMS XDB Http port without reinstalling apex from Step-3?

    • Jojo says:

      Hi,

      Service was not added to listener..

      LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 23-MAR-2010 22:43:01

      Copyright (c) 1991, 2007, Oracle. All rights reserved.

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
      STATUS of the LISTENER
      ————————
      Alias LISTENER
      Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
      Start Date 23-MAR-2010 22:27:41
      Uptime 0 days 0 hr. 15 min. 20 sec
      Trace Level off
      Security ON: Local OS Authentication
      SNMP OFF
      Listener Parameter File /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
      Listener Log File /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
      Listening Endpoints Summary…
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
      Services Summary…
      Service “PLSExtProc” has 1 instance(s).
      Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
      Service “orcl” has 1 instance(s).
      Instance “orcl”, status UNKNOWN, has 1 handler(s) for this service…
      The command completed successfully

  • George Ch says:

    in the beginning I want to thank you for your publications
    which help explore oracle on mac os x..
    after start @apexins APEX APEX TEMP / i /
    I get the following error
    SP2-0310: unable to open file “coreins.sql”
    and disconnected from oracle db..
    What possible reason for this?..

  • @George: it’s either that your download is not complete/unzipped properly or you are in the wrong directory. Please think about this message – it cleanly can’t find coreins.sql which is part of APEX download package.

  • George Ch says:

    re-downloaded apex.zip, but the same problem, and coreins.sql available

    Igor-MacBook-Pro:apex oracle$ ls -al coreins.sql
    -r–r–r–@ 1 oracle admin 84368 Jul 23 2009 coreins.sql

    SYS>@?/apex/apexins APEX APEX TEMP /i/

    #blablabla

    PL/SQL procedure successfully completed.

    .
    … Prerequisite check complete. Result passed.
    .

    FOO3
    ——————————
    install2010-03-16_19-18-55.log

    no rows selected

    PL/SQL procedure successfully completed.

    SP2-0310: unable to open file “coreins.sql”
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0

    – in the log is only: SP2-0310: unable to open file “coreins.sql”

    :( I cant understand

  • George Ch says:

    ok, it’s wrong: @?/apex/apexins
    must login in sqlplus from ./apex directory
    and run script @apexins

  • Peter de Vaal says:

    I just downloaded and installed APEX 4.0 on the 10.2.0.4 rdbms on my MacBookPro, following your instructions for APEX 3. It works without modifications!

    An alternative for the embedded pl/sql gateway is now to install the apex listener application on a local servletcontainer, e.g. tomcat. I have not tried this yet on MacOS, but on Linux it works great.

  • Cristi says:

    Good post!
    Thanks

  • nock says:

    Alex thank you for your post.
    As I encountered a number of issues I have some comments.

    STEP 2.

    I also created an APEX tablespace but I initially created it with only barely enough space of 200MB.
    In addition this install created a lot of pressure on SYSTEM and SYSAUX table spaces:
    So to do this properly before you start:

    SELECT DFS.TABLESPACE_NAME
    , ddf.file_name
    , ROUND(SUM(DFS.BYTES)/1000000,3) FREE_MB
    , ddf.TOTAL_MB – ROUND(SUM(DFS.BYTES)/1000000,3) USED_MB
    , ddf.TOTAL_MB
    FROM DBA_FREE_SPACE DFS,
    (SELECT FILE_NAME, TABLESPACE_NAME,ROUND(SUM(BYTES)/1000000, 3) TOTAL_MB
    FROM DBA_DATA_FILES GROUP BY FILE_NAME, TABLESPACE_NAME) DDF
    WHERE DFS.TABLESPACE_NAME = DDF.TABLESPACE_NAME
    GROUP BY DFS.TABLESPACE_NAME, ddf.file_name, ddf.TOTAL_MB, ddf.TOTAL_MB;

    You need at least 100MB of free space on SYSTEM and SYSAUX tables spaces. If you do not have enough then run the following replacing the file_name and the RESIZE TOTAL_MB.
    ALTER DATABASE DATAFILE ” RESIZE 650M;

    You also need to create an APEX tablespace with a datafile of at least 250 MB (but I eventually took 350 MB) to hold the APEX schemas:
    CREATE TABLESPACE APEX datafile ‘’
    SIZE 350M
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;

    STEP 6.

    At this point everything can go pear shaped (it certainly did for me and a number of others) because when we are setting up the HTTP port for the Embedded PL/SQL Gateway (EPG), the procedure is supposed to write to tnsnames.ora and listener.ora but this did not happen for me (I cannot understand why but I did edit both those files manually in the database setup).

    That meant I had to mess around with init.ora, tnsnames.ora and listener.ora to get the connect to http://localhost:8080/apex.
    I decided to set up an ftp port as well to match some posts that had already done so (see http://www.liberidu.com/blog/?p=122 and http://forums.oracle.com/forums/thread.jspa?threadID=1106543&tstart=0&messageID=4464127). I used the command:

    EXEC DBMS_XDB.SETFTPport(2100);

    Then I tried to match the listener output of a successful install and get something like the following with the command lsnrctl status:
    When I eventually got it right the listener output looked like:

    LSNRCTL for MacOS X Server: Version 10.2.0.4.0 – Production on 05-AUG-2010 07:47:20

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    STATUS of the LISTENER
    ————————
    Alias LISTENER
    Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0 – Production
    Start Date 04-AUG-2010 20:01:47
    Uptime 0 days 11 hr. 45 min. 32 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    Listener Log File /Users/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2100))(Presentation=FTP)(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Services Summary…
    Service “PLSExtProc” has 1 instance(s).
    Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
    Service “orcl” has 2 instance(s).
    Instance “orcl”, status UNKNOWN, has 1 handler(s) for this service…
    Instance “orcl”, status READY, has 1 handler(s) for this service…
    Service “orclXDB” has 1 instance(s).
    Instance “orcl”, status READY, has 1 handler(s) for this service…
    Service “orcl_XPT” has 1 instance(s).
    Instance “orcl”, status READY, has 1 handler(s) for this service…
    The command completed successfully

    Note that under “Listening Endpoints Summary…” we have three listeners: one for HTTP, one for FTP and the last one for the database.
    Note also that we have a Service “orcl” where “orcl” is the SID of the Oracle database.
    Finally we have a Service called orclXBD which is the EPG HTTP server and we have a Service orcl_XPT (which I assume is the FTP server).

    To get there I had to make the following adjustments to listener.ora (shown in full – but I add all the “LISTENER =” details manually).
    Note that I had to specify three protocols-hosts-ports, one each for HTTP, FTP and the database

    # listener.ora Network Configuration File: /Users/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    )
    (SID_DESC =
    (SID_NAME = orcl)
    (ORACLE_HOME = /Users/oracle/oracle/product/10.2.0/db_1)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8080))(Presentation=HTTP)(Session=RAW)
    )
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2100))(Presentation=FTP)(Session=RAW)
    )
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )

    ~
    “listener.ora” 29L, 803C

    and I had to add the following lines to init.ora to define the HTTP service as orclXDB (i.e. XDB) and enable the local_listener (which I named MY_LISTENER) for multiple ports to be decoded:

    dispatchers=”(PROTOCOL=TCP)(SERVICE=orclXDB)”
    local_listener=MY_LISTENER

    and add the following MY_LISTENER details to pint to ports ion tnsnames.ora

    MY_LISTENER =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8080))(Presentation=HTTP)(Session=RAW)
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=2100))(Presentation=FTP)(Session=RAW)
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )

    The final blocking factor was that the browser got so used to failing on http://localhost:8080/apex that it failed (using its cache) even when things were correct.
    It was therefore better to use Finder and Go=>Connect to Server to test this link.

  • Paul says:

    Everything installed fine but http://localhost:8080/apex does not work and I followed the instructions to the letter without any errors?

    Can anyone shed any light on this?

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>