问题
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?
- Version of ords?
- Are you migrating the Apex or is a fresh installation?
- Is it a prod or the dev installation?
- Is your database PDB or not?
I will provide the solution according to your answer?
Here are the steps without using SQL Developer?
- Install java 7+ and TOMCAT
- Setup JAVA_HOME
- Make sure tomcat is configured correctly by running the tomcat server without ords.war.
- 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;
- create folders /opt/ords/war_file /opt/ords/config
- download ords.war into /opt/ords/war_file folder
- create directory /opt/ords/config
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.
copy /opt/ords/war_file/ords.war to /opt/tomcat/apache-tomcat/webapps/ folder
run tomcat and browse to
http://server-ip:8080/ords
you should get the ords page with 404 Not Found
- 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;
/
- Now browse to
http://server-ip:8080/ords/schema-alias/table-alias
- To Disable Schema
BEGIN ORDS.ENABLE_SCHEMA( p_enabled => FALSE, p_schema => '<schema-name>'); end; /
- 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