9 Replies Latest reply on Jul 17, 2017 12:38 PM by Marko Goricki

    Issue with configuration files

    Marko Goricki

      Hi,

       

      I have one interesting issue. I'm getting the following message when I open APEX builder login page:

       

      I know that the solution should be to configure RESTful services by running @apex_rest_config.sql script (https://docs.oracle.com/cd/E71588_01/HTMIG/configuring-Oracle-REST-data-services.htm#HTMIG29472 ). We did that but no help.

      All required DB users are there (APEX_050100, APEX_PUBLIC_USER, APEX_REST_PUBLIC_USER, APEX_LISTENER, ORDS_PUBLIC_USER, ORDS_METADATA) and the passwords are valid (I can connect with them to the DB with SQLcl).

       

      When I try to access sample REST service (oracle.example.hr) I'm getting this message:

      screenshot.png

       

      ORDS version is 3.0.2.294.08.40, deployed on Tomcat 8.0.44. DB is Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production. APEX version is 5.1.1.00.08.

      The same configuration works well on test environment. Actually, they are sharing same Tomcat and ORDS, only path is different.

       

      We've tried to uninstall ORDS and to reconfigure it again, but again no luck.

       

      Anybody got a clue how to fix this?

       

       

      Br,

      Marko

        • 1. Re: Issue with configuration files
          Zapp_Brannigan

          Hi,

           

          Have you copied the images '/i' folder into CATALINA HOME.

           

          $ mkdir $CATALINA_HOME/webapps/i/

          $ cp -R /tmp/apex/images/* $CATALINA_HOME/webapps/i/

          Regards,

          Zapp.

          • 2. Re: Issue with configuration files
            Marko Goricki

            Yes, sure. Everything works ok except RESTservices and application/workspace files (that are also fetched over REST).

             

            If you don't copy files, there's a different message. Something like "There is a problem with your environment because the Application Express files have not been loaded..."

            • 3. Re: Issue with configuration files
              Kiran Pawar

              Hi Marko,

              Marko Goricki wrote:

               

              I have one interesting issue. I'm getting the following message when I open APEX builder login page:

               

              I know that the solution should be to configure RESTful services by running @apex_rest_config.sql script (https://docs.oracle.com/cd/E71588_01/HTMIG/configuring-Oracle-REST-data-services.htm#HTMIG29472 ). We did that but no help.

              All required DB users are there (APEX_050100, APEX_PUBLIC_USER, APEX_REST_PUBLIC_USER, APEX_LISTENER, ORDS_PUBLIC_USER, ORDS_METADATA) and the passwords are valid (I can connect with them to the DB with SQLcl).

               

              When I try to access sample REST service (oracle.example.hr) I'm getting this message:

              screenshot.png

               

              ORDS version is 3.0.2.294.08.40, deployed on Tomcat 8.0.44. DB is Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production. APEX version is 5.1.1.00.08.

              The same configuration works well on test environment. Actually, they are sharing same Tomcat and ORDS, only path is different.

              We've tried to uninstall ORDS and to reconfigure it again, but again no luck.

              Anybody got a clue how to fix this?

              For debugging this issue you are facing on ORDS:

              • Locate the ORDS configuration folder.
              • Enable the Debug Tracing in defaults.xml (If entry is not there add the entry)
              • Enable the Detail Request Error messages in defaults.xml (If entry is not there add the entry)
              • Start(re-start) the Tomcat 8.0.44
              • Navigate to the APEX URL
              • Copy/paste the debug log into the forum reply.(Usually the error is at the end of the log, paste/attach the whole log from where the first exception occurs)

              NOTE: You can disable detail debug tracing in ORDS once the issue is resolved.

               

              Is there a specific reason why you are using ORDS 3.0.2 with Tomcat 8.0.44? As the latest ORDS 3.0.11 has the bug fix for:

              BUG:26372648 - Address regression causing 500 Internal Server error in ORDS 3.0.10 on Apache Tomcat 8.5 and later

               

              As you are serving two databases with one ORDS+Tomcat:

              • Have you done the URL Mapping of multiple databases correctly?
              • Are you using same Oracle APEX Images directory /i/ to serve static files for both databases or have configured different image prefix for both/one of them?

              Refer:

               

              Regards,

              Kiran

              • 4. Re: Issue with configuration files
                Marko Goricki

                Hi Kiran,

                 

                thanks for quick answer.

                 

                I've looked into the log, nothing special. I don't have it now, but I'll ask admins to enable it again.

                Is there a specific reason why you are using ORDS 3.0.2 with Tomcat 8.0.44? As the latest ORDS 3.0.11 has the bug fix for:

                https://support.oracle.com/rs?type=bug&id=BUG:26372648

                Yes. The ORDS is behind reverse proxy and they didn't know how to configure CORS there. In 3.0.2 version you don't need it. They will try to do it, but they don't have time now.

                 

                As you are serving two databases with one ORDS+Tomcat:

                • Have you done the URL Mapping of multiple databases correctly?
                • Are you using same Oracle APEX Images directory /i/ to serve static files for both databases or have configured different image prefix for both/one of them?

                It's one Tomcat, but separate ORDS for test and production and they share same static files for now. I know that's not right, but I'm not admin there and it was the easiest way for admins to configure.

                As I said, the same configuration on same Tomcat works well on test environment.

                 

                Br,

                Marko

                • 5. Re: Issue with configuration files
                  Marko Goricki

                  Btw. admin changed passwords in config files (like in this example ORA-00001: Unique constraint violated: How to change apex_public_user password in ORDS ) and now I can call test RESTful service from APEX, but I'm still getting error on login screen and I can't fetch application/workspace files:

                  • 6. Re: Issue with configuration files
                    Kiran Pawar

                    Hi Marko Goricki,

                    Marko Goricki wrote:

                     

                    Btw. admin changed passwords in config files (like in this example ORA-00001: Unique constraint violated: How to change apex_public_user password in ORDS ) and now I can call test RESTful service from APEX, but I'm still getting error on login screen and I can't fetch application/workspace files:

                    The above static files issue is related to RESTful Services configuration Oracle APEX 5+ and ORDS which is related to:

                    • Configuring RESTful Services after installing Oracle APEX:

                        Refer : Configuring Oracle REST Data Services

                        Refer : Installing Oracle REST Data Services

                    Refer:

                     

                    But as confirmed by you, these steps are performed correctly. Hence, check the configuration folder for the following files:

                    • apex_al.xml (APEX_LISTENER)
                    • apex_rt.xml (APEX_REST_PUBLIC_USER)

                    Refer: About the Oracle REST Data Services Configuration Files

                     

                    Also, can you confirm whether the ORDS war (ords.war) file is deployed with different names to Apache Tomcat.

                     

                    Regards,

                    Kiran

                    • 7. Re: Issue with configuration files
                      Marko Goricki

                      Also, can you confirm whether the ORDS war (ords.war) file is deployed with different names to Apache Tomcat.

                      Yes. One is named test.war and the other one prod.war. We also tried to deploy prod.war to separate Tomcat, but the error remained the same.

                       

                      One interesting thing. I've deleted all REST services from APEX Builder (SQL Workshop > RESTfull Services), but I can still call sample REST service:

                      And I know it's pointing to the right database because I've executed there:

                      update emp set ename = ename||'x';
                      
                      • 8. Re: Issue with configuration files
                        Kiran Pawar

                        Hi Marko,

                        Marko Goricki wrote:

                        Also, can you confirm whether the ORDS war (ords.war) file is deployed with different names to Apache Tomcat.

                        Yes. One is named test.war and the other one prod.war. We also tried to deploy prod.war to separate Tomcat, but the error remained the same.

                        Do you have same workspace names in TEST and PROD?

                        If yes, this has to do something with static workspace/application files delivery method in Oracle APEX 5 (which uses RESTful services to deliver workspace/application static files).

                        Patrick Wolf-Oracle : Can you confirm whether my assumption is correct?

                         

                        Regards,

                        Kiran

                        • 9. Re: Issue with configuration files
                          Marko Goricki
                          Do you have same workspace names in TEST and PROD?

                           

                          Yes, they have a same name.

                           

                          And If I create new RESTful service as this one:

                          I'm getting the following error:

                           

                          Debug Trace
                          
                          
                          mapped request using: /hnb_aplikacija/* to: APEX:apex_rt.HNB APLIKACIJA, id=2150321663285747
                          
                          
                          Could not find any dispatcher to handle request:
                          --Attributes--
                          apex.diagnostic.context = ...
                          ECID-Principal = ECIDPrincipal [ecid=C__YzLZkv7GZ9aiCItKN9A..]
                          oracle.dbtools.http.ecid = tHF4EvHU7XryNBSbMK9NYg..
                          oracle.dbtools.common.di.Services = Request Scope
                          --Attributes--
                          GET /prod/hnb_aplikacija/test/t/ HTTP/1.1
                          Host: janhrvddcreator.zbo
                          host: janhrvddcreator.zbo:8081
                          connection: keep-alive
                          upgrade-insecure-requests: 1
                          user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
                          accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                          accept-encoding: gzip, deflate, sdch
                          accept-language: en-US,en;q=0.8
                          cookie: ORA_WWV_REMEMBER_UN=AUTPLIQ_TMP:hnb%20aplikacija
                          
                          
                          
                          
                          org.apache.catalina.connector.CoyoteInputStream@209c39dd
                          
                          
                          mapped request using: /hnb_aplikacija/* to: APEX:apex_rt.HNB APLIKACIJA, id=2150321663285747
                          
                          
                          Could not find any dispatcher to handle request:
                          --Attributes--
                          apex.diagnostic.context = ...
                          ECID-Principal = ECIDPrincipal [ecid=C__YzLZkv7GZ9aiCItKN9A..]
                          oracle.dbtools.http.ecid = tHF4EvHU7XryNBSbMK9NYg..
                          oracle.dbtools.common.di.Services = Request Scope
                          --Attributes--
                          GET /prod/hnb_aplikacija/test/t/ HTTP/1.1
                          Host: janhrvddcreator.zbo
                          host: janhrvddcreator.zbo:8081
                          connection: keep-alive
                          upgrade-insecure-requests: 1
                          user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
                          accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                          accept-encoding: gzip, deflate, sdch
                          accept-language: en-US,en;q=0.8
                          cookie: ORA_WWV_REMEMBER_UN=AUTPLIQ_TMP:hnb%20aplikacija
                          
                          
                          
                          
                          org.apache.catalina.connector.CoyoteInputStream@209c39dd
                          

                           

                           

                          Stack Trace:

                          Stack Trace
                          
                          
                           DispatcherNotFoundException [statusCode=404, reasons=[]]
                            at oracle.dbtools.http.entrypoint.Dispatcher.choose(Dispatcher.java:84)
                            at oracle.dbtools.http.entrypoint.Dispatcher.dispatch(Dispatcher.java:94)
                            at oracle.dbtools.http.entrypoint.EntryPoint$FilteredServlet.service(EntryPoint.java:123)
                            at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:73)
                            at oracle.dbtools.url.mapping.RequestMapperBase.doFilter(RequestMapperBase.java:53)
                            at oracle.dbtools.url.mapping.CompositeMapper$RequestMapperFilterChain.doFilter(CompositeMapper.java:144)
                            at oracle.dbtools.url.mapping.RequestMapperBase.doFilter(RequestMapperBase.java:53)
                            at oracle.dbtools.url.mapping.CompositeMapper.doFilter(CompositeMapper.java:37)
                            at oracle.dbtools.url.mapping.URLMappingBase.doFilter(URLMappingBase.java:89)
                            at oracle.dbtools.url.mapping.filter.URLMappingFilter.doFilter(URLMappingFilter.java:86)
                            at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
                            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:64)
                            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:64)
                            at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:75)
                            at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)
                            at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
                            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:64)
                            at oracle.dbtools.http.auth.ForceAuthFilter.doFilter(ForceAuthFilter.java:44)
                            at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:45)
                            at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)
                            at oracle.dbtools.http.filters.Filters.filter(Filters.java:47)
                            at oracle.dbtools.http.entrypoint.EntryPoint.service(EntryPoint.java:80)
                            at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:46)
                            at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                            at oracle.dbtools.rt.web.HttpEndpointBase.dispatchableServices(HttpEndpointBase.java:156)
                            at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
                            at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
                            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
                            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
                            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
                            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
                            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
                            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
                            at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
                            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
                            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
                            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
                            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
                            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
                            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
                            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                            at java.lang.Thread.run(Unknown Source)