0 Replies Latest reply: Sep 19, 2013 2:18 PM by 12495df0-a700-4130-99d2-42d3956a931f RSS

    RESTful web services not working (but APEX working fine)

    12495df0-a700-4130-99d2-42d3956a931f

      Hello All,
      I recently upgraded our APEX servers from APEX 4.2.2 to 4.2.3. At the same time I upgraded the APEX Listener instances. We were using an older version of the listener in standalone mode but downloaded the latest version (2.0.2.133.14.47) and deployed it into Glassfish (open source edition). Since making the changes APEX works fine in general but RESTful web services have stopped working.
      In our environment we have 8 different databases all running APEX. We are using a single instance of the APEX listener for all the databases, each with its own database settings. We ran apex_rest_config.sql (from the 4.2.3 full install files) to make sure that was up to date. We configured the database settings in the listener so that the passwords for APEX_REST_PUBLIC_USER and APEX_LISTENER are correct. We know the URL mappings are set correctly because APEX works fine.
      When we try the test button in APEX for our web services we get a 404 error with the following output:

       

      Request Path passes syntax validation
      Mapping request to database pool: PoolMap [_poolName=databaseabcdef, _regex=null, _workspaceIdentifier=schemaabcdef, _failed=false, _lastUpdate=-1, _template=/databaseabcdef/, _type=BASE_PATH]
      Applied database connection info
      Attempting to process with PL/SQL Gateway
      Not processed as PL/SQL Gateway request
      Attempting to process as a RESTful Service
      Determining if request can be dispatched as a Tenanted RESTful Service
      Request path has one path segment, continuing processing
      No Tenant Principal established yet, continuing processing
      APEX_LISTENER pool exists, continuing processing
      No matching tenant found for: test, cannot dispatch
      No candidate found for: GET test/hr/empinfo/ in context: http://host/apex/databaseabcdef/
      
      WebException [statusCode=404]
       at oracle.dbtools.rt.web.WebException.webException(WebException.java:326)
       at oracle.dbtools.rt.web.WebException.notFound(WebException.java:280)
       at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:70)
       at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:422)
       at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
       at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
       at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
       at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
       at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
       at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
       at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
       at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
       at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
       at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
       at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
       at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
       at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
       at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
       at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
       at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
       at java.lang.Thread.run(Unknown Source)