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

Posted in: Technical Track

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.

email

Interested in working with Alex? Schedule a tech call.

About the Author

What does it take to be chief technology officer at a company of technology experts? Experience. Imagination. Passion. Alex Gorbachev has all three. He’s played a key role in taking the company global, having set up Pythian’s Asia Pacific operations. Today, the CTO office is an incubator of new services and technologies – a mini-startup inside Pythian. Most recently, Alex built a Big Data Engineering services team and established a Data Science practice. Highly sought after for his deep expertise and interest in emerging trends, Alex routinely speaks at industry events as a member of the OakTable.

50 Comments. Leave new

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 –

Reply
Alex Gorbachev
April 16, 2009 5:38 pm

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?

Reply

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….

Reply

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

Reply
Alex Gorbachev
May 12, 2009 9:51 pm

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

Reply

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)))

Reply
Alex Gorbachev
May 14, 2009 3:24 am

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.

Reply

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.

Reply
Alex Gorbachev
May 17, 2009 8:59 pm

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).

Reply

Keep asking for XDB username and password…

Reply

After a reboot works, for now…
Thx

Reply
Alex Gorbachev
May 24, 2009 8:11 pm

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

Reply

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

Reply

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.

Reply

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

Reply

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

Reply
Alex Gorbachev
July 2, 2009 7:16 am

Thanks mate. Updated steps 5 & 6.

Reply

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

Reply
Alex Gorbachev
July 4, 2009 11:40 pm

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

Reply

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.

Reply
Alex Gorbachev
July 6, 2009 11:53 pm

@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;
/
Reply

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

Reply

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

Reply
Alex Gorbachev
July 9, 2009 10:11 pm

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

Reply

@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).

Reply

@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

Reply

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!

Reply

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.

Reply
Alex Gorbachev
August 27, 2009 9:43 pm

@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

Reply

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.

Reply

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.

Reply

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

Reply

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.

Reply

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.

Reply

Hi Cory,

I tried this but didn’t work for me. Am I missing something?

Thanks

Reply

Thanks for update Cory.

Reply

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?

Reply

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

Reply

Hi Hari,

have you found any solution to above problem?

Thanks

Reply

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?..

Reply
Alex Gorbachev
March 15, 2010 11:21 am

@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.

Reply

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

Reply

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

Reply
Peter de Vaal
June 24, 2010 3:01 am

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.

Reply
Alex Gorbachev
June 24, 2010 8:11 am

Thanks Peter – just updated the post to reflect this.

Since APEX Listener requires Tomcat, you would need to install that.

Reply

Good post!
Thanks

Reply

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.

Reply

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?

Reply
Alex Gorbachev
October 18, 2010 2:10 pm

Paul, if you can clarify exactly what do you mean by “http://localhost:8080/apex does not work” then it might be easier to help. Does anything bind to port 8080?

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *