nullPointerError

Description

The following code throws an nullpointer error inside the thread. If you remove the code from the thread you do not get the error. This is causing MAJOR issues in my environment. In my environment the function you see inside the thread is that returns the message is a call to another cfc. I upgraded to the most recent release do to another issue of variable cannot be modified outside the thread scope (which I cannot give you code to dupliate yet)

cfthread(
action="run"
emailid = 'AA75EDEF-8004-47A9-B1E6-5D3C9FBD3FA5'){

function getMessageId(){
return
}

function getMessage(){
local.retVal = {
message: "'to' parameter is not a valid address. please check documentation"
}

return local.retVal;
}

local.ret = getMessage();

local.queryoptions = {'datasource': application.companyid};

//not a campaign so just note the error in the outbox
local.queryparams = {
'emailid' : {'value' : attributes.emailid, 'cfsqltype':'cf_sql_varchar'}
, 'status' : {'value' : 'E', 'cfsqltype':'cf_sql_varchar'}
, 'mail_gateway_messageid' : {'value':'', 'cfsqltype':'cf_sql_varchar'}
, 'senderr' : {'value' : local.ret.message, 'cfsqltype':'cf_sql_varchar'}
}

savecontent variable="sql" {
writeoutput("
UPDATE mailoutbox
SET Status = :status
, mail_gateway_messageid = :mail_gateway_messageid
, senderr = :senderr

WHERE EmailID = :emailid
");
}

local.rsUpdate = QueryExecute(sql, local.queryparams, local.queryoptions);
}

dump(cfthread);

Environment

Windows / Tomcat

Activity

Show:
Pothys - MitrahSoft
November 2, 2020, 10:19 AM

, I've added a stack trace here

Michael Offner
November 2, 2020, 1:02 PM

Michael Offner
November 2, 2020, 1:03 PM

please give it an try with 5.3.8.99 and if ok move to deployed

Pothys - MitrahSoft
November 2, 2020, 1:50 PM

I've checked this ticket with fixed version 5.3.8.99-SNAPSHOT. Yes, it works fine now.

Lyle Karstensen
November 2, 2020, 3:09 PM

Thanks everyone.

Fixed

Assignee

Pothys - MitrahSoft

Reporter

Lyle Karstensen

Priority

New

Labels

Fix versions

Affects versions

Configure