ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

OptimisticLockException on Save #352

Closed will-moore closed 3 years ago

will-moore commented 4 years ago

Need to handle this to let the user know the figure wasn't saved & please try again.

Seen today on nightshade.

Internal Server Error: /figure/save_web_figure/
Traceback (most recent call last):
  File "/opt/omero/web/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omeroweb/decorators.py", line 486, in wrapped
    retval = f(request, *args, **kwargs)
  File "/opt/omero/web/venv/lib/python2.7/site-packages/omero_figure/views.py", line 296, in save_web_figure
    update.saveAndReturnObject(fa._obj, conn.SERVICE_OPTS)
  File "/opt/omero/web/OMERO.web/lib/python/omero/gateway/__init__.py", line 4703, in __call__
    return self.handle_exception(e, *args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omeroweb/webclient/webclient_gateway.py", line 2127, in handle_exception
    e, *args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omero/gateway/__init__.py", line 4700, in __call__
    return self.f(*args, **kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omero_api_IUpdate_ice.py", line 163, in saveAndReturnObject
    return _M_omero.api.IUpdate._op_saveAndReturnObject.invoke(self, ((obj, ), _ctx))
OptimisticLockException: exception ::omero::OptimisticLockException
{
will-moore commented 4 years ago

Seen again a few times since then - Most recently just now

Internal Server Error: /figure/save_web_figure/

OptimisticLockException at /figure/save_web_figure/
exception ::omero::OptimisticLockException
{
    serverStackTrace = ome.conditions.OptimisticLockException: You are not authorized to change the update event for ome.model.core.OriginalFile:Id_3294022 from ome.model.meta.Event:Id_94428953 to ome.model.meta.Event:Id_94428952
You may need to reload the object before continuing.
will-moore commented 4 years ago

And again from demo today, e-mail: "Fri 05/06/2020 07:45"

will-moore commented 4 years ago

Another example: demo server (e-mail)

Thu 25/06/2020 04:41
Internal Server Error: /figure/save_web_figure/

OptimisticLockException at /figure/save_web_figure/
exception ::omero::OptimisticLockException
{
    serverStackTrace = ome.conditions.OptimisticLockException: You are not authorized to change the update event for ome.model.core.OriginalFile:Id_490609 from ome.model.meta.Event:Id_16487216 to ome.model.meta.Event:Id_16487206
You may need to reload the object before continuing.
        at ome.security.basic.OmeroInterceptor.managedEvent(OmeroInterceptor.java:1201)
        at ome.security.basic.OmeroInterceptor.checkManagedDetails(OmeroInterceptor.java:963)
will-moore commented 3 years ago

And again on demo:

OptimisticLockException at /figure/save_web_figure/
exception ::omero::OptimisticLockException
{
    serverStackTrace = ome.conditions.OptimisticLockException: You are not authorized to change the update event for ome.model.core.OriginalFile:Id_515517 from ome.model.meta.Event:Id_16783428 to ome.model.meta.Event:Id_16783426
You may need to reload the object before continuing.
        at ome.security.basic.OmeroInterceptor.managedEvent(OmeroInterceptor.java:1201)
        at ome.security.basic.OmeroInterceptor.checkManagedDetails(OmeroInterceptor.java:963)
will-moore commented 3 years ago

This should be fixed by https://github.com/ome/omero-figure/pull/415