Tuesday, May 12, 2009

Oracle running under Railo

I have successfully installed Railo with the free version of Oracle XE. I have also gotten both the Oracle Thin Client and OCI drivers working. I'll let you know what I did to get each working, although, I think that the thin client is sufficient for most needs.

If you installed Oracle XE, the ojdbc5.jar driver is at:
/usr/lib/oracle/xe/product/11.1.0/client_1/ojdbc5.jar

Just copy that file to:
/opt/railo/lib/ojdbc5.jar

Your driver should work now (from the server administrator).

If you prefer to use the OCI driver, I had to get the 11g client from the Oracle website. Installing it was a bear because it required X11 and I am using Amazon EC2. Then you have to copy 3 different files into /opt/railo/libexec/

/usr/lib/oracle/11.1/client/lib/libclntsh.so.11.1
/usr/lib/oracle/11.1/client/lib/libnnz11.so
/usr/lib/oracle/11.1/client/lib/libocijdbc11.so

Hope this helps someone...

posted by Bill Butler at

4 Comments:

Blogger bmelendy said...

Thanks so much for this post! I blew about 6 hours yesterday googling for this information and it wasn't anywhere. Thanks again!

2:10 PM

 
Blogger bmelendy said...

Well, crazy as it sounds, it worked under Windows, but not Linux. I went and try both options with the .jar file and also the OCI drivers downloaded from oracle's website. I downloaded the archive specifically for linux that had both OCI and JDBC drivers. I found I had to create the libexec folder (it wasn't already there) for the OCI drivers. Could I have missed something or is Linux just being difficult?

11:48 AM

 
Blogger bmelendy said...

Ok, I figured this out, I had been using the web administrator to restart RAILO, and it just never took. As soon as I restarted the service from the console, it worked. Go figure. At least it works now.

1:40 PM

 
Blogger Tim said...

You don't need to install Oracle XE client if you are going to connect to an existing Oracle DB on another server. Just download the Oracle JDBC thin client classes12.jar and put it in /opt/railo/lib/ restart railo and it works.

11:12 AM

 

Post a Comment

<< Home