0

当我尝试获取http://localhost:8080/ords/时,它给了我:

URLMappingNotFoundException [statusCode=404, reasons=[The request could not be assigned to any database. 
Check if the request URL is correct and if the URLs to the database mappings have been configured correctly]...

运营部门在开发机器上以独立模式而不是 APEX 安装了 ORDS 19.4。他们向我发送了他们的文件 ords_params.properties。

我自己在本地机器上从 SQL Developer 运行 ORDS。

我已经使用用户 ords_admin 打开了 REST 数据服务管理,并输入了来自 TNS 的全局连接和 ORDS_PUBLIC_USER 的默认密码,如参数文件中所指定。

如果我通过Test Configuration验证,说明配置成功。

我选择上载设置以将更改上载到 ORDS,因此它们将反映在 defaults.xml 中。

我没有在数据库值中指定任何连接,所以它没有连接池。该方案已启用 REST。与数据库的连接是通过 TNS

我提供了执行日志,以及文件 tnsnames.ora、ords_params.properties、defaults.xml、standalone.properties 和 url-mapping.xml。

存档:tnsnames.ora

DECORP5 = 
  (DESCRIPTION = 
    (ADDRESS = (PROTOCOL=TCP) (HOST=exahost.gobe.pri) (PORT=1521) ) 
    (CONNECT_DATA= (SERVICE_NAME=decorp5) ) 
  )

存档:ORDS 日志

D:\app\my_user\product\12.2.0\dbhome_1\SQLDEVELOPER\jdk\jre\bin\java -Duser.language=es -Duser.country=ES -jar D:\app\my_user\product\12.2.0\dbhome_1\ords\ords.war configdir D:\app\my_user\product\12.2.0\dbhome_1\ords\configuracion
2020-04-21T09:05:48.748Z INFO   Defina config.dir en D:\app\my_user\product\12.2.0\dbhome_1\ords\configuracion en: D:\app\my_user\product\12.2.0\dbhome_1\ords\ords.war
D:\app\my_user\product\12.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin>
D:\app\my_user\product\12.2.0\dbhome_1\SQLDEVELOPER\jdk\jre\bin\java -Duser.language=es -Duser.country=ES -jar D:\app\my_user\product\12.2.0\dbhome_1\ords\ords.war standalone --parameterFile D:\app\my_user\product\12.2.0\dbhome_1\ords\params\sqldev_ords_params.properties
2020-04-21T09:05:55.067Z INFO   Usuario creado: ords_admin en archivo: D:\app\my_user\product\12.2.0\dbhome_1\ords\configuracion\ords\credentials
2020-04-21T09:05:55.100Z INFO   Usuario creado: ords_dev en archivo: D:\app\my_user\product\12.2.0\dbhome_1\ords\configuracion\ords\credentials
2020-04-21 11:05:56.356:INFO::main: Logging initialized @4022ms to org.eclipse.jetty.util.log.StdErrLog
2020-04-21 11:05:56.584:INFO:oeju.TypeUtil:main: JVM Runtime does not support Modules
2020-04-21T09:05:56.774Z INFO   HTTP and HTTP/2 cleartext listening on host: localhost port: 8080
2020-04-21T09:05:56.828Z INFO   The document root is serving static resources located in: D:\app\my_user\product\12.2.0\dbhome_1\ords\configuracion\ords\standalone\doc_root
2020-04-21 11:05:57.269:INFO:oejs.Server:main: jetty-9.4.24.v20191120; built: 2019-11-22T11:09:44.612Z; git: 8b8c80157294e38f81ef8ea2358a0c49bf5db918; jvm 1.8.0_212-b10
2020-04-21 11:05:57.292:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2020-04-21 11:05:57.292:INFO:oejs.session:main: No SessionScavenger set, using defaults
2020-04-21 11:05:57.293:INFO:oejs.session:main: node0 Scavenging every 600000ms
2020-04-21T09:05:57.790Z INFO   No pools configured yet
2020-04-21T09:05:57.901Z INFO   Oracle REST Data Services initialized
Oracle REST Data Services version : 19.4.0.r3521226
Oracle REST Data Services server info: jetty/9.4.24.v20191120

2020-04-21 11:05:58.350:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@35a50a4c{/ords,null,AVAILABLE}
2020-04-21 11:05:58.351:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@3439f68d{/,null,AVAILABLE}
2020-04-21 11:05:58.397:INFO:oejs.AbstractConnector:main: Started ServerConnector@b9b00e0{HTTP/1.1,[http/1.1, h2c]}{0.0.0.0:8080}
2020-04-21 11:05:58.398:INFO:oejs.Server:main: Started @6064ms
2020-04-22T07:29:33.891Z INFO   reloaded pools: []

存档:ords_params.properties

db.connectionType=tns
db.tnsDirectory=/network/admin
db.tnsAliasName=decorp5
rest.services.ords.add=true
schema.tablespace.default=SYSAUX
schema.tablespace.temp=TEMP
user.public.password=ordsdesa1ublic
user.tablespace.default=SYSAUX
user.tablespace.temp=TEMP
bequeath.connect=false
ords.admin.password=oracle
ords.admin.username=ords_admin
ords.sqldev.password=oracle
ords.sqldev.username=ords_dev
restEnabledSql.active = true
plsql.gateway.add=false
rest.services.apex.add=false
standalone.mode=true
standalone.http.port=8080
standalone.use.https=false
migrate.apex.rest=false

存档:standalone.properties

jetty.port=8080
standalone.context.path=/ords
standalone.doc.root=D\:\\app\\my_user\\product\\12.2.0\\dbhome_1\\ords\\configuracion\\ords\\standalone\\doc_root
standalone.scheme.do.not.prompt=true
standalone.static.context.path=/i
standalone.static.do.not.prompt=true

存档:defaults.xml

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>
<   Listener Administration
<   Oracle SQL Developer 19.2.1.247.2212
<   Last Update: Wed Apr 22 12:13:34 CEST 2020
</comment>
<entry key="db.password">@05D9AD8E979160A32...</entry>
<entry key="db.connectionType">tns</entry>
<entry key="db.hostname"/>
<entry key="db.port">1521</entry>
<entry key="db.tnsAliasName">DECORP5</entry>
<entry key="db.tnsDirectory">D:\app\my_user\product\12.2.0\dbhome_1\network\admin</entry>
<entry key="jdbc.DriverType">thin</entry>
<entry key="jdbc.InitialLimit">3</entry>
<entry key="jdbc.MinLimit">1</entry>
<entry key="jdbc.MaxLimit">10</entry>
<entry key="jdbc.MaxStatementsLimit">10</entry>
<entry key="jdbc.InactivityTimeout">1800</entry>
<entry key="jdbc.statementTimeout">900</entry>
<entry key="security.inclusionList"/>
<entry key="security.exclusionList"/>
<entry key="security.disableDefaultExclusionList">false</entry>
<entry key="security.validationFunctionType">plsql</entry>
<entry key="security.requestValidationFunction"/>
<entry key="security.maxEntries">2000</entry>
<entry key="security.verifySSL">false</entry>
<entry key="cache.caching">false</entry>
<entry key="cache.procedureNameList"/>
<entry key="cache.type">lru</entry>
<entry key="cache.maxEntries">500</entry>
<entry key="cache.expiration">7</entry>
<entry key="cache.duration">days</entry>
<entry key="cache.directory">/tmp/apex/cache</entry>
<entry key="procedure.preProcess"/>
<entry key="procedure.postProcess"/>
<entry key="misc.defaultPage">apex</entry>
<entry key="apex.docTable">FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$</entry>
<entry key="apex.extensions"/>
<entry key="log.procedure">false</entry>
<entry key="debug.output">console</entry>
<entry key="debug.printDebugToScreen">true</entry>
<entry key="error.keepErrorMessages">true</entry>
<entry key="log.logging">false</entry>
<entry key="status.statistics">true</entry>
<entry key="apex.excel2collection">false</entry>
<entry key="apex.excel2collection.onecollection">true</entry>
<entry key="apex.excel2collection.useSheetName">false</entry>
<entry key="apex.excel2collection.name"/>
<entry key="sqldev.name">Configuración de Administración</entry>
<entry key="sqldev.description">Administración de los servicios REST a desarrollar en la instancia corporativa DECORP5.</entry>
<entry key="sqldev.version">19.2.1.247.2212</entry>
<entry key="restEnabledSql.active">true</entry>
<entry key="jdbc.MaxConnectionReuseCount">1000</entry>
<entry key="cache.monitorInterval">60</entry>
<entry key="misc.compress"/>
</properties>
```

存档:url-mapping.xml

```
<?xml version="1.0" encoding="UTF-8"?>
<pool-config xmlns="http://xmlns.oracle.com/apex/pool-config"/>
```

非常感谢您提出这个问题。

4

0 回答 0