Lucee 4.5.3.003 / ColdBox 4.1.0+00002

​I’m having an issue when trying to update a single user orm object. Its
an intermittent problem​.

​The coldbox code for login.cfc is

user.setIsOnline(0);
user.setDateLastActivity(now());
user.setLoginUUID(‘’);
userService.save(entity=user,flush=true);

​Essentially the user is trying to logout. Nothing special at all.

However this captured error below is happening randomly throughout my
entire application. No rhyme or reason from what I can tell. Sometimes its
when I’m adding a record. Sometimes its when I’m updating. And sometimes
its when I’m deleting.

I’m using Microsoft SQL Server 2005 database. With Microsoft SQL Driver
configured as below
​ this.datasources[“al3data”] = {
, connectionString: ‘jdbc:sqlserver://255.255.255.255:1433
;DATABASENAME=data;sendStringParametersAsUnicode=true;SelectMethod=direct;useUnicode=true;characterEncoding=UTF-8’
, username: ’ ’
, password: " "
, connectionLimit:25 // default:-1
, connectionTimeout:1 // default: 1; unit: seconds
};​

​I’m running on windows 10 and ubuntu 14.04. Lucee/Tomcat config. This is
happening on both platforms.

​The catalina.out log says this “org.hibernate.util.JDBCExceptionReporter:A
result set was generated for update.
” anytime the above error happens.

Any help or guidance would be greatly appreciated. ​

​*Event: *nsg-module-security:logout.index
*Routed URL: *security/logout/
*Layout: *N/A (Module: )
*View: *N/A
*Timestamp: *02/10/2016 06:25:56 PM------------------------------
*Type: *org.hibernate.StaleStateException
Messages: Batch update returned unexpected row count from update [0];
actual row count: -1; expected: 1

​Batch update returned unexpected row count from update [0]; actual row
count: -1; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(
Expectations.java:85):85
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(
Expectations.java:70):70
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch
(NonBatchingBatcher.java:47):47
at org.hibernate.persister.entity.AbstractEntityPersister.update
(AbstractEntityPersister.java:2574):2574
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert
(AbstractEntityPersister.java:2478):2478
at org.hibernate.persister.entity.AbstractEntityPersister.update
(AbstractEntityPersister.java:2805):2805
at org.hibernate.action.EntityUpdateAction.execute
(EntityUpdateAction.java:114):114
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267):267
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
:259
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179)
:179
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions
(AbstractFlushingEventListener.java:321):321
at org.hibernate.event.def.DefaultFlushEventListener.onFlush
(DefaultFlushEventListener.java:51):51
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206):1206
at lucee.runtime.orm.hibernate.HibernateORMSession.flush
(HibernateORMSession.java:162):162
at lucee.runtime.orm.hibernate.HibernateORMSession.flush
(HibernateORMSession.java:154):154
at lucee.runtime.functions.orm.ORMFlush.call(ORMFlush.java:32):32
at models.util.ormutilsupport_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/util/ORMUtilSupport.cfc:19
):19
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues
(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593)
:1593
at models.baseormservice_cfc$cf.udfCall4(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:810
):810
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc)
:-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.ArgumentImpl.callWithNamedValues
(ArgumentImpl.java:520):520
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at models.baseormservice_cfc$cf.udfCall6(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:1467
):1467
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc)
:-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:766)
:766
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues
(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593)
:1593
at models.baseormservice_cfc$cf.udfCall4(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:793
):793
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc)
:-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at modules.slamweb.interceptors.login_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/modules/slamweb/interceptors/login.cfc:260):260
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1774):1774
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:221):221
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:194):194
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall2(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:370):370
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall1(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:260):260
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall1(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:121):121
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.services.interceptorservice_cfc$cf.udfCall1(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/services/InterceptorService.cfc:139)
:139
at coldbox.system.web.services.interceptorservice_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/services/InterceptorService.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.frameworksupertype_cfc$cf.udfCall2(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/FrameworkSupertype.cfc:216):216
at coldbox.system.frameworksupertype_cfc$cf.udfCall(
/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/FrameworkSupertype.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at modules.nsmain_bundle315.nsg_module_security675.handlers.logout_cfc
$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/modules/nsMain-bundle/nsg-module-security/handlers/logout.cfc:5
):5
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.eventhandler_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/EventHandler.cfc:78):78
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall3(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc:761):761
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall2(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc:599):599
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues
(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall2(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc:425):425
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues
(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues
(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues
(PageContextImpl.java:1603):1603
at coldbox.system.bootstrap_cfc$cf.udfCall1(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/Bootstrap.cfc:197):197
at coldbox.system.bootstrap_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/Bootstrap.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:766)
:766
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues
(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593)
:1593
at coldbox.system.bootstrap_cfc$cf.udfCall1(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/Bootstrap.cfc:353):353
at coldbox.system.bootstrap_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/coldbox/system/Bootstrap.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues
(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593)
:1593
at application_cfc$cf.udfCall(/home/outlandusa/www/
slam.outlandusa.com/Application.cfc:107):107
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.listener.ModernAppListener.call
(ModernAppListener.java:413):413
at lucee.runtime.listener.ModernAppListener._onRequest
(ModernAppListener.java:133):133
at lucee.runtime.listener.MixedAppListener.onRequest
(MixedAppListener.java:37):37
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2265):2265
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2228):2228
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML
(CFMLEngineImpl.java:456):456
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:47):47
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729):729
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:291):291
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206):206
at org.apache.tomcat.websocket.server.WsFilter.doFilter
(WsFilter.java:52):52
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:239):239
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206):206
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:217):217
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:106):106
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:502):502
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:142):142
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:79):79
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:88):88
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:518):518
at org.apache.coyote.http11.AbstractHttp11Processor.process
(AbstractHttp11Processor.java:1091):1091
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:673):673
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(
NioEndpoint.java:1500):1500
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(
NioEndpoint.java:1456):1456
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1142):1142
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617):617
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
TaskThread.java:61):61
at java.lang.Thread.run(Thread.java:745):745​

Jeremy,

There is an ORM transactional bug in 4.5.3.003 that prevents anything within a transaction from saving without an explicit ORMFlush(): [LDEV-688] - Lucee

Just roll back one version and the problem will go away. Not sure why the issue is backlogged. It’s pretty much a blocker for anyone using ORM.

JonOn February 10, 2016 at 1:31:11 PM, Jeremy R DeYoung (@Jeremy_R_DeYoung) wrote:

​I’m having an issue when trying to update a single user orm object. Its an intermittent problem​.

​The coldbox code for login.cfc is

user.setIsOnline(0);
user.setDateLastActivity(now());
user.setLoginUUID(‘’);
userService.save(entity=user,flush=true);

​Essentially the user is trying to logout. Nothing special at all.

However this captured error below is happening randomly throughout my entire application. No rhyme or reason from what I can tell. Sometimes its when I’m adding a record. Sometimes its when I’m updating. And sometimes its when I’m deleting.

I’m using Microsoft SQL Server 2005 database. With Microsoft SQL Driver configured as below
​ this.datasources[“al3data”] = {
, connectionString: ‘jdbc:sqlserver://255.255.255.255:1433;DATABASENAME=data;sendStringParametersAsUnicode=true;SelectMethod=direct;useUnicode=true;characterEncoding=UTF-8’
, username: ’ ’
, password: " "
, connectionLimit:25 // default:-1
, connectionTimeout:1 // default: 1; unit: seconds
};​

​I’m running on windows 10 and ubuntu 14.04. Lucee/Tomcat config. This is happening on both platforms.

​The catalina.out log says this “org.hibernate.util.JDBCExceptionReporter:A result set was generated for update.” anytime the above error happens.

Any help or guidance would be greatly appreciated. ​

​Event: nsg-module-security:logout.index
Routed URL: security/logout/
Layout: N/A (Module: )
View: N/A
Timestamp: 02/10/2016 06:25:56 PM Type: org.hibernate.StaleStateException
Messages: Batch update returned unexpected row count from update [0]; actual row count: -1; expected: 1

​Batch update returned unexpected row count from update [0]; actual row count: -1; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85):85
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70):70
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:47):47
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2574):2574
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2478):2478
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2805):2805
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:114):114
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267):267
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259):259
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179):179
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321):321
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51):51
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206):1206
at lucee.runtime.orm.hibernate.HibernateORMSession.flush(HibernateORMSession.java:162):162
at lucee.runtime.orm.hibernate.HibernateORMSession.flush(HibernateORMSession.java:154):154
at lucee.runtime.functions.orm.ORMFlush.call(ORMFlush.java:32):32
at models.util.ormutilsupport_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/util/ORMUtilSupport.cfc:19):19
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
at models.baseormservice_cfc$cf.udfCall4(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:810):810
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.ArgumentImpl.callWithNamedValues(ArgumentImpl.java:520):520
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at models.baseormservice_cfc$cf.udfCall6(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:1467):1467
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:766):766
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
at models.baseormservice_cfc$cf.udfCall4(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc:793):793
at models.baseormservice_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/coldbox-bundle/cborm/models/BaseORMService.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at modules.slamweb.interceptors.login_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/slamweb/interceptors/login.cfc:260):260
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1774):1774
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:221):221
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:194):194
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall2(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:370):370
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall1(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:260):260
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall1(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc:121):121
at coldbox.system.web.context.interceptorstate_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/context/InterceptorState.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.services.interceptorservice_cfc$cf.udfCall1(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/services/InterceptorService.cfc:139):139
at coldbox.system.web.services.interceptorservice_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/services/InterceptorService.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.frameworksupertype_cfc$cf.udfCall2(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/FrameworkSupertype.cfc:216):216
at coldbox.system.frameworksupertype_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/FrameworkSupertype.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at modules.nsmain_bundle315.nsg_module_security675.handlers.logout_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/modules/nsMain-bundle/nsg-module-security/handlers/logout.cfc:5):5
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.eventhandler_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/EventHandler.cfc:78):78
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall3(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc:761):761
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall2(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc:599):599
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:775):775
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.web.controller_cfc$cf.udfCall2(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc:425):425
at coldbox.system.web.controller_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/web/Controller.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:216):216
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:643):643
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1778):1778
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774):774
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
at coldbox.system.bootstrap_cfc$cf.udfCall1(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/Bootstrap.cfc:197):197
at coldbox.system.bootstrap_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/Bootstrap.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:766):766
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
at coldbox.system.bootstrap_cfc$cf.udfCall1(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/Bootstrap.cfc:353):353
at coldbox.system.bootstrap_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/coldbox/system/Bootstrap.cfc):-1
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:743):743
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
at application_cfc$cf.udfCall(/home/outlandusa/www/slam.outlandusa.com/Application.cfc:107):107
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111):111
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328):328
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229):229
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642):642
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:524):524
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1761):1761
at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:413):413
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:133):133
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:37):37
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2265):2265
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2228):2228
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:456):456
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:47):47
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729):729
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291):291
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239):239
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217):217
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106):106
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502):502
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142):142
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79):79
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88):88
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518):518
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091):1091
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673):673
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500):1500
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456):1456
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61
at java.lang.Thread.run(Thread.java:745):745​


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAFy17unS-RQ1Xyceu6-dS6Jc6YrJbmRVuMZ5zkBYMjh-hK0Waw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Do you use transactions? Looking at the stacktrace, I see one call from
Application.cfc, and then only Coldbox calls, one of them being a call to
ORMFlush. This should not be necessary if you’re in a transaction.

Also, the error could originate from any other object that happened to be
modified in the ORM session. If you wrap the updates inside a transaction,
the exception would be thrown at the end of the transaction, not at the end
of the request as it is now (it seems, I’m not familiar with Coldbox in
combination with ORM).