Skip to Main Content

APEX

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!

Help getting Apex, ords, and Tomcat working on Windows 10

MikeT1492Sep 6 2019 — edited Sep 9 2019

****Moderator action (Timo) obfuscated all visible passwords! User, don't post such sensible information on any public-facing forum!***

Dear all,

I'm having trouble getting Apex 19 running locally on my Windows 10 machine using:

  • Tomcat 9
  • Oracle XE 18c
  • ords - 19.2.0.199.1647

I've spent 6 solid working days on this installing and reinstalling but cannot get beyond a 404 error for localhost:8080/ords/

I have tried following both the official oracle documentation (which seems to be full of errors or text applicable to old versions) as well as various blog posts from people who have installed this setup successfully.

I would be very grateful to anyone who can offer any suggestions of where I might look for the issue. A common response to this query is that the passwords are wrong - I have used oracle as the password through and copied and pasted this in, so the passwords are all correct.

The steps I have taken below (please note I have replaced any text that is personal with ....).

Oracle XE 18c has been installed and the tnsnames.ora file amended to add the default XEPDB1 service, so can connect with the following:

sqlplus sys/*****@xepdb1 as sysdba;

I've then run the following:

-- Create an Apex tablespace

CREATE TABLESPACE APEX_TS dataFILE 'C:\....\product\18.0.0\oradata\XE\XEPDB1\APEX_TS.dbf' SIZE 4000M extent management local segment space management auto;

-- Install Apex - the following statements runs to completion with success, where prompted setting all passwords to oracle

@apexins APEX_TS APEX_TS temp /i/

@apex_rest_config.sql

-- Create the Apex admin

begin
apex_util.set_security_group_id( 10 );

apex_util.create_user(

p_user_name => 'ADMIN',

p_email_address => '<<my email address removed from here for this plea for help!!>>',

p_web_password => '*****',

p_developer_privs => 'ADMIN' );

apex_util.set_security_group_id( null );

commit;

end;

/

-- Commit everything

Commit;

I've then installed Tomcat9 on port 8080 and the following URL comes up fine:

http://localhost:8080/

Checking the Tomcat9 configuration, I'm using this JRE:

C:\Program Files\Java\jre1.8.0_221\bin\server\jvm.dll

And double checking the Java version:

C:\Users\....>java -version

      java version "1.8.0\_221"

      Java(TM) SE Runtime Environment (build 1.8.0\_221-b11)

      Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

I've then installed ords using the following commands:

C:\Users\admn1393\Oracle_Downloads\ords-19.2.0.199.1647>java -jar ords.war

      This Oracle REST Data Services instance has not yet been configured.

      Please complete the following prompts

      Enter the location to store configuration data: ords\_install

      Enter the name of the database server \[localhost\]:

      Enter the database listen port \[1521\]:

      Enter 1 to specify the database service name, or 2 to specify the database SID \[1\]:

      Enter the database service name:XEPDB1

      Enter the database password for ORDS\_PUBLIC\_USER:

      Confirm password:

      Requires to login with administrator privileges to verify Oracle REST Data Services schema.

      Enter the administrator username:sys as sysdba

      Enter the database password for sys as sysdba:

      Confirm password:

      Retrieving information.

      Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.

      If using Oracle Application Express or migrating from mod\_plsql then you must enter 1 \[1\]:1

      Enter the database password for APEX\_PUBLIC\_USER:

      Confirm password:

      Enter 1 to specify passwords for Application Express RESTful Services database users (APEX\_LISTENER, APEX\_REST\_PUBLIC\_USER) or 2 to skip this step \[1\]:1

      Enter the database password for APEX\_LISTENER:

      Confirm password:

      Enter the database password for APEX\_REST\_PUBLIC\_USER:

      Confirm password:

      Sep 06, 2019 12:44:34 PM

      INFO: reloaded pools: \[\]

      Installing Oracle REST Data Services version 19.2.0.r1991647

      ... Log file written to C:\\Users\\....\\ords\_install\_core\_2019-09-06\_124434\_00488.log

      ... Verified database prerequisites

      ... Created Oracle REST Data Services proxy user

      ... Created Oracle REST Data Services schema

      ... Granted privileges to Oracle REST Data Services

      ... Created Oracle REST Data Services database objects

      ... Log file written to C:\\Users\\....\\ords\_install\_datamodel\_2019-09-06\_124449\_00832.log

      ... Log file written to C:\\Users\\....\\ords\_install\_apex\_2019-09-06\_124451\_00337.log

      Completed installation for Oracle REST Data Services version 19.2.0.r1991647. Elapsed time: 00:00:18.486

      Enter 1 if you wish to start in standalone mode or 2 to exit \[1\]:2

C:\Users\....\Oracle_Downloads\ords-19.2.0.199.1647>

So, next I check the accounts are all created correctly:

select username

, account_status

, profile
,authentication_type

,common

,last_login

,oracle_maintained

,inherited

from dba_users

where username like 'APEX%'
or username like 'ORDS%'
or username = 'FLOWS_FILES'
order by account_status, username;

USERNAME ACCOUNT_STATUS

------------------------------------------------- -----------------------------

ORDSYS EXPIRED & LOCKED

ORDS_METADATA EXPIRED & LOCKED

APEX_190100 LOCKED

FLOWS_FILES LOCKED

APEX_INSTANCE_ADMIN_USER OPEN

APEX_LISTENER OPEN

APEX_PUBLIC_USER OPEN

APEX_REST_PUBLIC_USER OPEN

ORDS_PUBLIC_USER OPEN

I've then amended the ords_params.properties file to change the schema.tablespace.default=APEX_TS, so the file now looks like this:

#fri Sep 06 12:44:56 BST 2019

db.hostname=localhost

db.password=@********

db.port=1521

db.servicename=XEPDB1

db.username=APEX_PUBLIC_USER

migrate.apex.rest=false

plsql.gateway.add=true

rest.services.apex.add=true

rest.services.ords.add=true

schema.tablespace.default=APEX_TS

schema.tablespace.temp=TEMP

standalone.http.port=8080

standalone.mode=false

user.apex.listener.password=@*******************

user.apex.restpublic.password=@**************

user.public.password=@************************

user.tablespace.default=USERS

user.tablespace.temp=TEMP

Checking the newly created ords_install directory, I can see the following files exist and their content looks correct:

defaults.xml:

      \<?xml version="1.0" encoding="UTF-8"?>

      \<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">

      -\<properties>

      \<comment>Saved on Fri Sep 06 12:44:34 BST 2019\</comment>

      \<entry key="db.hostname">localhost\</entry>

      \<entry key="db.port">1521\</entry>

      \<entry key="db.servicename">XEPDB1\</entry>

      \<entry key="security.requestValidationFunction">wwv\_flow\_epg\_include\_modules.authorize\</entry>

      \<entry key="security.validationFunctionType">plsql\</entry>

      \</properties>

apex.xml:

      \<?xml version="1.0" encoding="UTF-8"?>

      \<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">

      -\<properties>

      \<comment>Saved on Fri Sep 06 12:44:34 BST 2019\</comment>

      \<entry key="db.password">@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\</entry>

      \<entry key="db.username">APEX\_PUBLIC\_USER\</entry>

      \</properties>

apex_al.xml:

      \<?xml version="1.0" encoding="UTF-8"?>

      \<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">

      -\<properties>

      \<comment>Saved on Fri Sep 06 12:44:34 BST 2019\</comment>

      \<entry key="db.password">@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\</entry>

      \<entry key="db.username">APEX\_LISTENER\</entry>

      \</properties>

apex_pu.xml:

      \<?xml version="1.0" encoding="UTF-8"?>

      \<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">

      -\<properties>

      \<comment>Saved on Fri Sep 06 12:44:34 BST 2019\</comment>

      \<entry key="db.password">@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\</entry>

      \<entry key="db.username">ORDS\_PUBLIC\_USER\</entry>

      \</properties>

apex_rt:

      \<?xml version="1.0" encoding="UTF-8"?>

      \<!DOCTYPE properties SYSTEM "[http://java.sun.com/dtd/properties.dtd](http://java.sun.com/dtd/properties.dtd)">

      -\<properties>

      \<comment>Saved on Fri Sep 06 12:44:34 BST 2019\</comment>

      \<entry key="db.password">@\*\*\*\*\*\*\*\*\*\*\*\*\*\*\</entry>

      \<entry key="db.username">APEX\_REST\_PUBLIC\_USER\</entry>

      \</properties>

Just to be doubly certain, I've then run the ords validate command as follows:

C:\Users\admn1393\Oracle_Downloads\ords-19.2.0.199.1647>java -jar ords.war validate -database apex

      Requires to login with administrator privileges to verify Oracle REST Data Services schema.

      Enter the administrator username:sys as sysdba

      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 19.2.0.r1991647

      ... Log file written to C:\\Users\\....\\ords\_validate\_core\_2019-09-06\_130435\_00803.log

      Completed validating Oracle REST Data Services version 19.2.0.r1991647.  Elapsed time: 00:00:03.266

The content of the logfile is as follows:

[*** script: ords_alter_session_script.sql]

PL/SQL procedure successfully completed.

[*** script: ords_version.sql]

Session altered.

PL/SQL procedure successfully completed.

[*** script: ords_schema_mapping.sql]

INFO: Configuring ORDS_PUBLIC_USER to map APEX Workspaces and ORDS schemas

Session altered.

Configuring APEX and ORDS schemas for url mapping

Made APEX_PUBLIC_USER proxiable from ORDS_PUBLIC_USER

Made APEX_REST_PUBLIC_USER proxiable from ORDS_PUBLIC_USER

APEX 19.1.0.00.15 is installed and APEX_LISTENER schema exists

APEX_LISTENER.POOL_CONFIG synonym exists

Created ORDS_METADATA.APEX_WWV_FLOW_POOL_CONFIG as view over

APEX_190100.WWV_FLOW_POOL_CONFIG and ORDS_METADATA.APEX_SCHEMAS

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Grant succeeded.

PL/SQL procedure successfully completed.

INFO: Completed configuring ORDS_PUBLIC_USER to map APEX Workspaces and ORDS Schemas

Session altered.

[*** script: ords_repair_proxy_connect.sql]

INFO: Checking ords enabled schemas and its proxy user

Session altered.

PL/SQL procedure successfully completed.

[*** script: ords_migrate_grant_priv.sql]

Session altered.

INFO: Verify if Application Express exists to setup the migration privileges for

ORDS.

INFO: Completed setting up the APEX REST migration privileges for ORDS.

PL/SQL procedure successfully completed.

[*** script: ords_validate_objects.sql]

Session altered.

INFO: 13:04:38 Validating objects for Oracle REST Data Services.

VALIDATION: 13:04:38 Starting validation for schema: ORDS_METADATA

VALIDATION: 13:04:38 Validating objects

VALIDATION: 13:04:38 Validating ORDS Public Synonyms

VALIDATION: 13:04:38 Total objects: 267, invalid objects: 0

VALIDATION: 13:04:38 72 INDEX

VALIDATION: 13:04:38 3 LOB

VALIDATION: 13:04:38 12 PACKAGE

VALIDATION: 13:04:38 12 PACKAGE BODY

VALIDATION: 13:04:38 1 PROCEDURE

VALIDATION: 13:04:38 44 PUBLIC SYNONYM

VALIDATION: 13:04:38 1 SEQUENCE

VALIDATION: 13:04:38 14 SYNONYM

VALIDATION: 13:04:38 27 TABLE

VALIDATION: 13:04:38 27 TRIGGER

VALIDATION: 13:04:38 20 TYPE

VALIDATION: 13:04:38 6 TYPE BODY

VALIDATION: 13:04:38 28 VIEW

VALIDATION: 13:04:38 Validation completed.

INFO: 13:04:38 Completed validating objects for Oracle REST Data Services.

PL/SQL procedure successfully completed.

Session altered.

Commit complete.

[*** script: ords_alter_session_script.sql]

PL/SQL procedure successfully completed

[*** script: ords_version.sql]

Session altered.

PL/SQL procedure successfully completed.

I've then copied the ords.war file to the Apache Tomcat webapps directory and the Apex images to a new directory i in the Tomcat webapps directory.

I've then stopped and started the Tomcat server and tried the following URLs:

localhost:8080/i/apex_version.txt - this page comes up fine and shows "Application Express Version: 19.1"

localhost:8080/ords/ - this page comes up with a 404 error as below

pastedImage_52.png

Many thanks in advance for any and all hep with this

Mike

Message was edited by: MikeT1492 Why have you not approved this message please? It is perfectly reasonable for me to remove the one small section of the path that would present a secrity risk if I included it in the post Many thanks

Comments
Post Details
Added on Sep 6 2019
1 comment
1,958 views