13 Replies Latest reply on Jun 17, 2015 8:02 AM by OrcL-FaN Branched to a new discussion.

    ORACLE REST DATA SERVICES 404 NOT FOUND

    OrcL-FaN

      Hello All,

      Please suggest me the possible ways to solve the below issue.

       

      DB:-   11gR2(11.2.0.4)

      OS:-   OEL 6.5

      APEX:- 4.2.6

      ORDS(formerly known as Apex Listener)- 3.0

      Tomcat-  7.0.53

      Jdk-    1.7.0_45

       

      *****Followed the steps mentioned in URL to implement the ORDS for APEX application on APACHE TOMCAT

       

      http://oracle-base.com/articles/misc/oracle-rest-data-services-ords-3-installation-on-tomcat-7.php#downloads

       

                    ===================================Error=================================

       

      while running the URL(www.server-name:8080/ords) in browser it is showing-

       

      ORACLE REST DATA SERVICES

      404 NOT FOUND

       

      [***Note:

      A>  It is showing the version of apex if i execute the below URL. 

             www.server-name:8080/i/apex_version.txt

      B> No problem with tomcat. It is coming very well in browser on URL

             www.server-name:8080

      ]

       

      Thanks & Regards,

      Pinto Das

        • 1. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
          OrcL-FaN

          Hello,

          Due to some reason i was not able to continue the previous installation setup so now i have tried the same installation into a different environment but unfortunately facing the same issue. Even i have tried to change the ords.war file name to apex.war, but no luck. Details are as below:

           

          DB:-   11gR2(11.2.0.2.0)

          OS:-   OEL 6.5

          APEX:- 5.0

          ORDS(formerly known as Apex Listener)- ords.3.0.0.121.10.23

          Tomcat:-  apache-tomcat-7.0.62

          Jdk-    1.7.0_67

           

          This time i have followed the below oracle documentation for installation....

          https://docs.oracle.com/cd/E37099_01/doc.20/e25066/install.htm#AELIG7017

           

          Error:

           

          while running the URL(www.server-name:8080/ords) in browser it is showing-

           

          ORACLE REST DATA SERVICES

          404 NOT FOUND

           

          Any suggestion would be a great help.

           

          Thanks & Regards,

          Pinto Das

          • 2. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
            JimmyOTNC

            Hi, Pinto Das

             

            Have you gotten this issue solved? I got the same problem. If you got it solved, would you let me know what did you do.

             

            Thanks

            • 3. Re: Re: ORACLE REST DATA SERVICES 404 NOT FOUND
              Kiran Pawar

              Hi user2300390,

              user2300390 wrote:

                  Please change your user handle from "user2300390" to something meaningful. Refer : Video tutorial how to change nickname available

              Have you gotten this issue solved? I got the same problem. If you got it solved, would you let me know what did you do.

                  Refer his same thread ORACLE REST DATA SERVICES 404 NOT FOUND from forum Oracle Application Express (APEX).

                  Follow the instructions to enable debug trace for ORDS that will lead you to the problem.

                  Also, if you have any issues do not post follow-ups(except if you found solution) to this thread.

                  You can open your own thread with the problem details. This way your problem can be addressed independently of the OP's problem.

               

              Regards,

              Kiran  

              • 4. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                OrcL-FaN

                Hello Kiran Pawar

                 

                I Think this is my own thread, please correct me if i am wrong as i am a new user of this community. Any way i have made a document on what i did till now which i have pasted below as i was not able to attach a doc file, but unfortunately the issue is still not resolved. Please consider this my last reply to this thread regarding follow-up of this issue. Please let me know where i am doing wrong, so that i can got a solution.

                 

                Installation of ORDS for APEX 5.0

                 

                Environment Details:

                DB:-   11gR2(11.2.0.2.0)

                OS:-   OEL 6.5

                APEX:- 5.0

                ORDS(formerly known as Apex Listener):- ords.3.0.0.121.10.23

                Tomcat:-  apache-tomcat-7.0.62

                Jdk-    1.7.0_67 (export the java path into the bash profile)

                 

                Before installation of ORDS we had installed Oracle DB and APEX which was running using Embeded PL/SQL gateway.

                Following are the steps have been followed to accomplish the ORDS installation: 

                1. a> Installation of Tomcat.
                2. b> Installation of ORDS and deploying application.

                Tomcat Installation:-

                1. 1. Unzip the downloaded zip file of tomcat.

                      [root@testing opt]# tar -zxvf apache-tomcat-7.0.62.tar.gz

                1. 2. Go to the location of apache-tomcat-7.0.62/bin and start the tomcat server. By default it will be running on 8080 port.

                [root@testing opt]# sh catalina.sh start

                ##Checked the URL- http://localhost:8080 where tomcat was loading properly.

                ORDS Installation:-

                1. 1. Unzip the downloaded ORDS.

                [root@testing opt]# unzip ords.3.0.0.121.10.23.zip

                1. 2. Configure the ORDS.

                [root@testing opt]# 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:/opt/ords_config_data

                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]:2

                Enter the database SID [xe]:orcl

                Enter the database password for ORDS_PUBLIC_USER:

                Confirm password:

                Please login with SYSDBA privileges to verify Oracle REST Data Services schema. Installation may be required.

                Enter the username with SYSDBA privileges to verify the installation [SYS]:

                Enter the database password for SYS:

                Confirm password:

                May 21, 2015 1:41:51 PM oracle.dbtools.rt.config.setup.SchemaSetup addSchemaParams

                INFO:

                Oracle REST Data Services schema does not exist and will be created.

                Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step [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]:

                Enter the database password for APEX_LISTENER:

                Confirm password:

                Enter the database password for APEX_REST_PUBLIC_USER:

                Confirm password:

                May 21, 2015 1:41:52 PM oracle.dbtools.common.config.file.ConfigurationFilesBase update

                INFO: Updated configurations: defaults, apex_pu, apex, apex_al, apex_rt

                May 21, 2015 1:41:53 PM oracle.dbtools.rt.config.setup.SchemaSetup install

                INFO: Oracle REST Data Services schema version 3.0.0.121.10.23

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

                [root@testing opt]#

                1. 3. Copy the contents of the <apex_directory>/images folder to <Tomcat_directory> /webapps/i/.

                [root@testing opt]# cp -R /opt/apex/images/ /opt/apache-tomcat-7.0.62/webapps/i/

                <apex_directory> is the directory location of oracle apex.

                <Tomcat_directory> is the location where apache tomcat is installed.

                1. 4. Move the ords.war file to the webapps folder where apache tomcat is installed.

                 

                [root@testing opt]# mv ords.war /opt/apache-tomcat-7.0.62/webapps/

                 

                1. 5. Access the ORDS using the below URL.

                 

                http://localhost:8080/ords

                 

                 

                 

                =========================== Issues faced after installation ===================

                1. 1. ORACLE REST DATA SERVICES 404 NOT FOUND shows in the browser while accessing the URL- localhost:8080/ords

                 

                • Enabled the logging of ORDS into the /opt/ords_config_dir/ords/defaults.xml file by making the below two entry to true.

                <entry key="debug.debugger">true</entry>

                <entry key="debug.printDebugToScreen">true</entry>

                Note: /opt/ords_config_dir/ is the location which we have given when prompted by system while installing the ORDS i.e. first step of ords installation.

                 

                 

                 

                 

                1. 2. After logging has been enabled for the ORDS, in browser it shows the below messages.

                 

                Debug Trace

                mapped request using: /* to: PLSQL:apex

                 

                Could not find any dispatcher to handle request:

                --Attributes--

                nanoStart = 1432288500450

                1. apex.diagnostic.context = Attempting to process as a Dispatchable Service

                 

                ECID-Principal = ECIDPrincipal [ecid=rQzl29CKU21mQzcoaKIJFw..]

                • oracle.dbtools.http.ecid = sPFhzcDG-sX1k42rpvJMbA..
                • oracle.dbtools.common.di.Services = Request Scope

                --Attributes--

                GET /ords HTTP/1.1

                Host: 192.168.2.220

                host: 192.168.2.220:8080

                connection: keep-alive

                accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

                user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

                accept-encoding: gzip, deflate, sdch

                accept-language: en-US,en;q=0.8

                 

                 

                • org.apache.catalina.connector.CoyoteInputStream@219b66f

                 

                 

                Stack Trace

                oracle.dbtools.http.errors.NotFoundException

                          at oracle.dbtools.http.entrypoint.Dispatcher.choose(Dispatcher.java:87)

                          at oracle.dbtools.http.entrypoint.Dispatcher.dispatch(Dispatcher.java:97)

                          at oracle.dbtools.http.entrypoint.EntryPoint$FilteredServlet.service(EntryPoint.java:117)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:60)

                          at oracle.dbtools.http.forwarding.QueryFilteringRewrite.doFilter(QueryFilteringRewrite.java:82)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.forwarding.ForwardingFilter.doFilter(ForwardingFilter.java:58)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.cors.CORSPreflightFilter.doFilter(CORSPreflightFilter.java:67)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.cookies.auth.CookieSessionCSRFFilter.doFilter(CookieSessionCSRFFilter.java:61)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.auth.AuthenticationFilter.authenticate(AuthenticationFilter.java:95)

                          at oracle.dbtools.http.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:67)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.url.mapping.db.PLSQLMapper.doFilter(PLSQLMapper.java:37)

                          at oracle.dbtools.url.mapping.URLMapping.doFilter(URLMapping.java:78)

                          at oracle.dbtools.url.mapping.filter.URLMappingFilter.doFilter(URLMappingFilter.java:63)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.locale.LocaleFilter.doFilter(LocaleFilter.java:60)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.cors.CORSResponseFilter.doFilter(CORSResponseFilter.java:71)

                          at oracle.dbtools.http.filters.HttpResponseFilter.doFilter(HttpResponseFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:71)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.ecid.ECIDFilter.doFilter(ECIDFilter.java:35)

                          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)

                          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:51)

                          at oracle.dbtools.http.filters.Filters.filter(Filters.java:46)

                          at oracle.dbtools.http.entrypoint.EntryPoint.service(EntryPoint.java:74)

                          at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:46)

                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

                          at oracle.dbtools.rt.web.HttpEndpointBase.dispatchableServices(HttpEndpointBase.java:166)

                          at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:88)

                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

                          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

                          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)

                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)

                          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)

                          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)

                          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)

                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                          at java.lang.Thread.run(Thread.java:745)

                 

                Note:- Apex version was displaying correctly while executing the below URL. 

                      http://localhost:8080/i/apex_version.txt

                 

                Installation Ref: https://docs.oracle.com/cd/E37099_01/doc.20/e25066/install.htm#AELIG7017


                Thanks & Regards,

                Pinto Das

                • 5. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                  JimmyOTNC

                  I figured out my problem.  I think, you maybe having the same issue.

                   

                  1. Check the database side install, make sure you configure RESTful services correctly. For Rest services, you at least need a couple of new accounts created.

                       select *

                       from dba_users

                       where username like '%APEX%'

                       order by username;

                   

                       do you see these accounts:

                            APEX_050000

                            APEX_LISTENER

                            APEX_PUBLIC_USER

                            APEX_REST_PUBLIC_USER

                   

                  2. If database side installed correctly, make sure reconfigure the application server side's installation.

                       java -jar apex.war setup

                   

                       when you get to this step:  Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step [1]: 1

                                ***** ENTER 1 *****

                   

                  Let me know if you still need help.

                  • 6. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                    Kiran Pawar

                    Hi Pinto Das,

                     

                         Going through the discussion we have had in earlier thread still I want to re-iterate that the error is the result of faulty configuration of ORDS.

                         Just to check what "user2300390" has mentioned in his reply above, have you configured the PL/SQL Gateway by configuring APEX_PUBLIC_USER while installation. Refer : Re: Re: ORDS 3 404 Error (see the last reply from Colm Divilly).

                         The faulty configuration can be anything:

                    • Have you configured RESTful Services after Oracle APEX installation using apex_rest_config.sql script?(which creates the database users APEX_LISTENER and APEX_REST_PUBLIC_USER). This step(is mandatory for APEX 5) should be performed before installing/configuring ORDS.
                    • While installing/configuring ORDS have you configured PL/SQL Gateway?
                    • Have you unlocked the APEX_PUBLIC_USER before installing/configuring ORDS?
                    • Have you provided correct passwords while installing/configuring ORDS for database users (APEX_PUBLIC_USER, APEX_LISTENER and APEX_REST_PUBLIC_USER)?
                    • Lastly have you provided correct database parameters(database server hostname/ip,SID/service name,port) while installing/configuring ORDS?
                    • Check whether you are able to connect to your database remotely using the current database listener preferably through Oracle SQL Developer (as both SQL Developer and ORDS use JDBC to connect to database).

                     

                         Hope this helps!

                     

                    Regards,

                    Kiran

                    • 7. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                      OrcL-FaN

                      Hello JimmyOTNC,

                       

                      1. I have checked in my environment where all the mentioned accounts are exist accordingly.

                       

                      APEX_050000

                      APEX_LISTENER

                      APEX_PUBLIC_USER

                      APEX_REST_PUBLIC_USER

                       

                      2. I have mentioned 1 only while configuring the java -jar ords.war, even you can check in my previous post where i have pasted the whole installation steps.

                       

                      Yes, i need more suggestions from you to solve the issue.

                       

                      Thanks & Regards,

                      Pinto Das

                      • 8. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                        OrcL-FaN

                        Hello Kiran Pawar,

                         

                        I have checked the mentioned points of user2300390 in my environment, which was fine.

                         

                        Yes i have checked my database to connect remotely using SQL Developer, which works very well.

                         

                        Unfortunately, that error is still exist.

                         

                        Thanks & Regards,

                        Pinto Das

                        • 9. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                          OrcL-FaN

                          Hello All,

                           

                          Can i get a solution for my above mentioned issue? Any suggestion will be highly appreciated.

                           

                          Thanks & Regards,

                          Pinto Das

                          • 10. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                            Colm Divilly-Oracle

                            try /ords/ instead of /ords

                            1 person found this helpful
                            • 11. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                              OrcL-FaN

                              Hello ,

                               

                              Tough luck, /ords/ also shows the same error as earlier.

                               

                              Thanks & Regards,

                              Pinto Das

                              • 12. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                                Colm Divilly-Oracle

                                Hi Pinto,

                                if you can, please zip up your configuration folder and email the zip along with the installation log file to me: colm <DOT> divilly <AT> oracle <DOT> com

                                • 13. Re: ORACLE REST DATA SERVICES 404 NOT FOUND
                                  OrcL-FaN

                                  Hello ,

                                   

                                  Thank you very much for your kind response. with /ords/ it was not working correctly because some other issue was occurring in the catalina.2015-06-17.log file like below:

                                   

                                  ORA-01045: user APEX LISTENER lacks CREATE SESSION privilege; logon denied

                                  ORA-01045: user APEX_REST_PUBLIC_USER lacks CREATE SESSION privilege; logon denied


                                  so i have given create session privilege to both the users and it works well with the URL: http://localhost:8080/ords/

                                  So, in the URL the thing which has been changed from earlier one was /ords/ instead of /ords.

                                   

                                  Thanks to everyone who has given their valuable suggestion. This is the end of this thread which has taken good amount of time to come to the conclusion. Any way it was a nice learning experience. Have a good day.


                                  Thanks & Regards,

                                  Pinto Das