如何解决静态文件的 Apex / Ords 配置

How to solve Apex / Ords Configuration of Static Files

我在 Windows 平台上使用 Oracle XE 18C。我安装了 Apex 18.2,然后安装了 ORDS 18.4。我按照 Apex 18.2 https://docs.oracle.com/en/database/oracle/application-express/18.2/htmig/configuring-Oracle-REST-data-services.html#GUID-AD38DE06-A560-4D6D-BD50-6E5A8E513BBF.strong text

安装指南第 1.3.4.1 节中的说明进行操作

我创建了两个用户:使用以下命令:

ALTER SESSION SET CONTAINER=XEPDB1;
create user APEX_LISTENER identified by (password) account unlock;
create user APEX_REST_PUBLIC_USER identified by (password) account unlock;

当系统提示我输入 "Enter the Apex static resource location" 时,我回复了 C:\app\product\apex\images

安装顺利进行。我查看了 C:\Users(my_username) 中的所有日志。没有一次提到 "error" 或 "warning".

在 Apex 安装指南的第 4.6 节中,它指示将 Apex 图像文件夹复制到 ORDS。我将 C:\app\product\apex\images 复制到 C:\app\product\ords\images。然后我 运行 @apex_rest_config.sql 来自 SQL Plus。好像完成了。

当我尝试通过浏览器 (localhost:9090/ords/apex) 访问 Apex 时,我收到一个弹出错误:"There are issues with the configuration of the Static Files in your environment. Please consult "配置静态文件支持" Application Express 安装指南中的部分。"

如果我在提示中单击“确定”,我可以继续进入 Apex 登录屏幕。我能够登录并进入第一个屏幕。但是,我想在继续之前解决错误。

知道我为什么会收到此错误吗?感谢您查看此内容。

安装 XE 18C 后编辑 TNSNAMES.ORA 文件:

XEPDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = xepdb1)
    )
  )

然后我意识到我必须在同一个 PDB 容器 (XEPDB1) 中安装 Apex 18.2 和 ORDS。以下是 SQLPlus 中的步骤:

Alter Session set container=XEPDB1;
@apexins SYSAUX SYSAUX TEMP /i/ -- (Note: This creates users APEX_180200, APEX_PUBLIC_USER, APEX INSTANCE_ADMIN_USER and FLOWS_FILES in the XEPDB1 container.  Only APEX_INSTANCE_ADMIN_USER is Open.  All others are locked.) 
Select Status from dba_registry Where Comp_ID = 'APEX'; -- (This should return “VALID” if apex was properly installed.)
@apxchpwd -- (Note: this will change the password for the Apex ADMIN account) 
Alter Profile DEFAULT limit password_life_time unlimited;
Alter User APEX_PUBLIC_USER Identified by password account unlock;
Alter User ANONYMOUS account unlock; 
Alter User FLOWS_FILES account unlock;
Alter User APEX_180200 account unlock;
Commit;
@apex_rest_config.sql -- (Note: This creates APEX_LISTENER and APEX_REST_PUBLIC_USER in the XEPDB1 container and gives them the password you specify in this step.)
@apex_epg_config.sql C:\app\product
Alter User APEX_LISTENER account unlock;
Alter User APEX_REST_PUBLIC_USER account unlock; 
Alter Session set container = CDB$ROOT;
Alter User XDB account unlock;
Exit

我从那里安装了 ORDS 18.4

java -jar ords.war install advanced
Configuration Data = C:\app\product
Database Service Name = XEPDB1
Apex Static Resource Location = C:\app\product\apex\images