Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Installing Oracle REST Data Services (ORDS) on Tomcat

I have installed JDK and Tomcat 8 on the server. Now I need to install ORDS and connect it to Tomcat. I went through various documentation and downloaded ORDS on the server. Now I have a couple of questions as all this stuff is new to me and documentation is not very clear most of the time.

There is java.exe in the directory to which I installed JDK and there is java.exe in the directory where all the ORDS files are unzipped. Does it matter which one I use to run the installation?

java -jar ords.war standalone --port 8090

Open in new window


Now my second question is do I run standalone ORDS installation and specify port 8090 and then copy ords.war file into Tomcat diirectory Tomcat/webapp and make sure Tomcat is running and it will install ords on its own? That's where I am confused...

My third question is how do I check if ORDS has been installed correctly? Would going to http://localhost:8090/ords suffice?

P.S. Oracle database installed on another server, I have all the passwords, hostname, port, and service name. APEX is also installed on another server.
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Take a look at one of these guides:

https://oracle-base.com/articles/misc/articles-misc#ords

You can run ORDS as standalone and/or deploy the WAR file in your Tomcat server and run it there. Installation and setup is quite straightforward as shown in the guides. You need to call some of the following depending on what you need
java -jar ords.war configdir

Open in new window

java -jar ords.war static

Open in new window

java -jar ords.war setup --database <your_db>

Open in new window

Avatar of YZlat

ASKER

Than you for your reply but that really does not answer my original questions? Would you be able to answer the question? I'd really appreciate it!
ASKER CERTIFIED SOLUTION
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

Thank you! Now the error I am getting is not 404 but it has a problem with lmage directiry. We copied images folder from Apex onto the server and specified it in ords installation while installing prds as standalone. Then we copied that directory into Tomcat/webapps/j/ folder. And then I also copied ords.war file into webapps. But still we are getting an error when opening localhost:8090\ords. Do you know what could it be?

Error is:

"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."
Have you tried to reset the image prefix as mentioned in the error message?!

https://ruepprich.wordpress.com/2011/04/14/changing-the-image-path-andor-directory-in-apex/

Plus: check the Apache config file, which eventually needs an alias entry, e.g. "Alias /j/ "/path_to_images/""
https://gist.github.com/mortenbra/faf34058914947487d1c

By the way: Copying the image directory is (always) a bad idea ;-) This should be found in just one location!
Avatar of YZlat

ASKER

In the ORDS config file - standalone.properties we have :

standalone.static.context.path=/j/
standalone.static.path=C:\\Tomcat\\webapps\\j\\

Open in new window


Could it be a problem that APEX is not installed on the same server as ORDS? I read that APEx is not necessary for ORDS. Both the database and APEX are installed on a different server. APEX directory there is set to /j/.

How can I restart Tomcat and ORDS on windows? I found instructions but they are for UNIX
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

I meant that APEX (where the original images/ directory is installed on the different server, not he one where we installed Tomcat and ORDS.

Could you please explain more about Windows snapshot? And also what is "Strg"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

I guess I am confused with how the whole thing gets connected as far as image folder goes. So there is a server1 with Oracle DB and APEX. Then there is server2, which we are dealing with, where we have installed JAVA SDK and Tomcat. Now we have also installed ORDS in standalone mode, and then (in error) also copied ords.war folder into Tomcat webapps directory). So I am guessing ORDS now have been installed twice....

When installing ORDS we specified images directory as C:\apex\images on server2. And then during the installation was done we copied the actual images from server1 into C:\APEX\images directory. Then we copied the contents of that directory into the Tomcat\webapps\j\ directory after installation completed. Sounds like a whole lot of mess to me.
 Could you please recommend a way to fix this?

If we run reset_image_prefix.sql on server1, I do not see how would it fix things on server2...
APEX's static image directory is just referenced through the alias (default /i/, in your case /j/), but there should be no need to copy that around ;-)
Avatar of YZlat

ASKER

You have helped me sufficiently so I wanted to accept you comment as an answer but my problem still stands, so could you please take a look at the new question I opened?

https://www.experts-exchange.com/questions/29005356/ORDS-and-Tomcat-images-prefix-path-might-not-be-correct.html
Avatar of YZlat

ASKER

Thank you for all your help!
Ok, I will look into it ;-)
Avatar of YZlat

ASKER

Thank you!