2 Replies Latest reply: Apr 3, 2013 8:59 AM by user11863490 RSS

    Receiving 404 Error No Matching tenant found when testing web services

    user11863490
      When testing the new APEX Web Service I am getting the following error. I have verified that I have followed the installation documentation correctly?

      Any help would be greatly appreciated.

      Thanks
      Keith

      Here is the info.....

      Press Test Button on oracle.example.hr empinfo/ GET
      URL:
      http://ssbdev2.aac.mycampus.ca:7010/apex/banner/hr/empinfo/

      Receive
      Request Path passes syntax validation
      Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=null, _failed=false, _lastUpdate=-1, _template=null, _type=REGEX]
      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: banner, cannot dispatch
      No candidate found for: GET banner/hr/empinfo/ in context: http://ssbdev2.aac.mycampus.ca:7010/apex/
      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:412)
           at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
           at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
        • 1. Re: Receiving 404 Error No Matching tenant found when testing web services
          user600595
          I just made our test work, was getting the same error.

          Solution: http://docs.oracle.com/cd/E37099_01/doc/doc.20/e25066/config.htm

          1.

          Important to setup database connection

          java -Dapex.home=/tmp/apex -jar /my_path/apex_listener/apex.war setup --database my_database

          This will create my_database.xml , my_database_al.xml and my_database_rt.xml

          2.

          After database connection important to setup "Routing Based on the Request Path Prefix" in order to be able to use RESTful

          java -Dapex.home=/tmp/apex -jar /dbusr/apex_listener/apex.war map-url type base-path workspace-id my_workspace /my_path_for_rule_matching my_database

          This will create url-mapping.xml

          Now my test works on following url:

          http://my_server:8080/apex/my_path_for_rule_matching/hr

          Where hr is URI Template

          Hope this help,

          VK
          • 2. Re: Receiving 404 Error No Matching tenant found when testing web services
            user11863490
            Thank you very much for the help.

            I created a url-mapping.xml entry in the conf/apex directory and restarted the domain; once I did that it worked great.

            Thank again for the help, much appreciated.

            Here is my configuration change, my apex workspace is called banner
            I needed to create the url-mapping.xml file

            [oracle@ssbdev2]: ~/apex_listener/conf $ cd apex
            [oracle@ssbdev2]: ~/apex_listener/conf/apex $ ls
            bdb conf defaults.xml defaults.xml.bak url-mapping.xml
            [oracle@ssbdev2]: ~/apex_listener/conf/apex $ cat url-mapping.xml
            <pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">
            <pool base-path="/banner" name="apex" workspace-id="banner"/>
            </pool-config>
            [oracle@ssbdev2]: ~/apex_listener/conf/apex $

            From Browser APEX URL Service now works....
            http://ssbdev2.aac.mycampus.ca:7010/apex/banner/hr/empinfo/

            Cheers
            Keith