3

我很难让 ORDS 3.0.4.60.12.48 在 Tomcat 7.0.68 服务器上工作。数据库本身是 Oracle 12.1.0.2.0。

每当我尝试访问 ORDS 页面时localhost:8080/ords,都会收到 404 错误。启用该 debug.printDebugToScreen属性后,页面显示以下内容:

调试跟踪

Could not find any dispatcher to handle request:
--Attributes--
apex.diagnostic.context = ...
ECID-Principal = ECIDPrincipal [ecid=DRfgpsk1Jpq7KZ67hEo6Dw..]
oracle.dbtools.http.ecid = ogil1RMV3372zbyEOpN1Rg..
oracle.dbtools.common.di.Services = Request Scope
--Attributes--
GET /ords/ HTTP/1.1
Host: localhost
host: localhost:8080
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate
referer: http://localhost:8080/manager/html/list
connection: keep-alive


org.apache.catalina.connector.CoyoteInputStream@139aac67

堆栈跟踪

DispatcherNotFoundException [statusCode=404, reasons=[]]
  at oracle.dbtools.http.entrypoint.Dispatcher.choose(Dispatcher.java:86)
  at oracle.dbtools.http.entrypoint.Dispatcher.dispatch(Dispatcher.java:96)
  at oracle.dbtools.http.entrypoint.EntryPoint$FilteredServlet.service(EntryPoint.java:153)
  at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:73)
  at oracle.dbtools.http.forwarding.QueryFilteringRewrite.doFilter(QueryFilteringRewrite.java:89)
  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:73)
  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.filter.URLMappingFilter.doFilter(URLMappingFilter.java:69)
  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: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: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:82)
  at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:49)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  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: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:169)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
  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)

不幸的是,我并没有真正在网上找到很多关于此的信息。其中很多是在检查我没有使用的 APEX 特定用户。在我确实找到的内容中,我已经检查并可以确认我可以ORDS_PUBLIC_USER手动登录,并且我尝试将ojdbc.jar文件从我的 Oracle 客户端复制到 Tomcatlib文件夹。但是,问题似乎仍然存在。

任何帮助,将不胜感激!

[编辑] 所以我尝试使用全新的 ORDS 配置重新安装它,并意识到我的安装目录中没有apex_pu.xml文件ords\conf\。但是,我仍然遇到类似的错误:

调试跟踪

 mapped request using: /* to: apex_pu

Could not find any dispatcher to handle request:
--Attributes--
apex.diagnostic.context = ...
ECID-Principal = ECIDPrincipal [ecid=wDuKj9PEUNnl3Oy8vwesDg..]
oracle.dbtools.http.ecid = xXACfwD3YDNtXCQUNuqIAw..
oracle.dbtools.common.di.Services = Request Scope
--Attributes--
GET /ords/ HTTP/1.1
Host: localhost
host: localhost:8080
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate
referer: http://localhost:8080/manager/html/list
connection: keep-alive


org.apache.catalina.connector.CoyoteInputStream@1405a57f

mapped request using: /* to: apex_pu

Could not find any dispatcher to handle request:
--Attributes--
apex.diagnostic.context = ...
ECID-Principal = ECIDPrincipal [ecid=wDuKj9PEUNnl3Oy8vwesDg..]
oracle.dbtools.http.ecid = xXACfwD3YDNtXCQUNuqIAw..
oracle.dbtools.common.di.Services = Request Scope
--Attributes--
GET /ords/ HTTP/1.1
Host: localhost
host: localhost:8080
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate
referer: http://localhost:8080/manager/html/list
connection: keep-alive


org.apache.catalina.connector.CoyoteInputStream@1405a57f

堆栈跟踪与以前几乎相同。

4

1 回答 1

1

这都是我的误解。我曾假设localhost:8080/ords并且localhost:8080/ords/ordstest应该返回某种元数据,但看起来情况并非如此。

按照ORDS 文件夹getting-started中的指南examples设置ORDSTEST模式并运行

exec ords.enable_schema();
exec ords.enable_object(p_object => 'EMP');
commit;

代替不想下载SQL Developer,我设法http://localhost:8080/ords/ordstest/emp成功返回数据。

于 2016-04-08T18:58:56.843 回答