ORDS and Tomcat - images prefix path might not be correct

不羁岁月 提交于 2019-12-12 06:38:18

问题


I have installed JDK, Tomcat 8 and ORDS on the server. I installed ORDS as standalone and then copied the images folder to j folder undet Tomcat dir/webapps

I am getting the following error when trying to access `http:\localhost:8090\ords

There is a problem with your environment because the Application Express files have not been loaded. Please verify that you have copied the images directory to your application server as instructed in the Installation Guide. In addition, please verify that your image prefix path is correct. Your current path is /j/ (it should contain both starting and ending forward slashes, such as the default /i/). Use the SQL script reset_image_prefix.sql if you need to change it

First I have noticed that my ORDS standalone.properties file did not have an ending \ at the end of the path so I added it but still getting the same error.

Also another developer used /j/ instead of /i/ and I am thinking it might be a problem but then I created /i/ directory and changed standalone.properties but nothing has changed - still getting an error.

My database is on another server and I assume so is the script reset_image_prefix.sql. I might not be able to run it myself, will have to ask a DBA but maybe that is not the problem and I can make a change on my own on the current server?

Can anyone help?


回答1:


@ElenaDBA, could you please answer me the following questions?

  1. Version of ords?
  2. Are you migrating the Apex or is a fresh installation?
  3. Is it a prod or the dev installation?
  4. Is your database PDB or not?

I will provide the solution according to your answer?

Here are the steps without using SQL Developer?

  1. Install java 7+ and TOMCAT
  2. Setup JAVA_HOME
  3. Make sure tomcat is configured correctly by running the tomcat server without ords.war.
  4. Create user for ORDS users
ALTER USER APEX_PUBLIC_USER identified by password123 ACCOUNT UNLOCK;
create USER ORDS_PUBLIC_USER identified by password123; 
alter USER ORDS_PUBLIC_USER identified by password123 ACCOUNT UNLOCK;
grant connect to ORDS_PUBLIC_USER;
  1. create folders /opt/ords/war_file /opt/ords/config
  2. download ords.war into /opt/ords/war_file folder
  3. create directory /opt/ords/config
  4. execute the following:

    cd /opt/ords/war_file
    java -jar ords.war You will be prompted for the oracle database server name, SID, sysdba user password.

Say NO or SKIP to apex installation.

  1. copy /opt/ords/war_file/ords.war to /opt/tomcat/apache-tomcat/webapps/ folder

  2. run tomcat and browse to

    http://server-ip:8080/ords

you should get the ords page with 404 Not Found

  1. ORDS is installed and up and running. Now its time to enable some schema and its object.

Enable Schema:

BEGIN
 ORDS.ENABLE_SCHEMA(p_enabled => TRUE,
   p_schema => '<schema-name>',
   p_url_mapping_type => 'BASE_PATH',
   p_url_mapping_pattern => '<schema-alias>',
   p_auto_rest_auth => FALSE);
commit;
END;
/

Enable Object/Table:

BEGIN
 ORDS.ENABLE_OBJECT(p_enabled => TRUE,
   p_schema => '<schema-name>',
   p_object => '<table-name>',
   p_object_type => 'TABLE',
   p_object_alias => '<table-alias-name>',
   p_auto_rest_auth => FALSE);
 commit;
END;
/
  1. Now browse to

http://server-ip:8080/ords/schema-alias/table-alias

  1. To Disable Schema
BEGIN
     ORDS.ENABLE_SCHEMA(
      p_enabled => FALSE,
      p_schema => '<schema-name>');
end;
/
  1. Uninstall ORDS
cd /opt/ords/war_file
java -jar ords.war uninstall



回答2:


Problem solved! The issue was that images folder copied was not complete, so once we copied images folder that had all the files



来源:https://stackoverflow.com/questions/42442565/ords-and-tomcat-images-prefix-path-might-not-be-correct

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!