Cfthread NullPointerException

does any one have NullPointerException when run a cfthread after upgrade to ?
downgrading to let cfthread to run again.
we have two server configuration, and both has the same problem:

1 server
OS : Ubuntu 20.4.2 LTS
JAVA : 11.0.11 (Ubuntu) 64bit
Tomcat Version: 9.0.35

server number 2
OS: debian 10
here we made a fresh installation from the new bin file downloaded from luce download page

so java was the embedded packet in lucee and the same for tomcat
but we had the same problem


can you share a bit more of the stacktrace? (5 more lines or so) you omitted all the interesting bits

hy, this is the only text in logs … thread.log … no stack trace inside in both servers








code is

then can you provide us with a little test case which demonstrates the problem?

i cannot give the access to developer server for security reason, also data are strictly secured and iam not autorizhed to do it… but i can write down 10 line of code to demostrate it… sorry for broken english… i ll setup the evoirment asap…

a 10 line simplified test case would be perfect, thanks

sorry, dont understand but is my problem i know)… do u need sample code or a server with the setup and code run on the test server?

Are you including files in your thread? I had issues with this…

yes i use include…

We rolled back back the version on the server performing the threading.

<cfsetting requestTimeOut="9999999999999">
<cfset url.secret = "123">
  <cfset taglicreati = ArrayNew(1)>
  <cfset ArrayAppend(taglicreati, 1)>
<cfthread action="run" name="">
  <cfsetting requestTimeOut="999999999">
  <cfinclude template="/secure/bin/cart_taglio_multi.cfm">

<!---- cart_taglio_multi.cfm ----->

<cfquery name="taglio" datasource="dbmaga">
select *
from xxxxx
where xxxxx.id1 = <cfqueryparam cfsqltype="cf_sql_integer" value="">
and xxxxx.id2 = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.id_odlj#">
and xxxxx.c = FALSE;

<cfloop query="taglio">
    <cfinclude template="cart_taglio_multi_include.cfm">
	<cfexecute name="/usr/bin/convert" arguments='xxxxx'></cfexecute>
	<cfif not isdefined("url.noprint")>
	<cfexecute name="lpr" arguments="-H -P #url.printerpl# xxxxxx.pdf"></cfexecute>

we did the same… no way to run the in production evoirment.

could be related to this (but I’m not sure if it windows only, or maybe linux too, i’m assuming it doesn’t fail on MacOS @micstriit ? )

i will try with full path on include… and i’ll let you know… thanks

Try the snapshot?

sorry to everybody i cannot test at the moment… having developers working hard on dev server…
when they’ll finish i will give a try to both method… full path and snapshot…

Hello - I am not sure if I should create a new topic or not, but I am finding a similar problem. A NPE inside cfthread. I have upgraded to the latest production release and the problem still persists.

I have found that I am getting a NullPointerException when using a custom tag inside a cfthread when the main page request has finished.

I can give you some simple code examples to recreate.

I have a customTag directory in the root of our application and it’s mapping is defined in the /lucee/admin/server.cfm page. I have create a trivial file in there called dollar.cfm

<cfif thisTag.executionMode is 'start'>
	<cfparam name='attributes.value' type='string' default='0'>

Then I have a test page that runs:

<!--- This works --->
<cfoutput><cf_dollar value="100" /></cfoutput><br />

<!--- This will throw an error into the systemOut --->
<cfthread action="run" type="daemon">
    <cfset y = 55 />
    <cfset systemOutput("Sleeping 3 sec ...", true) />
    <cfset sleep(3000) />
    <cfset systemOutput("Awake", true) />
        <cfsavecontent variable="x">
            <!--- <cfmodule template="/customTags/dollar.cfm" value="#y#"> If I use this instead, it will not error --->
            <cf_dollar value="#y#" />
        <cfset systemOutput("x: #x#", true) />
        <cfcatch type="any">
            <cfset systemOutput(cfcatch, true) />

Done ...
<!--- If I uncomment this, I do not get the NPE --->
<!--- <cfset threadJoin() /> --->

So the NPE only really happens if the main page request finishes (that is why the 3 second sleep in there)

Yes, this is regression in lucee latest versions and its start from onwards. Can you file a bug here ?

No problem. Issue created:


hello everybody
also for us… in the problem still persist…