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 #9223 (closed)

Opened 8 years ago

Closed 8 years ago

Bug: PixelsDataThread.makeEvent fails with "Not intended for copying"

Reported by: jamoore Owned by: jamoore
Priority: blocker Milestone: OMERO-4.4
Component: Services Version: n.a.
Keywords: n.a. Cc: cneves
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-07-03 (18)


serverStackTrace = ome.conditions.ApiUsageException: Not intended for copying!
        at ome.model.internal.Permissions.<init>(
        at org.hibernate.event.def.AbstractSaveEventListener.substituteValuesIfNecessary(
        at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(
        at org.hibernate.event.def.AbstractSaveEventListener.performSave(

See redmine-104

Change History (2)

comment:1 Changed 8 years ago by jmoore

fix pushed to sprint18-bugfixes:

commit 800d9f042d93a9c0390248fc1d31d64f1348b03f
Author: jmoore <>
Date:   Mon Jun 25 15:36:23 2012

    Pre-load group for PixelDataThread.makeEvent (Fix #9223)
    Use of ""=="-1" during writing threads will
    often lead to the error "Not intended for copying".
    Here, we pre-load the group that we are looking for by
    using "-1", and then set the group explicitly to that

diff --git a/components/server/src/ome/services/pixeldata/ b/components/server/src/ome/services/pixeldata/
index 6311258..7779f3d 100644
--- a/components/server/src/ome/services/pixeldata/
+++ b/components/server/src/ome/services/pixeldata/
@@ -205,27 +205,41 @@ public class PixelDataThread extends ExecutionThread implements ApplicationListe
     private EventLog makeEvent(final EventContext ec,
                                final MissingPyramidMessage mpm) {
-        Map<String, String> callContext = new HashMap<String, String>();
+        final Principal p = new Principal(uuid);
+        final Map<String, String> callContext = new HashMap<String, String>();
+        // First call is with -1 in order to find the pixels group.
+        // TODO: this could equally be done with sqlAction.
         callContext.put("", "-1");
-        return (EventLog) this.executor.execute(callContext, new Principal(uuid),
-                    new Executor.SimpleWork(this, "createEvent") {
-            @Transactional(readOnly = false)
+        final Long groupID = (Long) this.executor.execute(callContext, p,
+                new Executor.SimpleWork(this, "getGroupId") {
+            @Transactional(readOnly = true)
             public Object doWork(Session session, ServiceFactory sf) {
-      "Creating PIXELDATA event for pixels id:"
-                        + mpm.pixelsID);
-                // Load objects
-                final EventType type = sf.getTypesService().getEnumeration(
-                        EventType.class, ec.getCurrentEventType());

comment:2 Changed 8 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

forgot to click on "fixed"

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.185939 sec.)

We're Hiring!