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
ORDS 3.0.5 get 404 on APEX RESTful web services, but APEX works fine

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.
Best 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.
Answers
-
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.