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

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

Bug: Loading script.

Reported by: jburel Owned by: jamoore
Priority: blocker Milestone: OMERO-4.4.4
Component: Security Version: n.a.
Keywords: n.a. Cc: jamoore, wmoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-09-11 (4)

Description

Trying to run a script against gretzky.
I now the following error

    serverStackTrace = "ome.conditions.ApiUsageException: Permissions argument cannot be null.
                        	at ome.model.internal.Permissions.<init>(Permissions.java:152)
                        	at ome.security.basic.CurrentDetails.applyContext(CurrentDetails.java:408)
                        	at ome.security.basic.BasicACLVoter.postProcess(BasicACLVoter.java:352)
                        	at ome.tools.hibernate.ProxyCleanupFilter.filter(ProxyCleanupFilter.java:119)
                        	at ome.util.ContextFilter.filter(ContextFilter.java:160)
                        	at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:244)
                        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                        	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
                        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                        	at $Proxy65.doWork(Unknown Source)
                        	at ome.services.util.Executor$Impl.execute(Executor.java:406)
                        	at omero.grid.InteractiveProcessorI.getScriptId(InteractiveProcessorI.java:486)
                        	at omero.grid.InteractiveProcessorI.<init>(InteractiveProcessorI.java:122)
                        	at ome.services.blitz.impl.SharedResourcesI.acquireProcessor(SharedResourcesI.java:418)
                        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        	at java.lang.reflect.Method.invoke(Method.java:597)
                        	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 omero.cmd.CallContext.invoke(CallContext.java:59)
                        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                        	at $Proxy74.acquireProcessor(Unknown Source)
                        	at omero.grid.ParamsHelper.generateScriptParams(ParamsHelper.java:137)
                        	at omero.grid.ParamsHelper.getOrCreateParams(ParamsHelper.java:94)
                        	at ome.services.blitz.impl.ScriptI$10.call(ScriptI.java:408)
                        	at ome.services.throttling.Callback2.run(Callback2.java:49)
                        	at ome.services.throttling.InThreadThrottlingStrategy.safeRunnableCall(InThreadThrottlingStrategy.java:80)
                        	at ome.services.blitz.impl.AbstractAmdServant.safeRunnableCall(AbstractAmdServant.java:169)
                        	at ome.services.blitz.impl.ScriptI.getParams_async(ScriptI.java:406)
                        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        	at java.lang.reflect.Method.invoke(Method.java:597)
                        	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 omero.cmd.CallContext.invoke(CallContext.java:59)
                        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                        	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                        	at $Proxy109.getParams_async(Unknown Source)
                        	at omero.api._IScriptTie.getParams_async(_IScriptTie.java:85)
                        	at omero.api._IScriptDisp.___getParams(_IScriptDisp.java:347)
                        	at omero.api._IScriptDisp.__dispatch(_IScriptDisp.java:494)
                        	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.ApiUsageException"
    message = "Permissions argument cannot be null."
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
	at java.lang.Class.newInstance0(Class.java:350)
	at java.lang.Class.newInstance(Class.java:303)
	at IceInternal.BasicStream$DynamicUserExceptionFactory.createAndThrow(BasicStream.java:2243)
	at IceInternal.BasicStream.throwException(BasicStream.java:1632)
	at IceInternal.Outgoing.throwUserException(Outgoing.java:442)
	at omero.api._IScriptDelM.getParams(_IScriptDelM.java:191)
	at omero.api.IScriptPrxHelper.getParams(IScriptPrxHelper.java:254)
	at omero.api.IScriptPrxHelper.getParams(IScriptPrxHelper.java:226)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.loadScript(OMEROGateway.java:6076)

Change History (5)

comment:1 Changed 12 years ago by jmoore

  • Component changed from General to Security
  • Owner set to jmoore
  • Remaining Time set to 0.5
  • Status changed from new to accepted

comment:2 Changed 12 years ago by jmoore

Confirmed from the cli bin/omero script params 8801.

comment:3 Changed 12 years ago by jmoore

Somehow, the permissions for the group haven't been loaded yet in this thread:

                // In the case of the dummy, we will be required to have
                // the group id already set in the context.
                ExperimenterGroup group = details.getGroup();
                if (group != null) {
                    // Systypes still will have DUMMY values.
                    Long gid = details.getGroup().getId();
                    Permissions p = c.getPermissionsForGroup(gid);
                    if (p != null) {
                        copy = p;
                    }

comment:4 Changed 12 years ago by jmoore

  • Remaining Time changed from 0.5 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

I pushed a fix for this (https://github.com/joshmoore/openmicroscopy/commit/ab59240e1e642378cbc921fd71c2c12e8ea7b87e) to my branch (https://github.com/joshmoore/openmicroscopy/tree/9505-perm-restrictions) which will get merged into https://github.com/openmicroscopy/openmicroscopy/pull/309

This doesn't solve the odd locked issue that's been seen, but that test is still passing for me.

comment:5 Changed 12 years ago by jmoore <josh@…>

(In [ab59240e1e642378cbc921fd71c2c12e8ea7b87e/ome.git] on branch develop) Handle NPE on getPermissionsForGroup (Fix #9567)

"user" group permissions were not being loaded
properly leading to NPEs. Since modifying data
in the "user" group is not the regular case, a
EMPTY permissions should be a safe default.

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

We're Hiring!