Next Page

1 2

Previous Page

Thread: Random Null Pointers Error

Created on: 09/21/07 10:52 AM

Replies: 16

Walksalong


New Member


Joined: 09/21/07

Posts: 4

Random Null Pointers Error
09/21/07 10:52 AM

Hello,

I am getting a random NullPointerException error with Soundings. I am using HostMySite as my ISP and mySQL as my database.

view plain print about
1
2 The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
3
4Null Pointers are another name for undefined values.
5
6The error occurred in C:\Websites\136345dp9\cfcs\survey.cfc: line 382
7
8380 :             where    active = 1
9381 :             and        (datebegin is null or datebegin < <cfqueryparam value="#now()#" cfsqltype="CF_SQL_TIMESTAMP">)
10382 :             and        (dateend is null or dateend > <cfqueryparam value="#now()#" cfsqltype="CF_SQL_TIMESTAMP">)
11383 :             </cfif>
12384 :         </cfquery>


I refresh the error page and it goes away. Every few clicks it comes back. Is this due to how CF handles dates and mySQL might want it in a different format?

Many Thanks,
Walksalong

Link | Top | Bottom

admin


Experienced Member


Joined: 04/08/04

Posts: 2,936

RE: Random Null Pointers Error
09/21/07 1:30 PM

Hmmm. Are you using thew custom driver for the MySQL dsn?

Link | Top | Bottom

Walksalong


New Member


Joined: 09/21/07

Posts: 4

RE: Random Null Pointers Error
09/21/07 2:01 PM

HostMySite setup the DSN. I submitted a ticket to see what driver they are using. I'll post the response for future reference.

Thanks

Link | Top | Bottom

hjoreteg


New Member


Joined: 09/27/07

Posts: 7

RE: Random Null Pointers Error
09/27/07 2:18 PM

I'm having the same problem.
- HostMySite.com
- MySQL
- completely random Null Pointers error that goes away when refreshed.

I'm on a windows VPS account with HostMySite. I set up the DSN myself in the CF administrator using the pre-installed MySQL (4/5) driver.

Is there another driver I should be using?

Any help would be greatly appreciated.

Link | Top | Bottom

Walksalong


New Member


Joined: 09/21/07

Posts: 4

RE: Random Null Pointers Error
09/27/07 4:53 PM

Hello,

HostMySite said its a known issue with mySQL and CF8. Their solution was to move the site over to CF7, but I haven't decided whether or not to do that, or create a custom error page to let the user know a refresh will fix the problem.

Link | Top | Bottom

hjoreteg


New Member


Joined: 09/27/07

Posts: 7

RE: Random Null Pointers Error
09/27/07 5:07 PM

I don't buy that answer, here's why:

At one point I was experiencing this as a shared hosting customer (right after they upgraded to CF8) they moved me to another CF8 server and the problem went away (using the very same database on the same database server).

Something was different on that other CF8 server, otherwise the problem wouldn't have been fixed.

Now I upgraded to a VPS and the problem returned. It's some setting or something. It's not a universal problem, because I've experienced it working fine with identical code.

Let me know if you figure anything else out. I contacted them about it as well. I'm waiting to hear back.

- Henrik

Link | Top | Bottom

hjoreteg


New Member


Joined: 09/27/07

Posts: 7

RE: Random Null Pointers Error
09/27/07 5:08 PM

As another note... I don't have the option of going back to CF 7 at this point because a big chunk of my code is dependent on CF8's image manipulation functions.

Link | Top | Bottom

hjoreteg


New Member


Joined: 09/27/07

Posts: 7

RE: Random Null Pointers Error
09/27/07 5:18 PM

one option, like you said Walksalong, would be to use custom error handling and just have the custom error page contain a <cflocation url="#CGI.SCRIPT_NAME#"> to automatically refresh it.

but... that's more of a hack than a solution.

It may work, but I'd rather have the problem fixed at the source than muddy up my code with crappy hacks.

Link | Top | Bottom

admin


Experienced Member


Joined: 04/08/04

Posts: 2,936

RE: Random Null Pointers Error
09/27/07 6:27 PM

So if I read you guys right - this seems like a setting at the server level - and not a problem with the code, right?

Link | Top | Bottom

hjoreteg


New Member


Joined: 09/27/07

Posts: 7

RE: Random Null Pointers Error
09/27/07 6:44 PM

Yes, I've used absolutely IDENTICAL code on two different CF8 servers and the error only occured on one of them.

Both are pulling from the same MySQL 5.0 database. I tried installing Adobe's HotFix 1 for CF8, restarted CF...no luck.

I also deleted and re-entered the DSN and selected the MySQL(4/5) driver in the CF Administrator... still nothing.

It's pretty frustrating, it seems so random. It happens maybe 1 in 25 times I load a page. The weird thing is that it's not any one page in particular. Seemingly ANY page in my site is succeptible at random.

Link | Top | Bottom

Next Page

1 2

Previous Page

New Post

Please login to post a response.