Forum Stats

  • 3,770,153 Users
  • 2,253,079 Discussions
  • 7,875,349 Comments

Discussions

Problem with APEX and PL/SQL Gateway

User_0ZK6U
User_0ZK6U Member Posts: 11 Green Ribbon

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.

Tagged:

Best Answers

  • AndyH
    AndyH Member Posts: 749 Bronze Trophy
    Accepted Answer

    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
    Carsten Czarski-Oracle Member Posts: 1,257 Employee
    Accepted Answer

    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

  • AndyH
    AndyH Member Posts: 749 Bronze Trophy

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


  • User_0ZK6U
    User_0ZK6U Member Posts: 11 Green Ribbon

    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.

  • AndyH
    AndyH Member Posts: 749 Bronze Trophy

    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.

  • User_0ZK6U
    User_0ZK6U Member Posts: 11 Green Ribbon

    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.

  • AndyH
    AndyH Member Posts: 749 Bronze Trophy
    Accepted Answer

    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
    Carsten Czarski-Oracle Member Posts: 1,257 Employee
    Accepted Answer

    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

  • User_0ZK6U
    User_0ZK6U Member Posts: 11 Green Ribbon

    Thanks for your help. Probably best at this point would be to start over with the latest APEX and moving to ORDS.