For those of you looking at the site or following me on twitter (@dfgrumpy) already know some of this. Yesterday (12/27/09) we switched our podcast site (cfhour.com) from BlogCFC to Mango Blog. After a couple weeks of getting everything ready the push went well. Site was down for only a couple minutes and the new site was up.

Once the site was up I sent a message on twitter that we changed the site. Within minutes I received multiple messages that users were getting an error screen. After digging for about an hour I found what I thought was the issue.

I then sent out another tweet that I fixed it. A little while later I received another message that the site was still having issues. This is where I went crazy. As with the error before all I was seeing on the site was a message that said "error:". No details, no nothing. This time the log generated by Mango was blank (more on this in a bit).

I now started making alterations to Mango's error trapping to get the error message. My main handicap in this was that I did not have access to the ColdFusion administrator. I Was unable to look at it's error log, which I am certain, the error was there.

After tons of trial and error I was finally able to get an error message displayed (excerpt). The error wouldn't happen on every request but if I waited a couple minutes between requests it happened every time.

view plain print about
1java.lang.NullPointerException
2    at com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178)
3    at coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)

A quick search in the net produced many entries about an issue with ColdFusion 8 and MySQL (my environment). There were many solutions and suggestions provided. But almsot all of them had the same ultimate solution. The solution seemed to be to uncheck "maintain database connections" for the DSN in the ColdFusion Admin.

I checked my dev server setup and it had the option unchecked already. I altered my dev setup and turned on maintain database connections. I was then able to duplicate the issue locally.

I then sent a quick message to my host asking them to reconfigure the DSN for the site. I had them uncheck "maintain database connections".

After all this I remembered running into this issue about a year ago. I used the same solution then to correct the issue and, if memory serves, there were no side affects.

So, in conclusion I learned a couple things:

1: Mango Blog error trapping is great. But at some times to great and actually prevents an error from being displayed. 2: Mango Blog generates an html log file that is web accessible. Not sure this is a good idea as it could expose sensitive info. 3: Make sure your Dev and Prod environments are identical so you can catch errors before launch.

Till next time,

--Dave