5 Replies Latest reply on Aug 12, 2015 12:17 PM by hob

    java.lang.NullPointerException after configuring url mapping

    hob

      Hi,

       

      I use ORDS 2.9 with Tomcat 7.0.55 to access Apex 4.2.6 and Apex 5.0.

      Now I want to upgrade ORDS to version 3.0.1 with Tomcat 8.0.21.

      The initial configuration of ORDS 3.0.1 with one database works but when I add another database, create the url-mapping.xml and try to access Apex, I get java.lang.NullPointerException.

       

      My enviroment.

      - Tomcat 8.0.21

      - JDK 1.8.0_45

      - Redhat 6.5

      - ORDS 3.0.1.177.18.02

       

      I want the context root to be /sys, so I renamed ords.war to sys.war

      After I configure url mapping with

                          java -jar sys.war map-url --type base-path /<pathname> <dbname>

      and try to access Apex, I get:

       

      [...]

      INFORMATION: inactive connection timeout timer scheduled

      2015-07-08 09:27:09 oracle.dbtools.http.errors.ErrorPageFilter log

      SCHWERWIEGEND: null

      java.lang.NullPointerException

              at oracle.dbtools.url.mapping.file.ApexWorkspaceTenants.apexWorkspaceTenantId(ApexWorkspaceTenants.java:79)

              at oracle.dbtools.url.mapping.file.FileURLMappings.databaseTarget(FileURLMappings.java:70)

              at oracle.dbtools.url.mapping.file.FileURLMappings.process(FileURLMappings.java:98)

              at oracle.dbtools.url.mapping.file.FileURLMappings.urlMappings(FileURLMappings.java:47)

              at oracle.dbtools.url.mapping.URLMappingsCacheImpl.load(URLMappingsCacheImpl.java:174)

              at oracle.dbtools.url.mapping.URLMappingsCacheImpl.cached(URLMappingsCacheImpl.java:105)

              at oracle.dbtools.url.mapping.URLMappingsProvider.map(URLMappingsProvider.java:56)

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

              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:166)

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

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

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

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

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

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

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

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

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

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

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

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

              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

              at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:673)

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

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

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

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

              at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)

              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)

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

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

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

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

       

      Any help is appreciated.

      Thanks

      Holger

        • 1. Re: java.lang.NullPointerException after configuring url mapping
          Kris Rice-Oracle

          To rename the /ords to /sys in tomcat there's no need to rename the file.  Just look at the #3 item here

               Top Ten Tomcat Configuration Tips - O'Reilly Media

           

          -kris

          • 2. Re: java.lang.NullPointerException after configuring url mapping
            Michael_Priesch-JavaNet

            Hi,

             

            got the same error although leaving the default context_root  (/ords/) - also tried with Request URL Prefix - still same error:

             

             

            java -jar ords.war map-url --type base-url  <url prefix> <database name>

             

            My config:

            Redhat EL  6.6

            java version "1.7.0_79"

            apache-tomcat-7.0.62

            ords.3.0.1.177.18.02

             

            KR

             

            Michael.

            • 3. Re: java.lang.NullPointerException after configuring url mapping
              Colm Divilly-Oracle

              Thanks for your problem report, I've filed BUG: 21471278 to investigate this issue further.

              • 4. Re: java.lang.NullPointerException after configuring url mapping
                PCHIU

                I have the same error with ords 3.0.1.177.18.02 and tomcat 7.0.63

                I specify the workspace-id and it goes further.

                java  -jar apex.war map-url --type base-path --workspace-id webtools /test test_db

                 

                I can access the builder on the main database and also the mapped database. So far so good.

                However, the static files is broken. Use the sample oracle.example.hr in RESTful service gives me the following errors.

                 

                Debug trace

                ==============

                mapped request using: BasePathMapper [basePath=/test/] to: APEX:test_db|webtools

                 

                Could not find any dispatcher to handle request:

                --Attributes--

                javax.servlet.request.ssl_session = 55c749a2b38f35a9089d66f030874643d419d2631505bf6d61a3853de3976c1a

                javax.servlet.request.ssl_session_id = 55c749a2b38f35a9089d66f030874643d419d2631505bf6d61a3853de3976c1a

                nanoStart = 1439124943979

                javax.servlet.request.ssl_session_mgr = org.apache.tomcat.util.net.jsse.JSSESupport@3ee8fb2

                javax.servlet.request.key_size = 256

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

                Determining if request can be dispatched as a Tenanted RESTful Service

                Request path has one path segment, continuing processing

                Tenant Principal already established, cannot dispatch

                No candidate found for: GET webtools/hr/empinfo/ in context: https://accertaworx.accerta.ca/apex/test/

                 

                javax.servlet.request.cipher_suite = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

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

                org.apache.tomcat.util.net.secure_protocol_version = TLSv1.2

                oracle.dbtools.http.ecid = avQXjvI_tsFjena8lkvvdA..

                oracle.dbtools.common.di.Services = Request Scope

                --Attributes--

                GET /apex/test/webtools/hr/empinfo/ HTTP/1.1

                Host: accertaworx.accerta.ca

                host: accertaworx.accerta.ca

                connection: keep-alive

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

                upgrade-insecure-requests: 1

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

                dnt: 1

                referer: https://accertaworx.accerta.ca/apex/test/f?p=4850:9:1128332781382:::9:P9_ID,ACTIVE_NODE:1803966509838085,1803966509838085

                accept-encoding: gzip, deflate, sdch

                accept-language: en-US,en;q=0.8,zh-TW;q=0.6

                cookie: ORA_WWV_REMEMBER_LANG=en; LOGIN_USERNAME_COOKIE=pchiu; ACCERTA_APEX=ORA_WWV-T7veyVJ2-91e_Op1_d_h5SRX; ORA_WWV_REMEMBER_UN=PCHIU:WEBTOOLS; ORA_WWV_USER_63108063446708=ORA_WWV-OnHt-q3Jzme7Adew9WLL7jge; ORA_WWV_REMEMBER_UN=PCHIU:WEBTOOLS; LOGIN_USERNAME_COOKIE=pchiu; ORA_WWV_REMEMBER_LANG=en; ACCERTA_APEX=ORA_WWV-Yy7q85ZrMVV1NELI6XSX6j2L; ORA_WWV_USER_63108063446708=ORA_WWV-caPbXbGtoQsNwGBBjCEQwFzb; __utma=29525935.1573881984.1432661039.1439119319.1439121482.34; __utmc=29525935; __utmz=29525935.1432661039.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

                 

                 

                Stack Trace

                ===========

                NotFoundException [statusCode=404, reasons=[]]

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

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

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

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

                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:64)

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

                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.CORSPreflightFilter.doFilter(CORSPreflightFilter.java:67)

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

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

                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:64)

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

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

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

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

                at oracle.dbtools.url.mapping.BasePathMapper.doFilter(BasePathMapper.java:48)

                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: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: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.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1753)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1712)

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

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

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

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

                • 5. Re: java.lang.NullPointerException after configuring url mapping
                  hob

                  Hi pchiu,

                   

                  the error You're talking about is a different one.

                  I get java.lang.NullPointerException, You get a 404 Not Found with RESTful Services.

                  Possible reasons for 404:

                  -different passwords of apex users in database and configfiles

                  -missing acls

                  -restful services not activated in instance / workspace

                   

                  Regards

                  hob