Ajax call to cfc not executing query

New to Lucee and trying to get a query to run inside a cfc that’s being called via ajax get request. (Though it doesnt even work if I call the cfc directly). I’m not getting any error messages, it just doesnt do anything. This is working on my old CF9 box. And If I move the query to the calling .cfm file, it works fine. I’ve enabled debugging and have purposely screwed up the query to attempt to get some sort of error message, but its not even attempting to run the query so no error is generated.

Not sure if I’m missing something in the server setup or not. Here’s the details.

var savePrintDate =
	async: true,  
	url: "cfc/BuildLabels.cfc?method=saveBuildLabelPrintDate&soNumber=" + soNumber + "&lineNumber=" + lineNumber + "&qtytoprint=" + qtytoprint + "&vamLine=" + vamLine, 
	type: "get", 
	dataType: "json",
	success: function (data){
		alert('what the buns');
	error: function (xhr, textStatus, errorThrown){

And the CFC

<cfcomponent output="true">
<cfsetting requesttimeout="10"

<cffunction name="saveBuildLabelPrintDate" access="remote" output="true" returnFormat="json">
    	<cfargument name="soNumber" type="string" required="true" default="" />
        <cfargument name="lineNumber" type="string" required="true" default="" />
		<cfargument name="qtytoprint" type="string" required="true" default="" />
        <cfargument name="vamLine" type="string" required="true" default="" />
       		<cfquery name="rsPrintDate" datasource="USRRad"> 
                INSERT INTO  dbo.BuildLabel
                 ) values (

Any help is appreciated.

What shows up in dev tools network panel?
What do you see if you call that url directly in a browser?
Which version of Lucee are you running?

I see it calling the cfc and returns a 200 status and the page alerts (“what the buns”) as if all is well. It does this when calling it directly as well (obviously without the alert). It even does this when I intentionally mess up the query syntax.


So the problem is it’s not inserting into the table?

try adding some CFLOG and CFQUERYPARAMs

I cant get anything out of that cfc. Its like lucee/tomcat/whatever has no idea what to do with it. I just changed it to .cfm and its working fine, so I’ll run with that.

From your ajax call, could you please confirm your data type? I think it is in a simple text format not a json. I just simply changed the datatype into text, then the function query executed fine inside the cfc with your above test code & data inserted successfully into the table.

Without changes it throws an error but data inserted into the table. But using cfm no error but data didn’t inserted for me.

I’ve changed it to text and it still doesnt work. .cfm works fine.