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)

Description

serverStackTrace = ome.conditions.ApiUsageException: Not intended for copying!
        at ome.model.internal.Permissions.<init>(Permissions.java:156)
        at ome.security.basic.CurrentDetails.createDetails(CurrentDetails.java:365)
        at ome.security.basic.OmeroInterceptor.newTransientDetails(OmeroInterceptor.java:551)
        at ome.security.basic.OmeroInterceptor.onSave(OmeroInterceptor.java:157)
        at org.hibernate.event.def.AbstractSaveEventListener.substituteValuesIfNecessary(AbstractSaveEventListener.java:414)
        at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:293)
        at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)

See redmine-104

Change History (2)

comment:1 Changed 8 years ago by jmoore

fix pushed to sprint18-bugfixes:

commit 800d9f042d93a9c0390248fc1d31d64f1348b03f
Author: jmoore <josh@glencoesoftware.com>
Date:   Mon Jun 25 15:36:23 2012

    Pre-load group for PixelDataThread.makeEvent (Fix #9223)
    
    Use of "omero.group"=="-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
    value.

diff --git a/components/server/src/ome/services/pixeldata/PixelDataThread.java b/components/server/src/ome/services/pixeldata/PixelDataThread.java
index 6311258..7779f3d 100644
--- a/components/server/src/ome/services/pixeldata/PixelDataThread.java
+++ b/components/server/src/ome/services/pixeldata/PixelDataThread.java
@@ -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("omero.group", "-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) {
-                log.info("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!