After an ORDS upgrade an APEX application stopped displaying any images from its uploaded static files. If you attempted to view the image directly you’d get an HTTP 404 error.
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
The error was due to an undocumented JDBC setting in the ORDS configuration files for versions 18-19.2. If ORDS is using JDBC connections with a customURL, then you must include the following additional setting in your configuration.
<entry key="jdbc.connectionFactory">default</entry>
I initially found references to the feature in the Oracle forums. Later I found supporting documentation and explanation in MOS Doc 2568071.1.
I’m surprised this setting isn’t mentioned in either the ORDS or APEX Installation guides. If it’s not going to be documented, then maybe it could be defaulted when the custom url setting uses jdbc:oracle:thin because then it will know it’s going to connect to an Oracle database and can try the default factory.
I was shocked when my upgrade produced the error and was extremely frustrated as I futilely retraced my steps and scanned the install guide and release notes for what I could have done wrong. Hopefully this article will save others some time and effort.
EDIT: This functionality is due to Bug 30072487 (unpublished) also noted in published Bug 29812270. It is corrected in ORDS 19.4.
In my experience the problem is resolved by validating the installation of ORDS, even after a ‘successful’ upgrade of ORDS to 18.3:
(make sure you read in the documentation the right arguments to the validate function, the following example is specific to my install and does not mean the database is called ‘apex’).
cd /var/lib/tomcat/webapps
java -jar ords.war validate –database apex
Requires SYS AS SYSDBA to verify Oracle REST Data Services schema.
Enter the database password for SYS AS SYSDBA:
Confirm password:
Retrieving information.
Oracle REST Data Services will be validated.
Validating Oracle REST Data Services schema version 18.3.0.r2701456
… Log file written to /root/ords_validate_core_2019-04-26_203740_00175.log
Completed validating Oracle REST Data Services version 18.3.0.r2701456. Elapsed time: 00:00:08.26
I not only validated, I completely removed and reinstalled and revalidated to make sure I didn’t have any missing steps.
No – in this case, the Oracle Support document exactly described the problem and the fix.
I’m curious though, if you did not have to add the JDBC setting… did you have customURL connections? If not, then the MOS doc doesn’t apply as it did for me.
You are using the productive ORDS 19.4 on Tomcat? Write that it has problems with stability?
https://community.oracle.com/thread/4309023?start=15&tstart=0
No, my article was about using using ORDS 19.2, in my case I was using Weblogic, not Tomcat.
I believe the connection factory problem would have been present in standalone mode as well but did not test it.
Thanks a lot! This helped me, and right “java -jar ords.war validate –database apex” does it not.
I’m glad it helped. Thanks for reading!
Thank you for sharing this. It saved me a huge amount of time. Faced the same issue after switching to a customer url.
Thanks this resolved my issue after spending many days trying to get an apex app using a css file for rendering in the browser. All I was getting is 404 resource not avalable. Validating the ords install apex install physically copying files to apex workspace or file system and thereafter changing substution strings did not work either. ORDs is not documented very well and is not really integrated with WLS J2EE…runs very much in it’ts own sandbox envirinment