Task #2893 (closed)
Opened 9 years ago
Closed 8 years ago
Bug: ConstraintViolation on many threads
| Reported by: | jamoore | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-4.4 |
| Component: | General | Version: | n.a. |
| Keywords: | n.a. | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | 2012-01-17 (6) |
Description
Running 8 threads which all quickly create objects can lead to constraint violations in 4.1:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/tmp/wells.py", line 117, in run
main(2,2,8)
File "/tmp/wells.py", line 102, in main
test.create_well_sample(plate_id, acquisition_id, r, c)
File "/tmp/wells.py", line 76, in create_well_sample
w = self.update.saveAndReturnObject(w)
File "/private/tmp/b41/dist/lib/python/omero_API_ice.py", line 2323, in saveAndReturnObject
return _M_omero.api.IUpdate._op_saveAndReturnObject.invoke(self, ((obj, ), _ctx))
ValidationException: exception ::omero::ValidationException
{
serverStackTrace = ome.conditions.ValidationException: could not insert: [ome.model.screen.WellSample]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [ome.model.screen.WellSample]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:624)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:175)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:100)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy64.saveAndReturnObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:79)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:35)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy64.saveAndReturnObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor394.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
at ome.services.throttling.Callback.run(Callback.java:55)
at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:37)
at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:126)
at ome.services.blitz.impl.UpdateI.saveAndReturnObject_async(UpdateI.java:64)
at omero.api._IUpdateTie.saveAndReturnObject_async(_IUpdateTie.java:92)
at omero.api._IUpdateDisp.___saveAndReturnObject(_IUpdateDisp.java:185)
at omero.api._IUpdateDisp.__dispatch(_IUpdateDisp.java:365)
at IceInternal.Incoming.invoke(Incoming.java:159)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
at Ice.ConnectionI.message(ConnectionI.java:972)
at IceInternal.ThreadPool.run(ThreadPool.java:577)
at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
serverExceptionClass = ome.conditions.ValidationException
message = could not insert: [ome.model.screen.WellSample]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [ome.model.screen.WellSample]
}
Attachments (2)
Change History (7)
Changed 9 years ago by jmoore
comment:1 Changed 9 years ago by atarkowska
- Resolution set to worksforme
- Status changed from new to closed
comment:2 Changed 9 years ago by atarkowska
- Resolution worksforme deleted
- Status changed from closed to reopened
Accidentally closed.
comment:3 Changed 8 years ago by jmoore
- Milestone changed from Unscheduled to OMERO-Beta4.4
- Owner set to jmoore
- Sprint set to 2012-01-17 (6)
- Status changed from reopened to accepted
comment:4 Changed 8 years ago by jmoore
- Owner jmoore deleted
- Status changed from accepted to new
comment:5 Changed 8 years ago by jmoore
- Resolution set to worksforme
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
It was fixed in 4.2.2