Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #3969 (closed)

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

BUG:Feedback 3160 tagging images

Reported by: omero-qa Owned by: jamoore
Priority: minor Milestone: OMERO-Beta4.3
Component: from QA Version: n.a.
Keywords: n.a. Cc: jburel, jason@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-01-27 (4)

Description (last modified by jmoore)

http://qa.openmicroscopy.org.uk/qa/feedback/3160/

Comment: Tagged multiple images from tree with new tag.

This is related to #3885. When Tag.description is set to an empty string on creation, any save with that tag loaded will issue an UPDATE for the row since it sees null != ''. Coalesce could be added to the nullable CLOB fields as well, but may surprise users who saved via "description.trim()" since a space will suddently appear in their field. Alternatively, we could modify the dirty state detection to ignore ""/null differences (probably ideal).

A workaround for the minute will be to only pass unloaded tag items and/or to reload them on return:

 link = saveAndReturnObject(link)
 tag = link.child()


java.lang.Exception: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot update the object.

	at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:802)

	at org.openmicroscopy.shoola.env.data.OMEROGateway.createObject(OMEROGateway.java:2707)

	at org.openmicroscopy.shoola.env.data.OmeroMetadataServiceImpl.linkAnnotation(OmeroMetadataServiceImpl.java:454)

	at org.openmicroscopy.shoola.env.data.OmeroMetadataServiceImpl.saveData(OmeroMetadataServiceImpl.java:1014)

	at org.openmicroscopy.shoola.env.data.views.calls.StructuredAnnotationSaver$1.doCall(StructuredAnnotationSaver.java:90)

	at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:144)

	at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)

	at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)

	at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)

	at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:274)

	at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)

	at java.lang.Thread.run(Unknown Source)

Caused by: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot update the object.

	at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:802)

	at org.openmicroscopy.shoola.env.data.OMEROGateway.saveAndReturnObject(OMEROGateway.java:2806)

	at org.openmicroscopy.shoola.env.data.OMEROGateway.createObject(OMEROGateway.java:2704)

	... 10 more

Caused by: omero.OptimisticLockException

    serverStackTrace = "ome.conditions.OptimisticLockException: You are not authorized to change the update event for ome.model.annotations.TagAnnotation:Id_1644 from ome.model.meta.Event:Id_12136 to ome.model.meta.Event:Id_12134

                        You may need to reload the object before continuing.

                        	at ome.security.basic.OmeroInterceptor.managedEvent(OmeroInterceptor.java:978)

                        	at ome.security.basic.OmeroInterceptor.checkManagedDetails(OmeroInterceptor.java:653)

                        	at ome.security.basic.OmeroInterceptor.resetDetails(OmeroInterceptor.java:308)

                        	at ome.security.basic.OmeroInterceptor.onFlushDirty(OmeroInterceptor.java:182)

                        	at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372)

                        	at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)

                        	at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)

                        	at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)

                        	at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)

                        	at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)

                        	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50

Change History (8)

comment:1 Changed 13 years ago by jburel

  • Cc jburel added
  • Description modified (diff)

I don't think it is related to DB. I will check

comment:2 Changed 13 years ago by jburel

  • Description modified (diff)

comment:3 Changed 13 years ago by jburel

  • Cc changed from jason@glencoesoftware.com, jburel to jburel, jason@glencoesoftware.com

tested via 4.2.2 client against nightshade, no problem.
tested against local server (running latest code) no problem

comment:4 Changed 13 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.3
  • Sprint set to 2011-01-27 (4)

Confirmed also to only be on some DB types.

comment:5 Changed 13 years ago by jmoore

  • Description modified (diff)

comment:6 Changed 13 years ago by jmoore

  • Remaining Time set to 1.0

comment:7 Changed 13 years ago by jmoore

  • Remaining Time changed from 1.0 to 0
  • Resolution set to fixed
  • Status changed from new to closed

I have a fix for this server-side. It introduces a FlushEntityEventListener which detects when a field was either null or '' and is either null' or '' and prevents it from being written to the DB. For the moment, this is on a separate branch, but I'm closing this. Jean-Marie, you shouldn't have to implement anything client side to prevent this bug, but reviewing for loaded objects in links would still be useful.

comment:8 Changed 13 years ago by jburel

see #4022

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.70314 sec.)

We're Hiring!