ColdFusion Muse

Able Commerce 5 on CF - Email Problem

Mark Kruger May 4, 2012 6:54 PM ColdFusion Comments (1)

A while back a product called "Able Commerce Builder" (ACB) was a popular (or pseudo popular) platform for CF folks. This would have been as far back as 1999. At some point they hired one of those developers who believe his technology choices are up there with the Scripture and the Holy Grail – but "he chose poorly".

He rewrote the entire application in Java with a ColdFusion facade. He moved everything into objects and the code became a byzantine maze of object instantiation and java arrays and objects and looping. Of course none of ColdFusion's strengths were on display (easy to read code, modifiable queries, list handling, looping and outputing, query objects etc. Thankfully ACB moved on to .NET and left CF behind - and good riddance! They were giving it a bad name. I trust their new platform was written by actual .NET developers - let's hope anyway. I wish them well.

Over the past couple of days ACB on CF has risen its ugly head again. I've been trying (with the help of super Tech Kevin Fatkin at Edge Web) to fix an issue with an ACB server. After an upgrade of the JVM and some hotfixes on a CF server running ACB, the customer discovered email had suddenly stopped going out. The fix for that is simple right? Check out the cfmail tags, double-check resolution, run a few telnets etc. Install a cert etc. Ah... if it were only that easy. In fact ACB under the hood (in keeping with its face melting decision making) reinvented the wheel and deployed its own Java based mail classes. Something changed, email is not going out, and we can't modify it the code in any real way. It's enough to make me want to have my leg chewed off by a Laplander. Fortunately if you have this problem we actually did find a solution.

The Error

Instead of sending out mail this install of ACB was throwing an error that had 2 messages of note:

Error sending email smtp
javax.mail.NoSuchProviderException: smtp

The Fix

Digging around on Google through the various Java forums I found a consensus that this error was related to not having a properly licensed or installed version of the javax mail classes. So I surmised that some part of our Java/CF update had updated these classes. In most installs in the Java world the javax classes in question look like javamail-x.jar and activation-x.jar (where x is some version of the class). But we couldn't find anything in the Lib directory of our ColdFusion install that looked like that. We did however find a "mail.jar" and "activation.jar".

After a few false starts we tried taking the "mail.jar" and "activation.jar" from a pristine ColdFusion 9.0 install (on my desktop) and simply swapping it out with the production jars. Against all hope it actually worked and ACB started sending mail again.

So if you have this problem - where your ACB/CF install stops sending mail after an update - install an unpatched ColdFusion 9.0 onto a desktop somewhere, copy out the coldfusion9/lib/mail.jar and coldfusion9/lib/activation.jar files and replace them into your production lib directory - overwriting the ones that are there. Keep in mind that doing this means you are not going to be able to effectively update your CF install any more... But hey - you are already using ACB so you are living on the edge anyway right? :)

  • Share:


  • steve's Gravatar
    Posted By
    steve | 5/11/12 10:16 AM
    I was once a fan of able commerce too and then they discontinued support and left a whole host of bugs in their version.

    Unfortunately no one has filled the whole of ablecommerce and delivered a full featured, supported ecommerce package in CF.

    I've worked with sitedirector a little, but its not as smooth as I would like. I've installed and used prestashop. Its pretty good and have a big CF style community behind it, but I'm not a PHP guy.