I just got this: `Attribute [datasource] is requir...
# lucee
a
I just got this:
Attribute [datasource] is required when attribute [dbtype] is not [query] and no default datasource is defined
However my
this.datasource
is set in Application.cfc. And my CF2021 instance using the same codebase is running the code fine. The error goes on to say:
you can define a default datasource as attribute [defaultdatasource] of the tag cfapplication or as data member of the Application.cfc (this.defaultdatasource="mydatasource";)
But it shouldn't be
defaultdatasource
. That's not a thing. It should just be
datasource
. And indeed this is what we use all day, every day in our production code. Granted this is on a different Lucee instance that @ work, but it's always been
this.datasource
, has it not?
Lucee 5.3.9.166
.
NB: setting
this.defaultdatasource
in Application.cfc doesn't help anyhow.
Oh. Sigh. It's possibly a side effect of using
runAsync
. Stay tuned... more to follow as it comes to hand...
It's probably a symptom of this: https://luceeserver.atlassian.net/browse/LDEV-3833 I have this:
Copy code
f1 = runAsync(() => {
        queryExecute("CALL sleep_and_return(1)")
        return "in f1"
    })
I suspect the context that
queryExecute
is running in doesn't have the stuff set in Application.cfc available to it.
(code works fine in CF2021, btw, which is my benchmark for such things)
👍 1