Fixing Railo and Resin on Snow Leopard

After upgrading to Snow Leopard, I found that my Railo install was not working anymore. I followed Luis Majano’s instructions for getting it setup on Leopard to begin with and the only way it would work for me was to switch the built-in Apache binary to the 32-but mode and then compile the mod_caucho apache module.
Well after the upgrade, that no longer worked. I couldnt get apache to start with the 64-bit architecture removed from the httpd binary so I had to find another way. After a bit of investigating, I found that the configure script checks my Java install for 64-bit compatibility and during that check it was returning that it wasnt 64-bit Java. Hmmm now wasnt Snow Leopard supposed to be all about 64-bit? So I checked my java binary for 64-bit support using the following from the terminal:

file /usr/bin/java

That returned:

/usr/bin/java: Mach-O universal binary with 3 architectures
/usr/bin/java (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/java (for architecture i386): Mach-O executable i386
/usr/bin/java (for architecture ppc): Mach-0 executable ppc

It was showing 64-bit support, so what was the issue? So back into the configure script I went. It turns out that it was checking a symlink which points to the current JVM install.

/System/Library/Frameworks/JavaVM.framework/Versions/Current

In my case, the symlink “Current” was pointing to a folder in the same directory named simply “A”. I have no idea where that came from since I never mess with the built-in Java on my mac. There was however several other directories and symlinks in the same folder that pointed to the “1.6.0” directory. So I simply deleted the “Current” symlink and recreated it to point to the 1.6.0 directory.

[russ@Prime:/System/Library/Frameworks/JavaVM.framework/Versions]$ sudo ln -s 1.6.0 Current

That created a symlink pointing to the newest JVM on my system. Then back in my Railo install directory which happened to be /Applications/railo, I ran the configure script again.

./configure --with-apxs=/usr/sbin/apxs --enable-64bit

After checking the output of the configure script, I found this line:

-n checking if Java is 64-bit... yes

Success! Then I simply ran make then make install to install the newly compiled 64-bit mod_caucho module and restarted apache.
Now Railo is up and running again on Snow Leopard!

3 thoughts on “Fixing Railo and Resin on Snow Leopard”

  1. the A symlinks were made by the system in leopard as there were many different jvm’s available and in a clean install of Snow Leopard there is only java 1.6

Leave a Reply

Your email address will not be published. Required fields are marked *


*