Lucee 4.5.3.003 / ColdBox 4.1.0+00002

77 views
Skip to first unread message

Jeremy R DeYoung

unread,
Feb 10, 2016, 1:30:58 PM2/10/16
to ColdBox Platform, lu...@googlegroups.com
​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

Jon Clausen

unread,
Feb 10, 2016, 1:56:50 PM2/10/16
to lu...@googlegroups.com
Jeremy, 

There is an ORM transactional bug in 4.5.3.003 that prevents anything within a transaction from saving without an explicit ORMFlush():  https://luceeserver.atlassian.net/browse/LDEV-688

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.

Jon
--
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+un...@googlegroups.com.
To post to this group, send email to lu...@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.

Jon Clausen

unread,
Feb 10, 2016, 2:00:34 PM2/10/16
to lu...@googlegroups.com
Correction:

Roll back to before 4.5.3.002, which was when the bug was (re)introduced.

Jeremy R DeYoung

unread,
Feb 10, 2016, 2:07:36 PM2/10/16
to Lucee
yes, i see that. trying to find 4.5.3.001 or before verison :-)

Jeremy R DeYoung

unread,
Feb 10, 2016, 2:52:58 PM2/10/16
to Lucee
I rolled back to 4.5.3.001 and its still happening :-( any other thoughts?

Jeroen Knoef

unread,
Feb 11, 2016, 5:02:20 AM2/11/16
to Lucee, col...@googlegroups.com
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).

Jeremy R DeYoung

unread,
Feb 11, 2016, 7:59:01 AM2/11/16
to Lucee, ColdBox Platform
This problem is happening in most areas of my application. Here is another example where I've wrapped all updates around a transaction {}


Here is images.cfc snippet that is breaking


transaction {
switch(event.getValue('action')){
case "delete":
var data = imageService.findAllWhere(criteria={imageID=event.getValue('imageID')});
if(arrayLen(data)){
imageService.delete(entity=data[1]);
}
break;

}
}

Stack Trace is below.


It seems like no matter if I wrap in transaction {} or use {orm}Service.save/delete(entity=val,flush=true) method it throws the same error. Now the funny thing is this appears to only be happening on Microsoft SQL Server 2005 database. The other database I have which is MySQL, I'm not seeing this same behavior.

Any help/guidance/suggestions...heck at this point, I'll take guessing.  I feel like there is something wrong with the way I have mssql configured but its also a fresh install with the latest updates.


Stack Trace:

Batch update returned unexpected row count from update [0]; actual row count: 0; 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.delete(AbstractEntityPersister.java:2691):2691
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2895):2895
    at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97):97

    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:183):183

    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.HibernateORMTransaction.end(HibernateORMTransaction.java:63):63
    at lucee.runtime.orm.ORMConnection.setAutoCommit(ORMConnection.java:208):208
    at lucee.runtime.db.DatasourceManagerImpl.end(DatasourceManagerImpl.java:251):251
    at lucee.runtime.tag.Transaction.doFinally(Transaction.java:155):155
    at modules.slam.handlers.images_cfc$cf.udfCall(/modules/slam/handlers/images.cfc:124):124

    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:773):773
    at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
    at coldbox.system.web.controller_cfc$cf.udfCall2(/coldbox/system/web/Controller.cfc:548):548
    at coldbox.system.web.controller_cfc$cf.udfCall(/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:773):773
    at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
    at coldbox.system.web.controller_cfc$cf.udfCall2(/coldbox/system/web/Controller.cfc:425):425
    at coldbox.system.web.controller_cfc$cf.udfCall(/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:773):773
    at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1603):1603
    at coldbox.system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:197):197
    at coldbox.system.bootstrap_cfc$cf.udfCall(/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:742):742
    at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
    at coldbox.system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:353):353
    at coldbox.system.bootstrap_cfc$cf.udfCall(/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:742):742
    at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1593):1593
    at application_cfc$cf.udfCall(/Application.cfc:103):103

    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:407):407
    at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:133):133
    at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:38):38

    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:219):219

    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:668):668
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527):1527
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484):1484

Jon Clausen

unread,
Feb 11, 2016, 8:11:43 AM2/11/16
to lu...@googlegroups.com

Jeremy,

Saw your note on the JIRA ticket, but didn’t get a chance to respond. Can you paste your Application.cfc ORM settings? Specifically the following:

  • eventHandler
  • flushAtRequestEnd
  • autoManageSession
  • secondaryCacheEnabled

Also, if you’re using Coldbox’s BaseORMService, unless you’ve changed the settings, that call to delete() is already transactioned, so no need for the outer markup.

Jon

--
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+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Jeremy R DeYoung

unread,
Feb 11, 2016, 8:16:55 AM2/11/16
to Lucee
Jon

Truly appreciate your help! I've been using CB/Lucee/Railo for years but never had this issue before. Its has to be something stupid I'm doing that effects mssql.


Application.cfc {
      this.datasources["al3data"] = {
                class: 'com.microsoft.jdbc.sqlserver.SQLServerDriver'
              , connectionString: 'jdbc:sqlserver://x.x.x.x:1433;DATABASENAME=al3data;sendStringParametersAsUnicode=true;SelectMethod=direct;lastUpdateCount=true'
              , username: ''
              , password: ""
              , connectionLimit:25 // default:-1
              , connectionTimeout:1 // default: 1; unit: seconds
      };
        this.datasource = "al3data";

        this.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "modules/coldbox-bundle/cborm";
        this.mappings[ "/cbvalidation" ] = COLDBOX_APP_ROOT_PATH & "modules/coldbox-bundle/cbvalidation";

        this.ormSettings                        = {
                autogenmap              = true,
                savemapping             = false,
                useDBForMapping         = true,
                cfclocation                             = ["models","modules/slam/models"],
                dbcreate                                = "none",
                secondarycacheenabled   = false,
                cacheprovider                   = "ehCache",
                logSQL                                  = false,
                flushAtRequestEnd               = false,
                autoManageSession               = false,
                eventHandling                   = true,
                eventHandler                    = "models.eventHandler",
                skipCFCWithError                = false
        };
}

Jon Clausen

unread,
Feb 11, 2016, 8:38:18 AM2/11/16
to lu...@googlegroups.com

No problem. Settings look solid, other than your custom EventHandler.

Does models.EventHandler extend cborm.models.EventHandler?

If so, are there overrides to the CBORM Event Handler methods that might be responsible for the intermittent issues you’re seeing?

I’m also curious as to whether removing the outer transaction{} makes a difference.  In the code sample you provided, you’ve got your database read included in the same transaction with your deletion.

Based on the behavior you’re describing, once you rolled back Lucee to 4.5.3.001, I suspect it’s now an ORM configuration/event handling issue.

You might consider posting this to the #orm or #box-products channel on CFML Slack, as well.

Jon
Reply all
Reply to author
Forward
0 new messages