Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Unable to load APEX and SQL Developer Web Applications with ORDS 23.2.1 and APEX 22.2 on Oracle Database 21c

475068Jul 27 2023

Hello everyone,

In the past, I've completed numerous APEX/ORDS installations, but only up to version 21. However, I'm facing a new challenge now as I'm configuring ORDS 23.2.1 for the first time. I suspect that I might have made a simple mistake, and I apologize for any inconvenience caused. Nevertheless, I could use another set of eyes to review my ORDS configuration.

Here's what I've done so far: I successfully installed and configured APEX 22.2 and ORDS 23.2.1 in Oracle Database 21c within a PDB. The installation process went smoothly without any errors or issues. The necessary database accounts are all in the "OPEN" status and are neither locked nor expired. I have also created the demo schema and enabled Rest Services. For deploying ORDS, I chose Tomcat 9.0.78 and configured it to read from the ORDS_CONFIG directory using JAVA_OPTS=-Dconfig.url=/u01/ords/config. I even attempted running ORDS standalone (ords --debug serve), but the result was the same.

The problem I'm facing is that when I try to access the /ords endpoint, it takes an excessively long time, and eventually, it opens the landing ORDS page, which indicates that both SQL Developer Web and APEX Apps are unavailable.

I appreciate any assistance you can offer in identifying and resolving the issue. Thank you for your time and help.

Example: https://my-domain.com:8443/ords/_/landing

If I explicitly navigate to the SQL Developer URL, I do get the login prompt immediately.

# Tomcat log
INFO [https-jsse-nio-172.31.16.185-8443-exec-5] oracle.dbtools.common.logging.JDKLogSink.record <vzVqHDoNyTnWDNs-cHgTfA> NodeMapping schemaless request for path: /sql-developer

But, despite providing the correct credentials I get invalid credentials. I've tried with and without the database mapping path and the schema alias without success. Tomcat's log is clean when I am trying to sign in and no errors or info messages were written.

https://my-domain.com:8443/ords/sql-developer

When I try to access the APEX Admin page I get 404 and again, Tomcat's log is clean.

https://my-domain.com:8443/ords/apex_admin

Here is my configuration:

# ORDS Config

# DB_DOMAIN is empty string inside the CATPDB1 and so does the db.serviceNameSuffix in ORDS config.

SQL> show parameters db_domain
NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
db_domain                 string

# Tomcat log

INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.78
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 4 2023 13:15:43 UTC
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.78.0
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1.34-59.116.amzn2023.x86_64
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /u01/java/jdk-11.0.19+7
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.19+7
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Eclipse Adoptium
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /u01/tomcat
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /u01/tomcat
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/u01/tomcat/conf/logging.properties
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dconfig.url=/u01/ords/config
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/u01/tomcat
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/u01/tomcat
INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/u01/tomcat/temp
INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/u01/instantclient_21_10:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-172.31.16.185-8443"]
INFO [main] org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector [https-jsse-nio-172.31.16.185-8443], TLS virtual host [_default_], certificate type [UNDEFINED] configured from keystore [/u01/tomcat/pem/my-domain.com.jks] using alias [tomcat] with trust store [null]
INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [884] milliseconds
INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.78]
INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/u01/tomcat/webapps/ords.war]
INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
INFO [main] oracle.dbtools.common.logging.JDKLogSink.record Oracle REST Data Services initialized
Oracle REST Data Services version : 23.2.1.r2001208
Oracle REST Data Services server info: Apache Tomcat/9.0.78
Oracle REST Data Services java info: OpenJDK 64-Bit Server VM 11.0.19+7

INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/u01/tomcat/webapps/ords.war] has finished in [3,354] ms
INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/u01/tomcat/webapps/i]
INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/u01/tomcat/webapps/i] has finished in [31] ms
INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-172.31.16.185-8443"]
INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [3489] milliseconds

# The demo schema

All statements executed succesfully and no errors were reported.

create user demo identified by *****;
grant connect, resource, alter session to demo;
grant execute on dbms_crypto to demo;
grant create table, create procedure, create tablespace, create materialized view to demo;
grant unlimited tablespace to demo;
grant select_catalog_role to demo;
grant all privileges to demo; 
grant gsmadmin_role to demo; 
grant dba to demo;

GRANT SODA_APP TO demo;
grant inherit privileges on user SYS to ORDS_METADATA;

BEGIN
    ORDS.ENABLE_SCHEMA(p_enabled => TRUE,
                       p_schema => 'DEMO',
                       p_url_mapping_type => 'BASE_PATH',
                       p_url_mapping_pattern => 'dm',
                       p_auto_rest_auth => FALSE);
    commit;
END;
/

# Status of the ORDS and APEX accounts

$ ords --debug serve

CWD=/u01/ords
ORDS_HOME=/u01/ords
/u01/java/jdk-11.0.19+7/bin/java -Doracle.dbtools.cmdline.home=/u01/ords -Duser.language=en -Duser.region=US -Dfile.encoding=UTF8 -Djava.awt.headless=true -Dnashorn.args=--no-deprecation-warning -Doracle.dbtools.cmdline.ShellCommand=ords -Duser.timezone=UTC -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 -jar /u01/ords/ords.war --verbose serve
Listening for transport dt_socket at address: 8000

ORDS: Release 23.2 Production on Thu Jul 27 14:32:47 2023

Copyright (c) 2010, 2023, Oracle.

Configuration:
/u01/ords_config/

2023-07-27T14:32:47.955Z INFO HTTP and HTTP/2 cleartext listening on host: 0.0.0.0 port: 8080
2023-07-27T14:32:47.993Z INFO Disabling document root because the specified folder does not exist: /u01/ords_config/global/doc_root
2023-07-27T14:32:47.994Z INFO Default forwarding from / to contextRoot configured.
2023-07-27T14:32:48.131Z INFO Oracle API for MongoDB listening on port: 27017
2023-07-27T14:32:48.131Z INFO The Oracle API for MongoDB connection string is:
mongodb://[{user}:{password}@]localhost:27017/{user}?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true
2023-07-27T14:32:52.852Z INFO Configuration properties for: |default|lo|

db.servicename=CAT1PDB
awt.toolkit=sun.awt.X11.XToolkit
db.serviceNameSuffix=
java.specification.version=11
conf.use.wallet=true
sun.cpu.isalist=
sun.jnu.encoding=UTF-8
user.region=US
standalone.static.context.path=/i
java.class.path=/u01/ords/ords.war
java.vm.vendor=Eclipse Adoptium
sun.arch.data.model=64
standalone.static.path=/u01/apex/images
nashorn.args=--no-deprecation-warning
mongo.enabled=true
java.vendor.url=https://adoptium.net/
resource.templates.enabled=false
user.timezone=UTC
db.port=22000
java.vm.specification.version=11
os.name=Linux
sun.java.launcher=SUN_STANDARD
sun.boot.library.path=/u01/java/jdk-11.0.19+7/lib
sun.java.command=/u01/ords/ords.war --verbose serve
jdk.debug=release
sun.cpu.endian=little
user.home=/home/ec2-user
oracle.dbtools.launcher.executable.jar.path=/u01/ords/ords.war
user.language=en
java.specification.vendor=Oracle Corporation
java.version.date=2023-04-18
database.api.enabled=true
java.home=/u01/java/jdk-11.0.19+7
db.username=ORDS_PUBLIC_USER
file.separator=/
java.vm.compressedOopsMode=Zero based
line.separator=

restEnabledSql.active=true
java.specification.name=Java Platform API Specification
java.vm.specification.vendor=Oracle Corporation
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
feature.sdw=true
java.awt.headless=true
standalone.context.path=/ords
db.hostname=localhost
db.password=******
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
security.requestValidationFunction=ords_util.authorize_plsql_gateway
java.runtime.version=11.0.19+7
user.name=ec2-user
path.separator=:
standalone.http.port=8080
os.version=6.1.34-59.116.amzn2023.x86_64
java.runtime.name=OpenJDK Runtime Environment
file.encoding=UTF8
plsql.gateway.mode=proxied
java.vm.name=OpenJDK 64-Bit Server VM
java.vendor.version=Temurin-11.0.19+7
standalone.doc.root=/u01/ords_config/global/doc_root
java.vendor.url.bug=https://github.com/adoptium/adoptium-support/issues
java.io.tmpdir=/tmp
oracle.dbtools.cmdline.ShellCommand=ords
java.version=11.0.19
user.dir=/u01/ords
os.arch=amd64
java.vm.specification.name=Java Virtual Machine Specification
java.awt.printerjob=sun.print.PSPrinterJob
oracle.dbtools.cmdline.home=/u01/ords
sun.os.patch.level=unknown
java.library.path=/u01/instantclient_21_10:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.vendor=Eclipse Adoptium
java.vm.info=mixed mode
java.vm.version=11.0.19+7
sun.io.unicode.encoding=UnicodeLittle
db.connectionType=basic
java.class.version=55.0

2023-07-27T14:32:52.854Z WARNING *** jdbc.MaxLimit in configuration |default|lo| is using a value of 20, this setting may not be sized adequately for a production environment ***
2023-07-27T14:32:52.854Z WARNING *** jdbc.InitialLimit in configuration |default|lo| is using a value of 3, this setting may not be sized adequately for a production environment ***

Thank you,

Lazar

Comments

Post Details

Added on Jul 27 2023
12 comments
748 views