Tuesday, December 21, 2010

Java 1.5 or 1.6 with Coldfusion 7

Trying to upgrade coldfusion jvm directly to java 1.5 or 1.6 will cause "Unsupported major.minor version" and/or "CFCServlet must be initialized". These are the steps I used to get ColdFusion MX7 on windows with embedded JRun working with the Sun JDK 1.5. Haven't tried it on linux. Probably will doing it soon.

  1. Download jrun updater 7 http://www.adobe.com/support/jrun/updaters.html
  2. Stop coldfusion service.
  3. Install jrun updater on runtime folder of your coldfusion MX7. 
  4. Download and install JDK 1.5 or 1.6.
  5. Open jvm.config file found in the runtime\bin folder.
  6. Modify java.home to point to your JDK folder (for example, java.home=C:/Program Files/Java/jdk1.6.0_11)
  7. Open web.xml file found in the wwwroot\WEB-INF folder.
  8. Now the tricky part, change MessageBrokerServlet load order to other than 1. In my case, I change it to 4.
    • Example: from <load-on-startup>1</load-on-startup> to <load-on-startup>4</load-on-startup>
  9. Restart your coldfusion server.
Now you can use your favorite java library with Coldfusion 7. Use it at your own risk.

*Step 8 will prevent "CFCServlet must be initialized" error from appearing. Why this step fixed that error?. I'm not really sure. If you know why, please share the info with me.

Posted via email from Aerialicious Solution

No comments: