Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Problem with APEX and PL/SQL Gateway

This is embarrassing but .. I installed APEX a few years ago and setup an application to work with the PL/SQL gateway. I haven't touched it in a couple of years but now have a need to do some work on it. But when I try to navigate to the development URL (localhost:8080/pub/pls/myapp), first I get asked for a username and password. I supply the username and password for the database account that was used in the DAD configuration and I can proceed, but I just get a Page Not Found error (even with a simple PL/SQL page that has no possibility of running into issues).
Is there something I need to do to get the instance or workspace to start handling requests? I haven't used APEX in so long I just can't remember.
Best Answers
-
I don't think that there are any log files: the EPG is handled entirely within the database.
This page has some more information on the dbms_epg package and how to get dad information out of it.
'/pub/pls/gator/' should be the base URL for your calls, your dad configuration will tell you which package will be called as the 'default page' when you call that URL e.g. if 'default_page' is 'apex', then '/pub/pls/gator/' should change to '/pub/pls/gator/apex'
Assuming that you've been successfully using the EPG in the past, I would expect '/pub/pls/gator/apex' to connect your APEX installation.
-
Carsten Czarski-Oracle Consulting Member of technical Staff Munich, GermanyMember Posts: 1,345 Employee
Hi,
just a heads-up.
As EPG is desupported with APEX 21.1 and above, it's a good time to start thinking about the move to ORDS, which is now the only supported web listener for APEX.
Best regards
-Carsten
Answers
-
Check that your APEX_PUBLIC_USER user password hasn't expired and matches that defined in your dads.conf file. Also check that the the URL you've mentioned matches the location in your dads.conf.
It's possible that you've got XDB running in the database and that this prevented Apache from starting on port 8080. You can turn off XDB with:
EXEC DBMS_XDB.SETHTTPPORT(0);
-
Turning off XDB did make a difference. I am no longer prompted for a username/password when requesting a PL/SQL page, and instead of the Page Not Found error I am now getting "Hmm... can't reach this page (localhost refused to connect)".
I did want to check my dads.conf file to confirm the settings, but what is strange is that I did a complete scan of both of my hard drives and there is no dads.conf file on my computer. Maybe my installation of APEX had gotten damaged over time.
If I log into my target database (using system) and run epgstat both the APEX DAD and my application's DAD are listed. The Auth Scheme for the APEX DAD is Anonymous and the Auth Scheme for my application's DAD is Dynamic Restricted. The Status of the ANONYMOUS database user is OPEN. Allow repository to anonymous access is showing as false.
-
You mentioned PL/SQL gateway which is why I suggested looking for the dads.conf file - it would usually be in you Apache conf directory.
However, are you using Apache or are you using the database Embedded PL/SQL Gateway (EPG)? If the EPG, that does use the Oracle XML DB Protocol Server (XDB). You would enable that with:
EXEC DBMS_XDB.SETHTTPPORT(8080);
You should then be able to access static files e.g. http://localhost:8080/i/apex_version.txt
If that works you'll need to remember how you configured the EPG: dbms_epg.get_dad_list will show what DADs are configured and dbms_epg.get_all_dad_attributes will tell you how a DAD is configured.
-
Thanks Andy. Sorry I wasn't clear about EPG. I reset the port to 8080, and I can access static files as in your example.
My memory is starting to come back. I can recall using the dbms_epg procedures to set things up in the past. I found the path associated with my DAD using dbms_epg.get_all_dad_mappings, which is '/pub/pls/gator/' but I still get the Page Not Found error. I checked my PL/SQL package and it compiles error-free.
Maybe I can find a log file somewhere that show what is going on.
-
I don't think that there are any log files: the EPG is handled entirely within the database.
This page has some more information on the dbms_epg package and how to get dad information out of it.
'/pub/pls/gator/' should be the base URL for your calls, your dad configuration will tell you which package will be called as the 'default page' when you call that URL e.g. if 'default_page' is 'apex', then '/pub/pls/gator/' should change to '/pub/pls/gator/apex'
Assuming that you've been successfully using the EPG in the past, I would expect '/pub/pls/gator/apex' to connect your APEX installation.
-
Carsten Czarski-Oracle Consulting Member of technical Staff Munich, GermanyMember Posts: 1,345 Employee
Hi,
just a heads-up.
As EPG is desupported with APEX 21.1 and above, it's a good time to start thinking about the move to ORDS, which is now the only supported web listener for APEX.
Best regards
-Carsten
-
Thanks for your help. Probably best at this point would be to start over with the latest APEX and moving to ORDS.