无法使Oracle ORDS通过APEX 5 Restful服务和Oracle XE11g来满足请求 [英] Can't get Oracle ORDS to serve a request with APEX 5 restful services and Oracle XE11g

查看:375
本文介绍了无法使Oracle ORDS通过APEX 5 Restful服务和Oracle XE11g来满足请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Oracle 11g XE,在其上安装了最新版本的APEX(5),现在我正尝试使用restful服务选项通过rest公开我的表.我已经下载了ORDS,并按照此处的说明独立安装和运行它.我在先端创建了一个休息服务,但我不知道如何测试-我尝试了各种URL,但没有任何响应!

I'm using Oracle 11g XE, I installed the latest version of APEX (5) on it and now I'm trying to use the restful services options to expose my tables via rest. I've downloaded ORDS and followed the instructions here to install and run it as standalone. I create a rest service in apex but I don't know how to test it - I've tried various URLS and not got any response!

我的顶点安装为 http://localhost:8080/apex/

在启动时,ORDS似乎建议它映射到/ords,但事实并非如此.

On startup ORDS appears to suggest that it maps to /ords but this doesn't appear to be the case.

如果我导航到 http://localhost:8080/ords ,则会显示Authentication required弹出窗口-需要一个用户名和密码.服务器说XDB.

If I navigate to http://localhost:8080/ords I get an Authentication required popup - requires a username and password. The server says XDB.

我还使用uri模板emp_json创建了一个基于EMP的Restful服务.我希望可以在 http://localhost:8080/ords/emp_json (或也许 http://localhost:8080/apex/emp_json ),但是我只得到了身份验证所需的弹出窗口.我在这里尝试了各种数据库用户的密码APEX_REST_PUBLIC_USER,但我只是收到未找到的回复.

I've also created a restful service based on EMP with uri template emp_json. I expected this to be served at http://localhost:8080/ords/emp_json (or maybe http://localhost:8080/apex/emp_json) but again I only get the authentication required popup. I've tried the password for various db users here e.g. APEX_REST_PUBLIC_USER but I just get a not found response.

2015-08-06 11:24:29.520:INFO::main: Logging initialized @764ms
Aug 06, 2015 11:24:29 AM oracle.dbtools.standalone.StandaloneJetty setupDocRoot
INFO: The document root is serving static resources located in: E:\software\ords\ords\standalone\doc_root
2015-08-06 11:24:29.972:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2015-08-06 11:24:29.972:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@83f700d{/,null,AVAILABLE}
2015-08-06 11:24:30.019:INFO:/ords:main: INFO: Using configuration folder: E:\software\ords\ords
2015-08-06 11:24:30.019:INFO:/ords:main: FINEST: |ApplicationContext [configurationFolder=E:\software\ords\ords, services=Application Scope]|
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_al
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_al is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_pu
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_pu is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_rt
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_rt is correctly configured
2015-08-06 11:24:30.582:INFO:/ords:main: INFO: Oracle REST Data Services initialized|Oracle REST Data Services version : 3.0.1.177.18.02|Oracle REST Data Services server info: jetty/9.2.z-SNAPSHOT|
2015-08-06 11:24:30.597:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1f0f2a1a{/ords,null,AVAILABLE}
2015-08-06 11:24:30.613:INFO:oejs.ServerConnector:main: Started ServerConnector@5c702c89{HTTP/1.1}{0.0.0.0:8080}
2015-08-06 11:24:30.613:INFO:oejs.Server:main: Started @1857ms

推荐答案

该数据库在端口8080上具有XDB的默认Web服务器.

The database has a default webserver for XDB that is on port 8080.

如果我导航到 http://localhost:8080/ords ,则会获得身份验证 必填弹出窗口-需要用户名和密码.服务器说 XDB.

If I navigate to http://localhost:8080/ords I get an Authentication required popup - requires a username and password. The server says XDB.

以此更改该端口

SQL> -- set http port
SQL> begin
 2    dbms_xdb.sethttpport('9090');
 3  end;
 4  /

或通过编辑E:\ software \ ords \ ords \ standalone \ standalone.properties更改ORDS的端口

OR change the port for ORDS by editing E:\software\ords\ords\standalone\standalone.properties

#Tue Feb 06 12:26:12 EST 2018
jetty.port=9090                 <<<<<<<<<<< CHANGE THIS >>>>>>>>>>
standalone.access.log=/tmp/ordsLOGS
standalone.context.path=/ords
standalone.doc.root=/Users/klrice/workspace/githubTools/trunk/ords/
standalone.scheme.do.not.prompt=true
standalone.static.context.path=/i
standalone.static.path=/Users/klrice/workspace/apex_trunk/images

这篇关于无法使Oracle ORDS通过APEX 5 Restful服务和Oracle XE11g来满足请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆