1 Reply Latest reply on Dec 13, 2017 2:58 PM by Timmi

    Tomcat HTTP Status 404 after ORDS update to 3.0.12.263.15.32

    Timmi

      Hi everybody,

      we are connecting to APEX 5.1.3.00.05 on Oracle 12.1.0.2.4 database via Tomcat 7.0.63 and ORDS 3.0.1.177.18.02 and faced a bug which seems to be fixed im ORDS 3.0.4, so I decided to update.

      To update I uninstalled ORDS 3.0.1 and installed 3.0.12, which worked well on DEV instance, but on TST instance catalina.out was filled up with messages "apex_pu/apex_rt/apex_al is not correctly configured". So I uninstalled,removed all config files and reinstalled:

       

      What I did:

      /opt/oracle/app/tomcat7/tstnew/webapps/$ java -jar apex.war uninstall (we would like to access ORDS as APEX)
      /opt/oracle/app/tomcat7/tstnew/webapps/$ rm -rf apex/
      /opt/oracle/app/tomcat7/tstnew/webapps/$ rm -rf params/
      /opt/oracle/app/tomcat7/tstnew/webapps/$ cp /opt/oracle/source/ords.3.0.12.263.15.32.zip .
      /opt/oracle/app/tomcat7/tstnew/webapps/$ unzip ords.3.0.12.263.15.32.zip
      /opt/oracle/app/tomcat7/tstnew/webapps/$ mv ords.war apex.war
      /opt/oracle/app/tomcat7/tstnew/webapps/$ java -jar apex.war install advanced
      This Oracle REST Data Services instance has not yet been configured.
      Please complete the following prompts
      
      Enter the location to store configuration data:/opt/oracle/app/tomcat7/tstnew/webapps
      Enter the name of the database server [localhost]:172.20.12.52
      Enter the database listen port [1521]:1523
      Enter 1 to specify the database service name, or 2 to specify the database SID [1]:2
      Enter the database SID [xe]:apxtst05
      Enter 1 if you want to verify/install Oracle REST Data Services schema or 2 to skip this step [1]:
      Enter the database password for ORDS_PUBLIC_USER:
      Confirm password:
      Please login with SYSDBA privileges to verify Oracle REST Data Services schema.
      
      Enter the username with SYSDBA privileges to verify the installation [SYS]:
      Enter the database password for SYS:
      Confirm password:
      Enter the default tablespace for ORDS_METADATA [SYSAUX]:
      Enter the temporary tablespace for ORDS_METADATA [TEMP]:
      Enter the default tablespace for ORDS_PUBLIC_USER [USERS]:
      Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:
      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]:
      Enter the PL/SQL Gateway database user name [APEX_PUBLIC_USER]:
      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]:
      Enter the database password for APEX_LISTENER:
      Confirm password:
      Enter the database password for APEX_REST_PUBLIC_USER:
      Confirm password:
      Dec 12, 2017 3:18:41 PM
      INFO: Updated configurations: defaults, apex, apex_pu, apex_al, apex_rt
      Installing Oracle REST Data Services version 3.0.12.263.15.32
      ... Log file written to /opt/oracle/app/tomcat7/tstnew/webapps/logs/ords_install_core_2017-12-12_151842_00091.log
      ... Verified database prerequisites
      ... Created Oracle REST Data Services schema
      ... Created Oracle REST Data Services proxy user
      ... Granted privileges to Oracle REST Data Services
      ... Created Oracle REST Data Services database objects
      ... Log file written to /opt/oracle/app/tomcat7/tstnew/webapps/logs/ords_install_datamodel_2017-12-12_151858_00871.log
      Completed installation for Oracle REST Data Services version 3.0.12.263.15.32. Elapsed time: 00:00:18.264
      
      Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2
      
      
      
      
      

       

      Now, when I restart Tomcat I am getting:

      tomcat404.PNG

      This is a Tomcat error and not from ORDS.

       

      Catalina.out:

      Dec 12, 2017 4:03:00 PM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive /opt/oracle/app/tomcat7/tstnew/webapps/apex.war
      Dec 12, 2017 4:03:01 PM org.apache.catalina.startup.TldConfig execute
      INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a compl
      ete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can impro
      ve startup time and JSP compilation time.
      Dec 12, 2017 4:03:01 PM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deployment of web application archive /opt/oracle/app/tomcat7/tstnew/webapps/apex.war has finished in 742 ms
      

       

      On DEV instance Tomcat checks the configured pools (apex, apex_pu, apex_al, apex_rt), but on TST it does not seem to recognize them.

      I have no idea.. Any suggestions?

       

      Regards,

      Tim

       

      PS: Catalina.out on DEV says:

      INFO: Deploying web application archive /opt/oracle/app/tomcat7/devnew/webapps/apex.war
      Dec 11, 2017 3:58:46 PM org.apache.catalina.startup.TldConfig execute
      INFO: 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.
      Dec 11, 2017 3:58:47 PM oracle.dbtools.common.config.db.DatabasePools validatePool
      INFO: Validating pool: apex
      Dec 11, 2017 3:58:48 PM oracle.dbtools.common.config.db.DatabasePools validatePool
      INFO: Pool: apex is correctly configured
      Dec 11, 2017 3:58:48 PM oracle.dbtools.common.config.db.DatabasePools validatePool
      INFO: Validating pool: apex_al
      Dec 11, 2017 3:58:48 PM oracle.dbtools.common.config.db.DatabasePools validatePool
      INFO: Pool: apex_al is correctly configured
      Dec 11, 2017 3:58:48 PM oracle.dbtools.common.config.db.DatabasePools validatePool
      INFO: Validating pool: apex_pu
      ...
      

       

      PPS: ORDS validation show no errors

      /opt/oracle/app/tomcat7/tstnew/webapps]# java -jar apex.war validate
      Enter the name of the database server [172.20.12.52]:
      Enter the database listen port [1523]:
      Enter the database SID [apxtst05]:
      Please login with SYSDBA privileges to verify Oracle REST Data Services schema.
      
      Enter the username with SYSDBA privileges to verify the installation [SYS]:
      Enter the database password for SYS:
      Confirm password:
      
      Oracle REST Data Services will be validated.
      Validating Oracle REST Data Services schema version 3.0.12.263.15.32
      ... Log file written to /opt/oracle/app/tomcat7/tstnew/webapps/logs/ords_validate_core_2017-12-12_164223_00359.log
      Completed validating Oracle REST Data Services version 3.0.12.263.15.32.  Elapsed time: 00:00:04.516
      
      
      
      
        • 1. Re: Tomcat HTTP Status 404 after ORDS update to 3.0.12.263.15.32
          Timmi

          Hi everybody,

          I found the error by myself.. The problem is the installation of ORDS from inside Tomcats appBase directory ('webapps').

          We moved ords.war to apex.war and installed ORDS with "java -jar apex.war install" which creates a directory "apex" with defaults.xml etc in it.

          When starting Tomcat, it looks for the WAR file and checks if it has to explode it (unpackWARs="true" in server.xml). Since there is already a subfolder called "apex" (from ORDS installation), Tomcat thinks the WAR file is already exploded and skips this step.

          Due to this, there is no web.xml etc for application to be run which leads to the HTTP 404 in Tomcat.

          Solution is to manually explode/unzip the WAR file and copy all files to webapps.

           

          Hope this will help someone in future!

          Regards,

          Tim