Posted in ColdFusion | Posted on 09-28-2007 | 8,001 views
So here is a weird one for you. I've got a bug report over on my Soundings forum where a user reports getting NPEs (Null Pointer Exceptions). The errors are random, and go away immediately if you refresh the page. If you read the thread, you will see that HostMySite is saying it is an issue with ColdFusion 8 and MySQL. Their "solution" is to roll back the client to ColdFusion 7.
Now what's odd is - I have a client who uses HostMySite, and they were having the same issues. Not with Soundings, but just with their CF code in general. (CF8+MySQL)
I finally put two and two together a few minutes ago. Is anyone else experiencing this? I've checked the client's code for obvious issues - and while I found a missing var statement or two - those were all patched up. The site has no load now at all.


http://www.coldfusionjedi.com/index.cfm/2007/9/12/...
I wonder if we are seeing a bug in CF8+MySQL?
I know that helps but..... it seems as though the config has some issues to be worked out on cfm8.
I don't recall whether NPEs were a part of the error messages I received, but it sounds very familiar.
They said that one's been fixed and will be in the next hotfix.
They also sent me the fix. I don't know if it's related at all tho. Doesn't sound like it..
Will
Before that, Occasionally, when I selected category view on Blog CFC I'd get a Null Pointer - and I had no idea why....
The fix was to add the following to the connection string for the DSN in ColdFusion Admin:
zeroDateTimeBehavior=convertToNull
The fix has to to do with a bug in MySQL referenced here:
http://bugs.mysql.com/bug.php?id=13261
When using the MySQL 3.x drivers in CF7 this issue never revealed itself, but when upgrading to CF8 and using the MySQL 4/5 drivers, it popped up. Please let us know if you have any additional questions about this issue.
Null Pointers are another name for undefined values."
I'm actually getting those, too.
We're using CF8 that's connecting to a mySQL database on another network.
Refreshing the page causes the error to disappear.
Randomly just found this posting. Glad I did.
http://kb.adobe.com/selfservice/viewContent.do?ext...
Havnt seen the new Adobe hotfix on this yet. will have to check it out.
We upgraded our server from CFmx7 to CF8 about a month ago with no issues until now. We are now getting intermittent NPEs. If you refresh a page, the error either goes away or shows a different NPE error. This was all working fine for a month after the upgrade.
We have CF8 installed on CentOS 3.8 with Mysql 4.1.
I have restarted CF8 and the issue is still persisting. I also updated with the CFhotfix 2 and restarted with the issue still persisting.
I'm thinking of uninstalling and reinstalling CF8 tonight. I will post my result.
Uninstalled Coldfusion 8 and did a complete re-install with no improvements. Still getting random intermittent Null Pointer Exceptions.
I talked with our server tech support and they informed me that Apache failed earlier today and had to restart. Thats about when this problem started. They re-compiled apache and I uninstalled and re-installed coldfusion again. This time the errors were less frequent but still there.
I'm not convinced that its a coldfusion issue since it worked without any issues for a month straight.
I also read on a forum that it may be the mysql 4/5 driver so I used the "other" setting for the datasource and the manual driver setup like you had to with CFMX7. Still same issue. Different errors every time you refresh.
Tomorrow i plan to install cfmx7 to test if the problem still occurs.
Will post my results
Thanks Raymond and Matteo!
So initially, the mysql connection string (zeroDateTimeBehavior=convertToNull) didn't work, and unchecking the (Maintain connections across client requests)didn't work. After a third install of cf8 we still got the errors until I put the connection string in with the driver I used with cfmx7 as well as unchecking the Maintain connections across client requests option. Now its been working for over a day with no issues.
What puzzles me is why did it work for a month without any issues using the native Mysql 4/5 drivers?
They're running CF7, no CF8 servers, and very very little support from them. Client is running out of patience and is starting to talk "cf sucks, knew we should have converted the app to ASP".
Site - with some pretty complex CFCs works fine on my test server (CF8), and a 2nd server I installed the site on to show it to them working (CF7).
I was told, by Adobe, that they are not planning on fixing the issue in CF8, but "hopefully" it will work in CF9"
"hopefully" it will work in CF9" --- Yeah and pay another $10 Grand for another licence
http://help.webcontrolcenter.com/Main/frmKBSearch....
One interesting thing is that this only appears to happen after a fresh reboot of the server.
[Add Comment] [Subscribe to Comments]