ResultSet object is closed

Hi,

I’m using sqlserver with jtds driver (Lucee 4.5.1.0) and in some sql
updates I see this errors in logs:

Invalid state, the ResultSet object is closed.
at
net.sourceforge.jtds.jdbc.JtdsResultSet.checkOpen(JtdsResultSet.java:287):287
at
net.sourceforge.jtds.jdbc.JtdsResultSet.getMetaData(JtdsResultSet.java:1116):1116
at lucee.runtime.type.QueryImpl.fillResult(Unknown Source):-1
at lucee.runtime.type.QueryImpl.(Unknown Source):-1
at lucee.runtime.type.QueryImpl.setGeneratedKeys(Unknown Source):-1
at lucee.runtime.type.QueryImpl.setGeneratedKeys(Unknown Source):-1
at lucee.runtime.type.QueryImpl.(Unknown Source):-1
at lucee.runtime.tag.Query.executeDatasoure(Unknown Source):-1
at lucee.runtime.tag.Query.doEndTag(Unknown Source):-1
at
org.lucee.cfml.base_cfc$cf.udfCall1(/var/www/shared/WEB-INF/lucee/components/org/lucee/cfml/Base.cfc:163):163
at
org.lucee.cfml.base_cfc$cf.udfCall(/var/www/shared/WEB-INF/lucee/components/org/lucee/cfml/Base.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(Unknown Source):-1
at lucee.runtime.type.UDFImpl._call(Unknown Source):-1
at lucee.runtime.type.UDFImpl.call(Unknown Source):-1
at lucee.runtime.type.scope.UndefinedImpl.call(Unknown Source):-1
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown
Source):-1
at lucee.runtime.PageContextImpl.getFunction(Unknown Source):-1
at
org.lucee.cfml.query_cfc$cf.udfCall(/var/www/shared/WEB-INF/lucee/components/org/lucee/cfml/Query.cfc:53):53
at lucee.runtime.type.UDFImpl.implementation(Unknown Source):-1
at lucee.runtime.type.UDFImpl._call(Unknown Source):-1
at lucee.runtime.type.UDFImpl.call(Unknown Source):-1
at lucee.runtime.ComponentImpl._call(Unknown Source):-1
at lucee.runtime.ComponentImpl._call(Unknown Source):-1
at lucee.runtime.ComponentImpl.call(Unknown Source):-1
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Unknown
Source):-1
at lucee.runtime.PageContextImpl.getFunction(Unknown Source):-1

my code looks like this in a cfc function:

var myquery = new Query();
var sql = “update table set field=1 where id=1”
myquery.setsql(sql);
myquery.execute();

I can reproduce the problem, but in production it’s happening a lot.

Thanks!

David Sedeño