2

我一直在尝试建立使用 ORDS 的连接并成功了一次,但现在当我尝试连接到 ORDS 上的数据库时收到 404 错误。

当我第一次登录http://127.0.0.1:1521/ords/sql-developer时,我收到以下消息:

该服务在该环境中被禁用 Stack Trace DisabledException [statusCode=404,reasons=[该服务在该环境中被禁用]]


这是我尝试过的:

java -Doracle.net.tns_admin=C:\Users\ip4169\Desktop\ORDS\ords -jar ords.war 验证

-> 已完成验证 Oracle REST 数据服务版本 19.4.0.r3521226。经过时间:00:00:15.700[检查]

java -Doracle.net.tns_admin=C:\Users\ip4169\Desktop\ORDS\ords -jar ords.war 独立 在此处输入图像描述-> oejs.Server:main: 已启动 @8299ms [检查]


我检查了我的 TNSORA.net 文件,发现我的数据库信息包含在其中。

这是 ORDS 错误页面:如果有人可以帮助我解决这个问题,我将不胜感激!

4

1 回答 1

3

The 404 was happening at login time while trying to access SQL Developer Web for a user.

Two things to check:

  • the database connection pool is correctly configured

  • the schema is rest enabled

In this case the pool wasn't being established at startup because the ORDS_PUBLIC_USER password wasn't correct - ORDS couldn't create database connections.

Once the database user password was reset to what was defined in the pool config XML file, an ords restart showed the pool being established. Check the stdout when starting ords for errors!

If on the other hand you're getting errors trying to access the App in general at the /ords/sql-developer url, then -

You need to ensure SQL Developer Web is enabled.

Add these lines to your defaults.xml file and restart ords

<entry key="feature.sdw">true</entry>
<entry key="restEnabledSql.active">true</entry>
于 2020-03-12T17:56:29.870 回答