Main

April 10, 2008

Installing Coldfusion and JRun on OS X

I spent a lot of time getting ColdFusion to run on Leopard. I wish I had kept better track of all the errors I sorted through on path to figuring it out, but unfortunately I didn't.
Here were the biggies though. First make sure to get Update 7 for JRun. I didn't find the updates at first which slowed me down.

Additionally (and the most frustrating), is it turned out that setting java.home in jvm.config was not enough to make JRun use the specified JRE. I wanted it to use JVM 1.5.0. Running './jrun -info' (from the JRun bin directory) returned "Apple Inc. 1.5.0_13-119 Java HotSpot(TM) Client VM", so it appeared to be finding the JVM I wanted it to use, but it wasn't working. So I set the classpath in ~/.bash_profile as well. That didn't cut it either. Finally I found Steven Erat's entry where he had similar issues.

What did resolve it was to change the CurrentJDK alias in System/Library/Frameworks/JavaVM.framework/Versions in addition to the changes already made.
Steven's entry has good directions on how to do so. It seemed to me that setting java.home in jvm.config should have taken care of everything, but it didn't You can to set the JVM in 3 places.

Once I had it running with JDK 1.5, I'd get this error:

Error 500

Could not invoke Java compiler, please make sure jikesw is in /Applications/JRun4/bin or put a JDK bin directory in your path.

jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could not invoke Java compiler, please make sure jikesw is in /Applications/JRun4/bin or put a JDK bin directory in your path.
at jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:474)
.................

Basically it can't find javac, and I still have no idea why. The servers running but the sample JSP's aren't getting compiled. You could probably just compile the apps manually but I haven't done that.

Well, there's no great solution here, but hopefully this'll help you to get going with whatever you decide. The problem with changing the CurrentJDK alias to 1.4.2 is that then everything on your system will be using that. That's a hassle for me with all my Eclipse installs, etc where I need JDK 1.5.

April 02, 2008

Flex and ColdFusion: RemoteObjects and WebServices

Once you have a ColdFusion CFC you can call it's methods with a RemoteObject or via a WebService. RemoteObjects are usually preferred for their performance speed.

Here we'll create a super basic example of calling a CFC from both a WebService and a RemoteObject. The application will simply let you enter your name, click a button, call the CFC and return a welcome message including your name.

Continue reading "Flex and ColdFusion: RemoteObjects and WebServices" »