0 Replies Latest reply on Jan 30, 2017 10:08 PM by tm0hd

    ORDS plugin in a non-APEX environment

    tm0hd

      Greetings!

       

      We have a mod_plsql based (non-apex) application working on 12.1.0.2 database and we are trying to move to ORDS. With the help of documentation, blogs, online help, was able to configure ORDS (ords 3.0.9 version) and it works well. But, now I was trying to get the demo plugin working as mentioned in the documentation but getting "404 not found" error.

       

      • The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured

      Debug Trace

      [TE] url-mapping start: 2017-01-26T18:33:19.225Z duration: 13ms 
      [TE] GET /ords/test_plugin/demos/plugin?who=TEST start: 2017-01-26T18:33:19.225Z duration:
      13ms [TE] url-mapping start: 2017-01-26T18:33:19.238Z duration: 21ms 

      Stack Trace

      URLMappingNotFoundException [statusCode=404, reasons=[The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured]] at oracle.dbtools.url.mapping.filter.URLMappingFilter.doFilter(URLMappingFilter.java:119) at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47) at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64) at oracle.dbtools.http.cors.CORSResponseFilter.doFilter(CORSResponseFilter.java:83) 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:94) at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:47) 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:47) 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:82) at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:49) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at oracle.dbtools.rt.web.HttpEndpointBase.dispatchableServices(HttpEndpointBase.java:116) at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:81) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:751) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:566) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98) at org.eclipse.jetty.server.Server.handle(Server.java:461) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Unknown Source)  

      As per the documentation, this would occur when the schema was not enabled but I had run the following statement in the underlying database schema to make sure that it is enabled:

       

       

      SQL> connect ordstest/*****@servicename

      Connected

      SQL> exec ords.enable_schema;

      anonymous block completed

      SQL> commit;

      Commit complete.

      SQL>

       

      And, the select from "user_ords_schema" shows that the schema was enabled.

       

       

      SQL> select * from user_ords_schemas;

       

             ID PARSING_SC TYPE       PATTERN                        STATUS     AUTO_REST_AUTH                  OPS_ALLOWED PRE_HOOK
      --------- ---------- ---------- ------------------------------ ---------- ------------------------------ ----------- ----------
          10001 ordstest   BASE_PATH  test_plugin                   ENABLED    ENABLED
      

       

      The url-mapping.xml file (under ORDS configuration) has the value setup correctly as well:

       

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

      <pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">

      <pool name="ordstest" base-path="/test_plugin" updated="2017-01-18T16:17:27.523Z"/>

      </pool-config>

       

      The URL that I was trying to test was https://localhost:8443/ords/test_plugin/demos/plugin?who=TEST

       

      I did notice in the map-url help ( java -jar ords.war help map-url ) there is a mention of different type (base-path, base-url, uri-template), should there be two different url-mapping record in 'url-mapping.xml' file? One for mod_plsql application and another for "java plugin" to work?

       

      Has anyone tried this setup/configuration and made the "java" plugin work in the ORDS 3.0.9?

       

      Thanks,

      Taj