I've set up my local development environment to run my CFML engines under Tomcat. Thanks to Matt Woodward for his thorough blog post and to both Matt and Jamie Krug for some additional help it wasn't too onerous a setup. This allows me to easily run multiple CFML engines (e.g., CF8, CF9, Railo and OpenBD) simultaneously. I just ran into a problem trying to use ColdFusion 9's ORM features under this setup, and that's what the remainder of this post is about.
When trying to test some of CF9's ORM features I ran into a strange problem. Whenever I called a function that interacted with Hibernate I would just get a blank screen returned to me. No ColdFusion error message, no output, just a blank screen. This was a bit difficult to debug, but when I checked ColdFusion's application.log I saw an error message. It said:
javax/transaction/Synchronization The specific sequence of files included or processed is: /Applications/tomcat/webapps/cfusion9/index.cfm, line: 10
Thanks to an email from Dave Shuck to a forum, I saw that someone else was experiencing a similar problem. It had to do with a some JEE functionality that is missing from Tomcat. Thanks to some additional information from Elliott Sprehn and Rupesh Kumar I was able to locate and install the jar file required, after which everything worked.
Here are some step-by-step instructions on how to fix this issue:
- Download the latest copy of the JTA classes from Sun.
- Browse to http://java.sun.com/javaee/technologies/jta/index.jsp
- Under Downloads, click on the first Download button for class files. Currently that button follows a label for Class Files 1.1, and takes you to a page titled Java Transaction API Classes 1.1 .
- Check the box labelled I agree to the Software License Agreement, and click the Continue button.
- Click on the filename, which is currently jta-1_1-classes.zip. I do not recommend using Sun's Download Manager, as it involves a few extra steps. Simply clicking on the filename should allow you to download the zip file to your machine.
- Copy the downloaded file into ColdFusion's lib folder. On my machine (OS X) that's at /Applications/tomcat/webapps/cfusion9/WEB-INF/lib/.
- Rename the file from jta-1_1-classes.zip to jta-1_1-classes.jar.
- Restart Tomcat (or you can probably just restart the CF9 webapp from Tomcat's manager), and you're good to go.