Forum Stats

  • 3,768,508 Users
  • 2,252,800 Discussions
  • 7,874,600 Comments

Discussions

ORDS 3.0.5 get 404 on APEX RESTful web services, but APEX works fine

bpoarnet
bpoarnet Member Posts: 14

Hi,

We have been running APEX for a number of years and have had APEX 5.0.2 and ORDS 3.0.3 installed for a couple of months with no problems.

Recently, I installed APEX 5.0.3 and ORDS 3.0.5 into the PDB on a new 12c RAC cluster.  APEX works just fine, but any RESTful web service I try to run returns a 404 Not Found.

The environment is:

     WebLogic 12.2.1.0.0

     DB 12.1.0.2 (RAC)

     APEX 5.0.3

     ORDS 3.0.5  (instance deployed as "apexprod")

I believe the DB users are all installed and set up (I ran apex_rest_config.sql) and when ORDS starts up, it logs:

Jun 09, 2016 5:35:55 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Validating pool: |apex||

Jun 09, 2016 5:35:56 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Pool: |apex|| is correctly configured

Jun 09, 2016 5:35:56 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Validating pool: |apex|al|

Jun 09, 2016 5:35:56 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Pool: |apex|al| is correctly configured

Jun 09, 2016 5:35:56 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Validating pool: |apex|pu|

Jun 09, 2016 5:35:57 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Pool: |apex|pu| is correctly configured

Jun 09, 2016 5:35:57 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Validating pool: |apex|rt|

Jun 09, 2016 5:35:57 PM oracle.dbtools.common.config.db.DatabasePools validatePool

INFO: Pool: |apex|rt| is correctly configured

With debugging turned on, ORDS prints this on the error page:

404  Not Found
The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured


Debug Trace
[TE] url-mapping start: 2016-06-09T21:36:37.469Z duration: 11ms
[TE] GET /apexprod/ejc/cache_cover_image?date=all    start: 2016-06-09T21:36:37.469Z    duration: 11ms
[TE] url-mapping    start: 2016-06-09T21:36:37.482Z duration: 8ms



Stack Trace
URLMappingNotFoundException [statusCode=404, reasons=[The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured]]
        at oracle.dbtools.url.mapping.filter.URLMappingFilter.doFilter(URLMappingFilter.java:78)
        at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)
        at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
        at oracle.dbtools.http.locale.LocaleFilter.doFilter(LocaleFilter.java:59)
        at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)
        at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
        ...



The url-mapping.xml file contains (NOTE: I know this file may not be necessary.  The error is the same with or without this  file):

<?xml version="1.0" encoding="UTF-8"?>
<pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">
<pool name="apex" base-path="/ejc" workspace-id="EJCSEARCH" updated="2016-06-09T18:58:26.704Z"/>
</pool-config>




That workspace exists and has the RWS deployed in it.

Just as another, possibly unrelated data point.  We also have three environments running ORDS 3.0.2 with no problems.  I recently tried to upgrade one of them to ORDS 3.0.5 and got the same RWS problem.  When I reverted back to 3.0.2, everything worked fine again.

Thanks for any suggestions!  This has me completely baffled.

Kiran PawaronlygeckoHawk333

Best Answer

  • bpoarnet
    bpoarnet Member Posts: 14
    edited Jun 14, 2016 2:15PM Accepted Answer

    It would seem that ORDS 3.0.5 requires a new column in the table, ords_metadata.apex_pool_config called "pool_name".  This column did not get added during the install for some reason.

    After I ran "java -jar ordsname.war validate", the new column got created and this error went away.

    Note that there is also a poorly documented change in ORDS 3.0.5 where it REQUIRES the "URI Prefix" to have a value for user-defined RWS within APEX.  This change breaks consumer compatibility with existing services where that value was left balnk.  It should be better documented.  Do not upgrade to 3.0.5 if you have critical RWS with blank "URI Prefix" values that are consumed by external entities, and are not prepared to communicate the URL changes to them.

    Kiran PawaronlygeckoHawk333

Answers

  • bpoarnet
    bpoarnet Member Posts: 14
    edited Jun 14, 2016 2:15PM Accepted Answer

    It would seem that ORDS 3.0.5 requires a new column in the table, ords_metadata.apex_pool_config called "pool_name".  This column did not get added during the install for some reason.

    After I ran "java -jar ordsname.war validate", the new column got created and this error went away.

    Note that there is also a poorly documented change in ORDS 3.0.5 where it REQUIRES the "URI Prefix" to have a value for user-defined RWS within APEX.  This change breaks consumer compatibility with existing services where that value was left balnk.  It should be better documented.  Do not upgrade to 3.0.5 if you have critical RWS with blank "URI Prefix" values that are consumed by external entities, and are not prepared to communicate the URL changes to them.

    Kiran PawaronlygeckoHawk333
This discussion has been closed.