Task #5711 (closed)
Opened 13 years ago
Closed 13 years ago
BUG: Can't access images in share
Reported by: | atarkowska | Owned by: | jamoore |
---|---|---|---|
Priority: | blocker | Milestone: | OMERO-Beta4.3 |
Component: | General | Version: | n.a. |
Keywords: | n.a. | Cc: | jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2011-06-16 (14) |
Description (last modified by jmoore)
exception ::omero::SecurityViolation { serverStackTrace = ome.conditions.SecurityViolation: Cannot read ome.model.core.Image:Id_3703 at ome.security.basic.BasicACLVoter.throwLoadViolation(BasicACLVoter.java:112) at ome.security.CompositeACLVoter.throwLoadViolation(CompositeACLVoter.java:86) at ome.security.ACLEventListener.onPostLoad(ACLEventListener.java:104) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:250) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:898) at org.hibernate.loader.Loader.doQuery(Loader.java:773) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.loadEntity(Loader.java:1953) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:147) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1082) at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1020) at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:176) at org.hibernate.Hibernate.initialize(Hibernate.java:428) at ome.logic.QueryImpl$1.doInHibernate(QueryImpl.java:174) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at ome.logic.QueryImpl.get(QueryImpl.java:157) at sun.reflect.GeneratedMethodAccessor1392.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at ome.security.basic.EventHandler.invoke(EventHandler.java:150) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:231) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:111) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy72.get(Unknown Source) at sun.reflect.GeneratedMethodAccessor1392.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:83) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy72.get(Unknown Source) at sun.reflect.GeneratedMethodAccessor1394.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179) at ome.services.throttling.Callback.run(Callback.java:56) at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56) at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:136) at ome.services.blitz.impl.QueryI.get_async(QueryI.java:110) at omero.api._IQueryTie.get_async(_IQueryTie.java:127) at omero.api._IQueryDisp.___get(_IQueryDisp.java:170) at omero.api._IQueryDisp.__dispatch(_IQueryDisp.java:516) 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.SecurityViolation message = Cannot read ome.model.core.Image:Id_3703 }
Change History (12)
comment:1 Changed 13 years ago by jmoore
- Cc jmoore added
- Description modified (diff)
- Owner changed from jmoore to atarkowska
comment:2 Changed 13 years ago by atarkowska
it seams that share connection context is shareId = -1, but I do not see any changes there. I am wondering if there were any changes on the server side?
comment:3 Changed 13 years ago by atarkowska
I can't reproduce it on my local machine running from today late morning. Windows issue?
Well, that is not exactly true. Local server does the same.
comment:4 Changed 13 years ago by jmoore
- Owner changed from atarkowska to jmoore
- Priority changed from minor to blocker
- Status changed from new to accepted
Looks like getEventContext() is not preserving the shareid.
comment:5 Changed 13 years ago by jmoore <josh@…>
(In [8219b3b939fb7c5dd651a641585a4e9290b1dce7/ome.git] on branch develop) Failing test of share activation (See #5711)
comment:6 Changed 13 years ago by jmoore <josh@…>
(In [7de21753963fdda24cc3840fb3b0fdf97ba0272a/ome.git] on branch develop) Immediate fix for lost shareId (See #5711)
comment:7 Changed 13 years ago by Aleksandra Tarkowska <aleksandrat@…>
(In [7d5df5debe0b534dfcf68bc2a1039f2555ad957e/ome.git] on branch develop) this clean up getEventContext reload in every single call, see #5711 and remove unexpected print out
comment:8 Changed 13 years ago by jmoore
Also in the process of reducing the calls to IAdmin.getEventContext throughout the rest of the code base:
~/git $ git grep -n -E "[.]getEventContext\(\)" | grep -vE "(conn|System|System\(\)|self|secSys|sm|sessionManager|client|mgr|factory|manager|basic|sec).getEventContext" | grep -v test components/blitz/src/ome/formats/OMEROMetadataStoreClient.java:402: eventContext = iAdmin.getEventContext(); components/blitz/src/ome/services/blitz/gateway/services/impl/DataServiceImpl.java:81: ownUserId = gatewayFactory.getAdminService().getEventContext().userId; components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java:484: getAdminService().getEventContext(); components/insight/TEST/org/openmicroscopy/shoola/examples/data/Gateway.java:285: eventContext = getAdminService().getEventContext(); components/server/src/ome/security/SecuritySystemHolder.java:83: return choose().getEventContext(); components/server/src/ome/services/delete/QueryConstraints.java:55: p.addLong("owner", iAdmin.getEventContext().getCurrentUserId()); components/server/src/ome/services/sessions/SessionManagerImpl.java:1170: sf.getAdminService().getEventContext(); components/tools/OmeroImageJ/Omero_ImageJ/src/ome/ij/data/Gateway.java:367: EventContext ctx = getAdminService().getEventContext(); components/tools/OmeroPy/src/omero/gateway/__init__.py:1379: self._ctx = self._proxies['admin'].getEventContext() components/tools/OmeroPy/src/omero/gateway/__init__.py:1429: self.c.sf.getAdminService().getEventContext() components/tools/OmeroPy/src/omero/gateway/__init__.py:1600: self._ctx = self._proxies['admin'].getEventContext() components/tools/OmeroPy/src/omero/plugins/sessions.py:311: ec = sf.getAdminService().getEventContext() components/tools/OmeroPy/src/omero/plugins/sessions.py:384: grp = rv[0].sf.getAdminService().getEventContext().groupName components/tools/OmeroPy/src/omero/processor.py:358: gid = client.sf.getAdminService().getEventContext().groupId components/tools/OmeroPy/src/omero/processor.py:911: uid = client.sf.getAdminService().getEventContext().userId components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py:196: self._ctx = self.getAdminService().getEventContext() examples/OmeroClients/sudo.java:28: System.out.println( sudoAdminSvc.getEventContext().userName ); examples/OmeroClients/sudo.m:17: disp(sudoAdmin.Svc.getEventContext().userName); examples/OmeroClients/sudo.py:20: print sudoAdminSvc.getEventContext().userName examples/OmeroClients/timeout.java:17: System.out.println(s.getAdminService().getEventContext().sessionUuid); examples/OmeroTables/FindMeasurements.java:69: final long userId = admin.getEventContext().userId;
comment:9 Changed 13 years ago by jmoore <josh@…>
(In [bd138a37947b11b8b60b31431433a1a44c70d6ff/ome.git] on branch develop) Reduce calls to IAdmin.getEventContext (See #4011, #5711)
comment:10 Changed 13 years ago by jmoore <josh@…>
(In [afe533e910e4e4673555b7cd45d6e44c5309536f/ome.git] on branch develop) Fix setCurrentGroup in OMEROMetadataStoreClient (See #5711)
comment:11 Changed 13 years ago by jburel
- Sprint changed from 2011-06-02 (13) to 2011-06-16 (14)
Moved from sprint 2011-06-02 (13)
comment:12 Changed 13 years ago by jmoore
- Resolution set to fixed
- Status changed from accepted to closed
Much of the work here should have been filed under #5690. This issue can be considered closed.
Ola, are you sure that the share is active? Can you print the event context at this point? The BasicACLVoter below should be a SharingACLVoter if the share is active: