Resetting the ORDS_PUBLIC_USER password for APEX 22 and ORDS 22
I recently installed Oracle APEX Release 22.1 and Oracle REST Data Services 22.2 (installation instructions here). All was working fine, but two days later when we navigated to the web console at http://hostname:8080/ords
we received the following exception:
Specifically, it says:
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
Solution
1. Shutdown Tomcat:
cd /u01/oracle/products/apache-tomcat-8.5.78/bin
./shutdown.sh
2. Unlock and reset the ORDS_PUBLIC_USER database account:
ALTER USER ords_public_user IDENTIFIED BY "welcome1" ACCOUNT UNLOCK;
3. Reset the password using the ORDS configuration tool:
cd /u01/oracle/products/ords
java -jar ords.war config --db-pool default secret db.password
The prompts will display as follows:
oracle@hostname:/u01/oracle/products/ords> java -jar ords.war config --db-pool default secret db.password
Warning: Support for executing: java -jar ords.war has been deprecated.
Please add ords to your PATH and use the ords command instead.
Run the following command to add ords to your PATH:
echo -e 'export PATH="$PATH:/u01/oracle/products/ords/bin"' >> ~/.bash_profile
Start a new shell to pick up this change.
2022-07-15T13:20:59.734Z INFO Your configuration folder /u01/oracle/products/ords is located in ORDS product folder. Oracle recommends to use a different configuration folder.
ORDS: Release 22.2 Production on Fri Jul 15 09:21:00 2022
Copyright (c) 2010, 2022, Oracle.
Configuration:
/u01/oracle/products/ords/
Enter the database password:
Confirm password:
The setting named: db.password was set to: ****** in configuration: default
Keep in mind that the ORDS connection pool is located here for the default pool:
/u01/oracle/products/ords/databases/default/pool.xml
The password is stored in a wallet located here:
/u01/oracle/products/ords/databases/default/wallet/cwallet.sso
4. Startup Tomcat:
cd /u01/oracle/products/apache-tomcat-8.5.78/bin
./shutdown.sh
Now you should be able to navigate to the web console at http://hostname:8080/ords
and life is good.