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

时间:2019-03-05 22:16:02

标签: oracle-apex-18.2

我在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文本

的安装指南中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;

当系统提示我输入“输入Apex静态资源位置”时,我回答了 C:\ app \ product \ apex \ images

安装没有错误。我查看了C:\ Users(my_username)中的所有日志。没有提到“错误”或“警告”。

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

当我尝试通过浏览器( localhost:9090 / ords / apex )访问Apex时,出现一个弹出错误:“您的环境中静态文件的配置存在问题。请请参阅《 Application Express安装指南》中的“配置静态文件支持”部分。

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

有什么主意为什么会出现此错误?感谢您的关注。

1 个答案:

答案 0 :(得分:0)

安装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